LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   stoopid cups question (https://www.linuxquestions.org/questions/slackware-14/stoopid-cups-question-4175522158/)

perbh 10-14-2014 10:40 PM

stoopid cups question
 
I've probably stared myself blind on this one - but help would be greatly appreciated!

Whenever I try to open a tab in a browser (chromium or firefox) with http://localhost:631 I get told "Not found'!
And yes, I _have_ restarted the daemon (/etc/rc.d/rc.cups restart) _and_ making sure it is running (ps auxw | grep cups)

Darn thing is - I _have_ used it in the past - was just gonna make some subtle changes to one of my printers, but this a long time ago ...
I'm use the 32-bit version of 14.1, kernel 3.10.17

I have other machines with exactly the same, and they work ok :-(

I am using dhcp, and my current address is 192.168.1.122 and I have even tried with 192.168.1.122:631, but same thing - 'Not found'!

[edit]
Oooops - I was wrong - all my other machines give 'Not found' as well - other than one running 14.0!!
There is no patch for cups, 14.1 uses version 1.5.4-3 and 14.0 uses version 1.5.4-2 - shouldn't be a lot of differences there, so it must be one of the patches that have caused it - and I only use the standard patches *sigh*

Didier Spaier 10-15-2014 04:21 AM

Do you have these lines in /etc/hosts?
Code:

# For loopbacking.
127.0.0.1              localhost

Is the lo interface up?
Code:

ifconfig | grep -A2 lo:

perbh 10-15-2014 08:18 AM

Yup - both are up.
This is ever so strange, but there must be one of the patches that has done it ...
I'm running a very clean 14.1-system, only have chromium and libreoffice and vlc from alien, and then jre and googleearth - otherwise plain vanilla. However, I do apply patches as they come.
Darned thing is - cups is still working fine, I can print without problems - I just can't bring up the web-interface :-(
Some of my other machines that didn't work either - they are wired and use a fixed ip-address, don't even use network-manager (or wicd) - same sad story ...

Didier Spaier 10-15-2014 09:25 AM

And that?
Code:

route | grep lo$

perbh 10-15-2014 09:57 AM

Code:

# route | grep lo
loopback        *              255.0.0.0      U    0      0        0 lo

But - I think I have got a handle on it :-)

I can do
Code:

localhost:631/admin
and similarly for /printers, /jobs, /classes etc
If I try the 'Home'- button from any of these others, I get 'Not Found'.
So - it would seem that the 'home-page' has disappeared into the proverbial ether ...

When I get back home I'll reinstall cups - that will probably do it ...

I'll report back later today and possibly mark it as solved.

perbh 10-15-2014 01:23 PM

This is just getting more and more strange!!
I removed cups and then installed it again - no difference!!
ie 'localhost:631' does not work ('Not Found')
However, all the others are ok, ie:
localhost:631/printers, localhost:631/admin, localhost:631/jobs etc etc

Clicking on the 'Home'-button from any one of the others, just gives 'Not Found'

If it had been only one machine, I would not have been too bothered (probably done something wrong again!), but every one of my 32-bit 14.1-rigs have the same symptoms ... :-(

perbh 10-15-2014 04:35 PM

The plot thickens - I found a disk with slackware32-14.1, almost vanilla. ie it had very few, if any, patches applied - and 'localhost:631' _works_!!
When comparing my 'faulty' machines that I actually could get to, just not the 'homepage', the layout is somewhat different - maybe there is a stylesheet or two missing?

Anyways - what I will now do is to apply the missing patches, one at a time until I can find the culprit (x-ing my fingers here)

Wish me luck!

perbh 10-15-2014 05:13 PM

Tried another tack first - comparing the filenames under /etc/cups, /usr/lib/cups and /usr/share/cups (incase one or more files had gone missing)- and they are the same other than a couple of printers/drivers that were defined in the non-working computers (I didn't check the content - will do that next).
However, far as I can remember, the last time I used the cups interface was some months back when we got a new hp-printer and I used hplip to set it up ... could that be the culprit?

tronayne 10-16-2014 06:08 AM

Quote:

Originally Posted by perbh (Post 5254323)
However, far as I can remember, the last time I used the cups interface was some months back when we got a new hp-printer and I used hplip to set it up ... could that be the culprit?

Probably not -- but... CUPS should be at cups-1.5.4-x86_64-3 (I'm on a 64-bit machine, the important thing is 1.5.4). HPLIP does not do anything to CUPS that would prevent access to localhost.

You should be able to ping localhost:
Code:

ping -c 5 localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.018 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.029 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.028 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.028 ms

--- localhost ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.018/0.026/0.031/0.007 ms

If you're not getting that, you've got something amiss.

Check /etc/hosts, it should look much like
Code:

cat /etc/hosts
#
# hosts                This file describes a number of hostname-to-address
#                mappings for the TCP/IP subsystem.  It is mostly
#                used at boot time, when no name servers are running.
#                On small systems, this file can be used instead of a
#                "named" name server.  Just add the names, addresses
#                and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine.  It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#

# For loopbacking.
127.0.0.1                localhost

# Local servers
192.168.1.10                fubar.lan fubar
192.168.1.15                OfficeJet
192.168.1.20                snafu.com snafu
192.168.1.30                pita pita.lan
192.168.1.2                hicl01.lan hicl01
# Public servers
75.126.162.205                linuxquestions.org
74.125.224.70                maps.google.com
74.125.224.111                maps.gstatic.com

# End of hosts.

Note that my servers run as fixed IP (no DHCP) on a LAN (they all have the same /etc/hosts file so they can "talk" to each other by name and print to OfficeJet by name and OfficeJet is an Ethernet printer with the fixed IP address 192.168.1.15 and that is the default system printer defined in CUPS on every one of the systems; you can lp filename and it goes to the printer. You do not need to do that, this is just about [I]localhost]/I].

There is the nuclear option -- remove CUPS (with removepkg), remove HPLIP (ditto) and reinstall both of them (with maybe a reboot in the middle). You'd want to set your printer up with hp-setup (as an ordinary user, not as root). This may be overkill and it may just be something weird in your /etc/rc.d/rc.inet1.conf so you'd want to look at that first.

If you can't ping localhost, you'll have to fix that first.

Hope this helps some.

perbh 10-16-2014 12:01 PM

Just to re-iterate - my network is _not_ the problem, nor is 'localhost' (all my rigs but laptops have fixed ip-addy's).
As stated previously - I can access cups' inface by doing, eg
Code:

http://localhost:631/printers
, but I cannot do just 'http://localhost:631' - that leads to 'Not Found'

Whenever I do any of the localhost:631/printers, localhost:631/admin, localhost:631/jobs, etc etc it just does not look right, like there is a missing stylesheet somewhere ... however, I _can_ access all the 'localhost:631/{whatever}' so I do not actually have a problem anymore. That being said - it just bugs the hell outtame that its not working 'properly' ... summat is not right!

As stated previously - vanilla 32bit-14.1 w/no patches applied - no problems!
Whenever _all_ the current patches are applied (or hp-setup has been used) - I have the 'Not Found'-problem

I do appreciate your input though, and yes, I shall remove hplip and see if that changes anything - and then reinstall it.
It's a bit harder removing cups cuz I do have one bizarre printer with absolutely non-standard drivers - which is why I'm using slackware32 even on friggin' rigs with 12 gigs o'memory and more than capable o'runnin' 64-bit (yes, I do realize I can run multilib - just don't care all that much for it - 32bits will do me just fine atm)

phenixia2003 10-16-2014 12:19 PM

Hello,

Your issue looks like the one in this thread (maybe a bit old: slackware 9.1, cups 1.1.20)

--
SeB

perbh 10-16-2014 12:28 PM

Wow!! Yup - that sounds like _exactly_ the same problem!!
Ohhhh - please don't make me having to recompile ... not that I mind (as such), but it should not be necessary (and yes, with age I do get more lazy! - which is why I try to run as much vanilla as possible)

Thank you for diggin' that li'l pearl up ...

keefaz 10-16-2014 12:29 PM

A configuration update problem? (cupsd.conf.new in /etc/cups ?)
Something logged in /var/log/cups/*?

perbh 10-16-2014 01:02 PM

Code:

# cat /var/log/cups/error_log
E [19/Nov/2013:21:37:00 -0600] Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported
.
.
.
E [15/Oct/2014:12:40:14 -0500] Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported

# ls -l /var/run/cups/certs/0
-r--r----- 1 root sys 32 Oct 15 14:34 /var/run/cups/certs/0
# chmod a+rw /var/run/cups/certs/0
# ls -l /var/run/cups/certs
dr-x--x--x 2 lp  sys  72 Oct 15 14:34 .
drwxr-xr-x 3 root lp  104 Oct 15 13:17 ..
-rw-rw-rw- 1 root sys  32 Oct 15 14:34 0

# chmod a+rw /var/run/cups/*

Thank you so much - I never thought of checking that ...
Makes no difference though - still 'Not Found' !!

FYI - I am a member of the following groups:
lp wheel mail audio video cdrom games scanner

But - good thinking!

And - no such file: /etc/cups/cups.conf.new ...

perbh 10-16-2014 01:17 PM

@tronayne:
*chuckles* I've got a rig called 'pita' as well ... great minds think alike!


All times are GMT -5. The time now is 09:39 PM.