CUPS problem - "waiting for localhost"

Problems and successes with specific brands/models of printers
Message
Author
User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#21 Post by neurino »

Done, nothing changed...

Ok, it seems I can only try with a new save file :cry:

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#22 Post by neurino »

One thing:

since first reboot after my "waiting for localhost" problem, before X starts I can read this warning:

Code: Select all

WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
and here's /etc/modprobe.conf content:

Code: Select all

options parport_pc io=0x378 irq=7 dma=3
Is it related?

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

#23 Post by rcrsn51 »

That message has been around for a while. What Puppy version are you using?

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#24 Post by neurino »

Wary 104 (the latest Release Candidate)

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#25 Post by neurino »

Moreover today I discovered I don't have the PDF printer anymore it used to work before I first tried adding my Samsung printer... sgrunt! :evil:

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

#26 Post by rcrsn51 »

Are you installing from the PET or from the official Samsung installer?

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#27 Post by neurino »

I removed your pet now, anyway I re-factored it leaving only the ppd of my printer, to save some space.

Anyway with no save file loaded the pet worked and the printer printed.

With my current savefile instead, no matter what I install or delete, I can't get any CUPS webpage but the home... :cry:

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#28 Post by neurino »

mikeb wrote me a PM about double checking possible changes in file / folders permissions.
I gave a look but did not find anomalies.

Then I looked at cups conf file adding ErrorLog file and setting LogLevel to debug.

Code: Select all

D [12/Jan/2011:20:03:03 +2300] cupsdReadClient: 10 GET /admin?OP=add-printer HTTP/1.1
D [12/Jan/2011:20:03:03 +2300] cupsdAuthorize: No authentication data provided.
D [12/Jan/2011:20:03:03 +2300] [CGI] /usr/lib/cups/cgi-bin/admin.cgi started - PID = 9232
I [12/Jan/2011:20:03:03 +2300] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=9232)
D [12/Jan/2011:20:03:03 +2300] cupsdSendCommand: 10 file=17
D [12/Jan/2011:20:03:03 +2300] Report: clients=6
D [12/Jan/2011:20:03:03 +2300] Report: jobs=0
D [12/Jan/2011:20:03:03 +2300] Report: jobs-active=0
D [12/Jan/2011:20:03:03 +2300] Report: printers=0
D [12/Jan/2011:20:03:03 +2300] Report: printers-implicit=0
D [12/Jan/2011:20:03:03 +2300] Report: stringpool-string-count=169
D [12/Jan/2011:20:03:03 +2300] Report: stringpool-alloc-bytes=4896
D [12/Jan/2011:20:03:03 +2300] Report: stringpool-total-bytes=3664
E [12/Jan/2011:20:03:03 +2300] PID 9232 (/usr/lib/cups/cgi-bin/admin.cgi) stopped with status 22!
D [12/Jan/2011:20:03:03 +2300] [CGI] /usr/lib/cups/cgi-bin/admin.cgi: Permission denied
The second last line reports the error, I checked binaries in /usr/lib/cups/cgi-bin/ but all have rwx,r-x,r-x permissions so I don't understand the Permission denied last message.

According to this error 22 is:

Code: Select all

#define EINVAL          22      /* Invalid argument */
Any tip?

I think that adding as a default the cups error log (in /var/log/cups/ like Ubuntu) in all puppies could help a lot not experienced users.

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

#29 Post by rcrsn51 »

Run

Code: Select all

top
and find the cupsd process. What user owns it?

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#30 Post by neurino »

