Page 1 of 1

Cups: Internal Server Error

Posted: Fri 04 Oct 2013, 19:33
by WoodLark
printing was working fine on my computer until I tried to print this morning. I am running Precise 5.6.1.

When I send a job to any printer, nothing happens. The Cups error- log reports the job completed and does not indicate anything wrong. If I try to check on the job in the localhost:631 interface, "500 Internal Server Error" appears as soon as I click on any tab.

I did install some new software last night, but have since removed it in an attempt to resolve the printing problems.
I also reloaded flashplayer as I was having some problems with sound in Youtube videos (fixed).

My Firewall is disabled and was before the problem started.

I have checked permissions on /tmp (and subdirectories), /var (and subdirectories), /root, /usr, /usr/bin, /usr/local, and /usr/share. All permissions seem to be correct.

I have rebooted the computer; the problem persists.

I don't know if uninstalling/reinstalling CUPS would help. In any case, I am not sure how to uninstall CUPS (version 1.4.8 ).

Re: Cups: Internal Server Error

Posted: Fri 04 Oct 2013, 23:22
by rcrsn51
WoodLark wrote:I did install some new software last night, but have since removed it in an attempt to resolve the printing problems.
Start a clean setup, install these packages one at a time, test printing and identify the culprit.

Posted: Sat 05 Oct 2013, 14:49
by WoodLark
Thank goodness for PupSave HotBackup! It appears that the culprit was Google Chrome.

Posted: Sat 05 Oct 2013, 15:20
by rcrsn51
Excellent. Please describe where you got Chrome and how you installed it.

With Chrome installed and CUPS broken, go to /initrd. Check the ownership and permissions of pup_rw.

Posted: Sat 05 Oct 2013, 18:08
by WoodLark
I got Chrome directly from Google's Chrome website, and installed it using their instructions.

Now that things are working properly, I do not plan to re-install Chrome. Seamonkey works for me.

Posted: Sat 05 Oct 2013, 20:08
by rcrsn51
I can confirm the problem and the solution.

In old Puppies, clicking on a DEB file would unpack it and copy the contents into the Puppy filesystem. But this behaviour was recently extended to also run the package's post-install script, without having ANY idea what it contains.

In some cases, like with Brother printer driver DEBs, this can be handy. In the case of the Chrome package, it is a BAD THING. The installer changes the permissions of /initrd/pup_rw from 755 to 700. It is this kind of change that causes CUPS to fail.

In my brief tests, correcting the permissions fixes CUPS and there don't appear to be any other side effects.

I find this situation distressing. It feels like Windows, where users run around clicking on anything with no idea of the consequences.

[Edit] In this situation, the problem wasn't in the post-install script - it was in the DEB's own file structure. Just running

Code: Select all

dpkg-deb -x google-chrome-stable_current_i386.deb /
corrupts the Puppy permissions.

Posted: Sun 20 Oct 2013, 22:09
by 8-bit
When I go to check the permissions on /initrd/puprw, I get a textual window that shows the permissions as:
a+x (Make executable/searchable)

So how does one check the numerical permissions of the folder?
I ask because I did more or less the same in installing chrome and then removing it.
Cups administration after that gave me that "500 internal server error"
also.
I am game to try to change the permissions on the folder back to what they should be.
I just need to know how as well as how to check the numerical permissions of the folder.

Posted: Sun 20 Oct 2013, 22:13
by rcrsn51
Right-click and select Properties instead of Permissions.

The permissions need to be

Code: Select all

R W X
R - X
R - X

Posted: Sun 20 Oct 2013, 22:38
by 8-bit
The permissions I show on all the directories in /initrd are
drwxr-xr-x

I know the d stands for directory.
But what I do not know is just how many directory permissions got changed by the chrome install/uninstall.
I will change the permissions on the /initrd/puprw and see if it takes care of getting CUPS to behave.
Outside of the CUPS interface, printing works as ususal.
But with my wireless printer, I sometimes have to change the port address in event of a power failure.
I originally had it set up with 4 as the last digit and now it is an 8.
This I think is because I had a few devices connected to the network that took up the first 7 slots.

