CUPS won't open - Solved!

If none of the more specific forums is the right place to ask

CUPS won't open - Solved!

Postby Bulkley » 2011-04-02 16:11

CUPS has been working properly on my machine since forever. Last night I entered my usual 'http://127.0.0.1:631/printers' and I was greeted with "Iceweasel can't establish a connection to the server at 127.0.0.1:631." I tried other browsers and got a similar message. I don't know whether or not this has anything to do with Wheezy upgrades. A reboot does not clear it. Does anyone know what is blocking CUPS? Another way into it? A fix?

Thanks for any help.
Last edited by Bulkley on 2011-04-04 15:41, edited 1 time in total.
Bulkley
 
Posts: 5882
Joined: 2006-02-11 18:35

Re: CUPS won't open

Postby mslinux » 2011-04-03 01:46

Have you check things??
- Check your browser network settings.
- Check whether CUPS is running : netstat -tapln | grep cups
- Check CUPS log and syslog
MsLinux-

forums.debian.net - where facepalm is the default answer :D

© 2012
║▌║│█║▌│█│║▌║█║▌│█│║▌║│
User avatar
mslinux
 
Posts: 942
Joined: 2010-12-24 05:14

Re: CUPS won't open

Postby Bulkley » 2011-04-03 02:51

Thanks for your reply. netstat -tapln | grep cups (as root) gives no response. It doesn't matter which browser I use, they all balk at this.

I don't know why but syslog stops at March 18. CUPS log doesn't show me anything that tells me what's wrong. That may be my lack of understanding.

My instinct, for whatever it's worth, is that the localhost loop isn't working. If I enter localhost or http://localhost I get the same "Iceweasel can't establish a connection to the server . . . " report.
Bulkley
 
Posts: 5882
Joined: 2006-02-11 18:35

Re: CUPS won't open

Postby mslinux » 2011-04-03 12:33

netstat -tapln | grep cups (as root) gives no response

Do you mean there's no output by executing it?
Code: Select all
$ /etc/init.d/cups status

should give you information whether CUPS is running or not.
Code: Select all
$ ls -alt /var/run/cups/cupsd.pid
$ ls -alt /var/run/cups/cups.lock

Check your firewall configuration, make sure it allows traffics on loopback interface.
Increase CUPS log verbosity by changing LogLevel paramter in /etc/cups/cupsd.conf to debug.
http://localhost will only work if you have Apache or any other thing that is using port 80.
MsLinux-

forums.debian.net - where facepalm is the default answer :D

© 2012
║▌║│█║▌│█│║▌║█║▌│█│║▌║│
User avatar
mslinux
 
Posts: 942
Joined: 2010-12-24 05:14

Re: CUPS won't open

Postby Bulkley » 2011-04-03 17:58

$ /etc/init.d/cups status
Status of Common Unix Printing System: cupsd is running.

$ ls -alt /var/run/cups/cupsd.pid
-rw-r--r-- 1 root root 5 Apr 3 10:29 /var/run/cups/cupsd.pid

$ ls -alt /var/run/cups/cups.lock
ls: cannot access /var/run/cups/cups.lock: No such file or directory

Code: Select all
# netstat -natp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      1985/spamd.pid 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1977/sshd       
tcp        0      0 127.0.0.1:8118          0.0.0.0:*               LISTEN      1635/polipo     
tcp        0      0 127.0.0.1:9050          0.0.0.0:*               LISTEN      2015/tor       
tcp        0      0 0.0.0.0:538             0.0.0.0:*               LISTEN      1862/gdomap     
tcp        0      0 192.168.1.104:38698     213.251.167.55:9001     ESTABLISHED 2015/tor       
tcp        0      0 192.168.1.104:35902     82.94.251.204:443       ESTABLISHED 2015/tor       
tcp        0      0 192.168.1.104:48682     188.134.76.222:9001     ESTABLISHED 2015/tor       
tcp        0      0 192.168.1.104:60115     137.56.163.64:443       ESTABLISHED 2015/tor       
tcp6       0      0 :::139                  :::*                    LISTEN      1952/smbd       
tcp6       0      0 :::22                   :::*                    LISTEN      1977/sshd       
tcp6       0      0 :::445                  :::*                    LISTEN      1952/smbd       


