Cups: Internal Server Error

Problems and successes with specific brands/models of printers
Post Reply
Message
Author
User avatar
WoodLark
Posts: 142
Joined: Tue 17 Apr 2007, 15:15
Location: South Carolina, USA

Cups: Internal Server Error

#1 Post 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 ).

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Cups: Internal Server Error

#2 Post 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.

User avatar
WoodLark
Posts: 142
Joined: Tue 17 Apr 2007, 15:15
Location: South Carolina, USA

#3 Post by WoodLark »

Thank goodness for PupSave HotBackup! It appears that the culprit was Google Chrome.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post 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.

User avatar
WoodLark
Posts: 142
Joined: Tue 17 Apr 2007, 15:15
Location: South Carolina, USA

#5 Post 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.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#6 Post 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.
Last edited by rcrsn51 on Fri 24 Oct 2014, 15:22, edited 1 time in total.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#7 Post 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.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post 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

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#9 Post 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.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#10 Post 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.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

There are lots of ways that an alien package can mess up the Puppy filesystem. Read here.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#12 Post 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.

BlueGum
Posts: 17
Joined: Sun 04 Nov 2007, 10:54

Cups: Internal server error

#13 Post 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.
Attachments
Screenshot_2014-10-24_023028.jpg
(14.92 KiB) Downloaded 1425 times

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

Re: Cups: Internal server error

#14 Post 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 "$@"
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
mpierrat25
Posts: 113
Joined: Thu 23 Aug 2007, 20:56
Location: France (25)

my fixe

#15 Post 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 "$@"

version2013
Posts: 503
Joined: Mon 09 Sep 2013, 00:00
Location: Florida, USA
Contact:

#16 Post 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.

Post Reply