Posted: Mon 21 Oct 2013, 01:22
by 8-bit
I tried to change the permissions on that directory and failed.
But....
After using a pupsave backup I had made, CUPS magically started working as far as administrative stuff and being able to print a test page.
This was with Seamonkey 1.19.
I then told Seamonkey to check for updates and it updated to version 2.21.
I then tried CUPS again and it failed to print a test page or allow me to do anything with the CUPS menus.
So it is evidently not just chrome that can cause problems.
As a note, the permissions on the folders had not changed before or afterward according to a "ls -l" from a terminal.
So I am now wondering if browser updates or the process of an auto-update is breaking things.

Another update:
I just got through installing the Links web browser and editing cups_shell to start with Links.

Although not nicely arranged on the web page, all of the admisistration stuff worked fine.
So maybe one needs to find some lite web browser that can be earmarked for the CUPS web interface.
Mind you, that is just a thought.
But it makes me wonder if other web browsers, Opera, Seamonkey, Firefox, etc mess up the CUPS web interface as to use after a browser update.



By the way, this is with Slacko 5.5 with the mozilla directory on /mnt/home and syslinked in /root so I can use it with all my puppys just by making a syslink in /root of each puppy install.

Posted: Mon 21 Oct 2013, 03:55
by rcrsn51
There are lots of ways that an alien package can mess up the Puppy filesystem. Read here.

Posted: Mon 21 Oct 2013, 21:01
by 8-bit
Without having to reinstall my printers or CUPS, I went to the ibiblio puppy web site, downloaded and installed midori-cups_lucid520.pet.
With it, I got the Cups web interface to work correctly with all the administrative and maintenance options.
So in this case, it seemed to be the simplest solution to the problems I was having with the Cups web interface that had developed and stayed after trying the chrome web browser.

As to your comment of a lot of things can break CUPS, when I install the above package on a supposed broken CUPs, and everything works again, I begin to wonder if folder permissions is the problem as I had not changed them manually.
So I am still unsure what broke the functioning of the cups web interface and why installing the above PET seemed to get it to work again.

Cups: Internal server error

Posted: Fri 24 Oct 2014, 04:04
by BlueGum
I'm running slacko 5.7, and Cups 1.4.8. Because google mail and drive complain that chromium is not supported, I installed chrome from the website. This broke Cups.

I changed permissions as advised on the forum, downloaded chrome from the google website and executed this line of code (slightly modified from that provided by rcrsn51 )

# dpkg-deb -x google-chrome-stable_current_i386.deb

currently, Cups seems to be working OK although I had to reinstall the printer in Cups.

BUT chrome will not now run as root.See attachment. Anybody know what to do here? I'm happy to specify an alternate --user-data-dir but don't know how.

Re: Cups: Internal server error

Posted: Fri 24 Oct 2014, 12:48
by Marv
BlueGum wrote:I'm running slacko 5.7, and Cups 1.4.8. Because google mail and drive complain that chromium is not supported, I installed chrome from the website. This broke Cups.

I changed permissions as advised on the forum, downloaded chrome from the google website and executed this line of code (slightly modified from that provided by rcrsn51 )

# dpkg-deb -x google-chrome-stable_current_i386.deb

currently, Cups seems to be working OK although I had to reinstall the printer in Cups.

BUT chrome will not now run as root.See attachment. Anybody know what to do here? I'm happy to specify an alternate --user-data-dir but don't know how.
I specify an alternate --user-data-dir by modifying line 18 in /usr/chromium as below. In my case I do it because I run chromium in several pups from an sfs and want a common data profile so I modified the chromium file in the sfs rather than using a symlink in each pup so all pups would see it with no mods to the pup. A caveat, in my case chromium balked at having it in my boot fat32 partition so it is in my EXT2 data partition on sda2.

Code: Select all

exec /usr/lib/chromium/chromium --user-data-dir=/mnt/sda2/Chromium --ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so --ppapi-flash-version=14.0.0.145 --disk-cache-size=10000000 --media-cache-size=10000000 --allow-outdated-plugins "$@"

my fixe

Posted: Sat 25 Oct 2014, 20:27
by mpierrat25
1) CUPS :
as rcrsn51

Code: Select all

 chmod 755 /initrd/pup_rw
now CUPS OK

2) Chrome as root :
I modified defaultbrowser as :

Code: Select all

#!/bin/sh
#exec mozstart "$@"
exec chrome --user-data-dir "$@"

Posted: Thu 27 Nov 2014, 03:47
by version2013
rcrsn51,

I had recently installed a deb package from google.
When I tried to print I got the error.

Thanks for sharing the information about the correct file permissions.
That fixed my printing problems.