It's not listening for CUPS.
Bulkley
 
Posts: 5882
Joined: 2006-02-11 18:35

Re: CUPS won't open

Postby mslinux » 2011-04-03 21:01

Oops sorry for typo, it should be : cups.sock
Code: Select all
ls -alt /var/run/cups/cups.sock



You should have
Code: Select all
Listen localhost:631
Listen /var/run/cups/cups.sock

in your /etc/cups/cupsd.conf
MsLinux-

forums.debian.net - where facepalm is the default answer :D

© 2012
║▌║│█║▌│█│║▌║█║▌│█│║▌║│
User avatar
mslinux
 
Posts: 942
Joined: 2010-12-24 05:14

Re: CUPS won't open

Postby Bulkley » 2011-04-03 23:07

Code: Select all
$  ls -alt /var/run/cups/cups.sock
srwxrwxrwx 1 root root 0 Apr  3 14:10 /var/run/cups/cups.sock

It's not listening, is it?
Bulkley
 
Posts: 5882
Joined: 2006-02-11 18:35

Re: CUPS won't open

Postby Bulkley » 2011-04-04 00:13

Got it. I had to add Listen localhost:631 and
Listen 127.0.0.1:631 (I probably only needed one or the other) to /etc/cups/cupsd.conf. I have no idea how it got removed or what changed to cause the problem. Whatever, now it works.

Thanks for the help. It was useful.
Bulkley
 
Posts: 5882
Joined: 2006-02-11 18:35

Re: CUPS won't open

Postby mslinux » 2011-04-04 05:41

Perhaps ipv6 is the cause [ ??? ]
I remember I got an issue with privoxy which somehow just wanted to listen to ipv6 interface only, using default config.
I had to change 127.0.0.1 to localhost for it to work.
MsLinux-

forums.debian.net - where facepalm is the default answer :D

© 2012
║▌║│█║▌│█│║▌║█║▌│█│║▌║│
User avatar
mslinux
 
Posts: 942
Joined: 2010-12-24 05:14

Re: CUPS won't open

Postby Bulkley » 2011-04-05 22:52

mslinux wrote:Perhaps ipv6 is the cause [ ??? ]

No, it is another program, system-config-printer 1.2.3, which is a graphic that uses CUPS. For some reason, probably a bug, it occasionally erases the Listen localhost:631 and Listen 127.0.0.1:631 from /etc/cups/cupsd.conf. I found that cupsd.conf only needs Listen localhost:631 for CUPS to operate properly.
Bulkley
 
Posts: 5882
Joined: 2006-02-11 18:35

Re: CUPS won't open - Solved!

Postby ramack » 2011-08-23 20:46

I am now unable to access my printers or CUPS on my Testing box through http://localhost:631

$ sudo /etc/init.d/cups status
Status of Common Unix Printing System: cupsd is running.

$ sudo ls -alt /var/run/cups/cupsd.pid
-rw-r--r-- 1 root root 6 Aug 23 13:51 /var/run/cups/cupsd.pid

$ sudo ls -alt /var/run/cups/cups.sock
srwxrwxrwx 1 root root 0 Aug 23 13:51 /var/run/cups/cups.sock

$ sudo netstat -natp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1988/sshd
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 12467/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2643/exim4
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 1848/smbd
tcp 0 0 127.0.0.1:8069 0.0.0.0:* LISTEN 1783/python
tcp 0 0 0.0.0.0:8070 0.0.0.0:* LISTEN 1783/python
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2019/mysqld
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1848/smbd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1147/rpcbind
tcp 0 0 0.0.0.0:50256 0.0.0.0:* LISTEN 1165/rpc.statd
tcp 0 0 127.0.0.1:7634 0.0.0.0:* LISTEN 1763/hddtemp
tcp6 0 0 :::631 :::* LISTEN 12467/cupsd
tcp6 0 0 :::445 :::* LISTEN 1848/smbd
tcp6 0 0 :::139 :::* LISTEN 1848/smbd
tcp6 0 0 :::111 :::* LISTEN 1147/rpcbind
tcp6 0 0 :::80 :::* LISTEN 1505/apache2

Shouldn't the line
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 12467/cupsd