root... :(

Code: Select all

# top
4836     1 root     S     4112   0%   0   0% /usr/sbin/cupsd -C /etc/cups/cupsd.conf

Code: Select all

# ps | egrep "cupsd|USER"
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      4836  0.0  0.2   4112  2084 ?        Ss   21:23   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf

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

#31 Post by rcrsn51 »

@neurino:
I was messing around with the Debian installer for another printer driver and ended up in exactly your situation. I eventually discovered that the installer had changed permissions on a bunch of other folders and that was causing the

Code: Select all

/usr/lib/cups/cgi-bin/admin.cgi: Permission denied
Check the following folders.

/usr
/usr/local
/usr/share
/usr/share/doc

Each one should have root:root ownership and 755 permissions.

For any one that's wrong, run

Code: Select all

chown root:root xxx
chmod 755 xxx

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#32 Post by neurino »

I installed Google Chrome from a deb package...

Like also mikeb suggested me I found this differences between original puppy sfs and current savefile:

Code: Select all

# ls -l /initrd/pup_ro2/etc/cups/
total 19
-rw-r--r-- 1 root root   1077 2010-09-13 21:47 command.types
-rw-r----- 1 root root   1218 2010-01-14 00:50 cupsd.conf
-rw-r----- 1 root      7 2470 2010-09-13 12:41 cupsd.conf.default
drwxr-xr-x 2 root root      3 2010-09-20 17:21 interfaces
-rw-r--r-- 1 root root   4543 2010-09-13 12:41 mime.convs
-rw-r--r-- 1 root root   6298 2010-09-13 12:41 mime.types
drwxr-xr-x 2 root root     35 2007-09-23 00:28 ppd
-rw-r----- 1 root root    405 2009-11-19 10:03 printers.conf
-rw-r--r-- 1 root root    946 2009-11-19 10:03 pstoraster.convs
-rw-r----- 1 root nobody  186 2010-09-13 12:41 snmp.conf
drwxr-xr-x 2 root root      3 2010-09-20 17:21 ssl
# ls -l /etc/cups/
total 40
-rw-r----- 1 root nobody 1247 2011-01-11 22:12 cupsd.conf
-rw-r----- 1 root      7 2470 2010-09-13 12:41 cupsd.conf.default
drwxr-xr-x 2 root root   4096 2009-07-20 02:08 interfaces
-rw-r--r-- 1 root root   4543 2010-09-13 12:41 mime.convs
-rw-r--r-- 1 root root   6298 2010-09-13 12:41 mime.types
drwxr-xr-x 2 root nobody 4096 2009-07-20 02:08 ppd
-rw-r----- 1 root root    186 2010-09-13 12:41 snmp.conf
drwx------ 2 root nobody 4096 2009-07-20 02:08 ssl
but no matter I can restore ownership and permissions things does not change and after every reboot I get ownerships and permission restored like above!

I used

Code: Select all

find / -type d ! -perm 755
to find out possible anomalies but just these 2 are cups-related:

Code: Select all

/etc/cups/ssl
/etc/cups-old/ssl
others are about themes, python etc...[/b]

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

#33 Post by rcrsn51 »

The root:nobody ownerships are fine. CUPS wants them that way. Did you also check the folders I listed above?

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#34 Post by neurino »

rcrsn51 wrote:The root:nobody ownerships are fine. CUPS wants them that way. Did you also check the folders I listed above?
Yes... all right... no changes :(

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

#35 Post by rcrsn51 »

Where did you get the Google Chrome package?

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#36 Post by neurino »

Mmh.. I think to remember here

And if I recall right I installed the deb and once I saw it was working I removed it and installed a pet I made joining the deb contents and necessary libs (from GrumphyWolfe see post)

So now my pet is installed but at least once I run the deb package.

I didn't know deb packages could make changes to my folders... :( :roll:

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

#37 Post by rcrsn51 »

I can confirm that installing the Chrome deb will kill CUPS. It's not the content of the deb itself - it's how Puppy's dpkg-deb installer utility installs it.

However, it does not appear to be a permissions problem like I saw above with the printer driver. And I can't see anything that has changed so I can fix it. Simply deleting the contents of the Chrome install doesn't help and there are no processes running that affect CUPS.

BTW, the same thing happens with certain older Open Office packages. I'm curious as to whether this also happens with a full install of Puppy.

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

#38 Post by rcrsn51 »

Update:

1. The Chrome deb also kills CUPS in a full install.

2. Installing CUPS 1.4.x in Wary also fails.

3. Installing the Chrome deb in Lupu also kills CUPS.

4. However, this failure does not happen with all debs.

5. The CUPS daemon appears to be running OK at the command line. The problem is specific to the web interface at localhost:631

6. There are other reports on the web of "permission denied" with "admin.cgi", but they were fixable by correcting ownership and/or permissions of various folders.

I have found no way of recovering from this problem other than a new pupsave. It's a mystery.

User avatar
neurino
Posts: 362
Joined: Thu 15 Oct 2009, 13:08

#39 Post by neurino »

I rather guess it's something in the deb package:

I'm writing now from a fresh pupsave file from a chrome tab and in the tab aside there's CUPS working, also added my printer with your Samsung pet (trimmed) and printed a sample page succesfully!

I looked into the pet I made with deb contents and, after creating a separate NLS pet, I removed only a cron script to check for apt updates (not very useful in Puppy).

So just installing this pet does not kill CUPS...

Now... if I could not throw my perfectly tuned savefile I'd be grateful... otherwise I'll start over with a new one... :roll:

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

#40 Post by rcrsn51 »

So just installing this pet does not kill CUPS...
Agreed. If you manually extract the deb to a temporary location and make PET out of it, everything works fine. But if you let dpkg-deb extract it directly into the main file system, something subtle changes.

Post Reply