be 127.0.0.1?

cups log is
/var/log/cups/error_log
Code: Select all
I [23/Aug/2011:14:46:35 -0600] Saving job cache file "/var/cache/cups/job.cache"...
D [23/Aug/2011:14:46:35 -0600] [Job 2790] Unloading...
D [23/Aug/2011:14:46:35 -0600] [Job 2791] Unloading...
I [23/Aug/2011:14:46:39 -0600] Listening to [v1.::]:631 (IPv6)
I [23/Aug/2011:14:46:39 -0600] Listening to 0.0.0.0:631 (IPv4)
I [23/Aug/2011:14:46:39 -0600] Listening to /var/run/cups/cups.sock (Domain)
I [23/Aug/2011:14:46:39 -0600] Listening to 127.0.0.1:631 (IPv4)
W [23/Aug/2011:14:46:39 -0600] No limit for Validate-Job defined in policy authenticated - using Print-Job's policy
I [23/Aug/2011:14:46:39 -0600] Remote access is enabled.
D [23/Aug/2011:14:46:39 -0600] Added auto ServerAlias ramack2
I [23/Aug/2011:14:46:39 -0600] Loaded configuration file "/etc/cups/cupsd.conf"
I [23/Aug/2011:14:46:39 -0600] Using default TempDir of /var/spool/cups/tmp...
I [23/Aug/2011:14:46:39 -0600] Configured for up to 100 clients.
I [23/Aug/2011:14:46:39 -0600] Allowing up to 100 client connections per host.
I [23/Aug/2011:14:46:39 -0600] Using policy "default" as the default!
I [23/Aug/2011:14:46:39 -0600] Full reload is required.
I [23/Aug/2011:14:46:39 -0600] Loaded MIME database from "/usr/share/cups/mime" and "/etc/cups": 38 types, 77 filters...
D [23/Aug/2011:14:46:39 -0600] Loading printer cups-pdf...
D [23/Aug/2011:14:46:39 -0600] load_ppd: Loading /var/cache/cups/cups-pdf.ipp4...
D [23/Aug/2011:14:46:39 -0600] cupsdRegisterPrinter(p=0xb97d9b10(cups-pdf))
D [23/Aug/2011:14:46:39 -0600] Loading printer HP_LaserJet_2035n...
D [23/Aug/2011:14:46:39 -0600] load_ppd: Loading /var/cache/cups/HP_LaserJet_2035n.ipp4...
D [23/Aug/2011:14:46:39 -0600] cupsdRegisterPrinter(p=0xb97de800(HP_LaserJet_2035n))
D [23/Aug/2011:14:46:39 -0600] Loading printer SHARP_AR-235...
D [23/Aug/2011:14:46:39 -0600] load_ppd: Loading /var/cache/cups/SHARP_AR-235.ipp4...
D [23/Aug/2011:14:46:39 -0600] cupsdRegisterPrinter(p=0xb97f64c8(SHARP_AR-235))
D [23/Aug/2011:14:46:39 -0600] load_ppd: Loading /var/cache/cups/SHARP_AR-235.ipp4...
D [23/Aug/2011:14:46:39 -0600] cupsdRegisterPrinter(p=0xb97f64c8(SHARP_AR-235))
I [23/Aug/2011:14:46:39 -0600] Loading job cache file "/var/cache/cups/job.cache"...
D [23/Aug/2011:14:46:39 -0600] [Job 2793] Loading from cache...
I [23/Aug/2011:14:46:39 -0600] Full reload complete.
D [23/Aug/2011:14:46:39 -0600] cupsd_clean_files(path="/var/spool/cups/tmp", pattern="(null)")
I [23/Aug/2011:14:46:39 -0600] Cleaning out old files in "/var/spool/cups/tmp"...
D [23/Aug/2011:14:46:39 -0600] cupsd_clean_files(path="/var/cache/cups", pattern="*.ipp")
I [23/Aug/2011:14:46:39 -0600] Cleaning out old files in "/var/cache/cups"...
I [23/Aug/2011:14:46:39 -0600] Listening to [v1.::]:631 on fd 6...
I [23/Aug/2011:14:46:39 -0600] Listening to 0.0.0.0:631 on fd 7...
I [23/Aug/2011:14:46:39 -0600] Listening to /var/run/cups/cups.sock on fd 8...
E [23/Aug/2011:14:46:39 -0600] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.
I [23/Aug/2011:14:46:39 -0600] Resuming new connection processing...
D [23/Aug/2011:14:46:39 -0600] Avahi client started
D [23/Aug/2011:14:46:39 -0600] Registering Avahi printer cups-pdf with name "Virtual PDF Printer @ ramack2" and type "_ipp._tcp"
D [23/Aug/2011:14:46:39 -0600] Registering Avahi printer SHARP_AR-235 with name "SHARP AR-235 @ ramack2" and type "_ipp._tcp"
D [23/Aug/2011:14:46:39 -0600] cupsdRegisterPrinter(p=0xb97d9b10(cups-pdf))
D [23/Aug/2011:14:46:39 -0600] cupsdRegisterPrinter(p=0xb97de800(HP_LaserJet_2035n))
D [23/Aug/2011:14:46:39 -0600] cupsdRegisterPrinter(p=0xb97f64c8(SHARP_AR-235))
D [23/Aug/2011:14:46:39 -0600] Discarding unused server-started event...
D [23/Aug/2011:14:46:40 -0600] cupsdNetIFUpdate: "wlan2" = 192.168.1.115:631
D [23/Aug/2011:14:46:40 -0600] cupsdNetIFUpdate: "wlan2" = [v1.2002:417c:4fb2:0:9644:52ff:fe04:81e9]:631
D [23/Aug/2011:14:46:40 -0600] cupsdNetIFUpdate: "wlan2" = [v1.fe80::9644:52ff:fe04:81e9+wlan2]:631
D [23/Aug/2011:14:46:40 -0600] Report: clients=0
D [23/Aug/2011:14:46:40 -0600] Report: jobs=499
D [23/Aug/2011:14:46:40 -0600] Report: jobs-active=2
D [23/Aug/2011:14:46:40 -0600] Report: printers=3
D [23/Aug/2011:14:46:40 -0600] Report: printers-implicit=0
D [23/Aug/2011:14:46:40 -0600] Report: stringpool-string-count=20709
D [23/Aug/2011:14:46:40 -0600] Report: stringpool-alloc-bytes=13208
D [23/Aug/2011:14:46:40 -0600] Report: stringpool-total-bytes=373816
D [23/Aug/2011:14:46:41 -0600] Avahi entry group established for Virtual PDF Printer @ ramack2
D [23/Aug/2011:14:46:41 -0600] Avahi entry group established for SHARP AR-235 @ ramack2
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
ramack
 
Posts: 460
Joined: 2008-01-28 15:31
Location: Centennial, CO

Re: CUPS won't open

Postby ramack » 2011-08-24 00:11

When I return back to work tomorrow I need to check /etc/network/interfaces. Below is what I have on my two Sid boxes here at home. On my Testing box at work, I'm pretty sure it's more populated.

Code: Select all
$ sudo cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
ramack
 
Posts: 460
Joined: 2008-01-28 15:31
Location: Centennial, CO

Re: CUPS won't open - Solved!

Postby ramack » 2011-08-24 14:05

My Testing box here at work had a much different /etc/network/interfaces. So I commented out lines in order to duplicate my /etc/network/interfaces on the two Sid boxes at home..

Code: Select all
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

#The loopback network interface
auto lo
iface lo inet loopback
#allow-hotplug ra0

#auto lo wlan0
#iface lo inet loopback
#allow-hotplug wlan0

#The loopback network interface
#auto lo wlan2
#iface lo inet loopback
#allow-hotplug wlan2


# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp



Then I
Code: Select all
$ sudo /etc/init.d/networking stop
Deconfiguring network interfaces...done.
$ sudo /etc/init.d/networking start
Configuring network interfaces...done.


And I was able to get into CUPS via my browser.
homemade AMD64, Acer AspireOne 150, Asus eeePC 900, i386; Testing
i386,Dell Vostro 1000 AMD64, Dell Inspiron 1100; Sid
XFCE on all.
ramack
 
Posts: 460
Joined: 2008-01-28 15:31
Location: Centennial, CO


Return to General Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable
cron