LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 06-10-2009, 11:41 AM   #1
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 157

Rep: Reputation: 35
CUPS web interface on localhost:631 not connecting


I haven't used the CUPS web interface in awhile, but I know it worked before and now it loads forever in the browser and finally times out.

I'm wondering if CUPS uses apache? Because my apache server I noticed has also stopped working, when I try to visit http://localhost. It also times out.

'ps -e' shows that cupsd and httpd are both running. I've tried restarting both of them, to no avail.

this is the only line I have in my /etc/hosts file:
127.0.0.1 localhost

Also I forgot to mention, pinging localhost shows that it is redirecting to 127.0.0.1 correctly, but the pings timeout and I have 100% packet loss.

Last edited by zuzoa; 06-10-2009 at 11:58 AM. Reason: more information
 
Old 06-10-2009, 12:08 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Do you have any firewall rules active that's denying access to localhost?
 
Old 06-10-2009, 12:10 PM   #3
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 157

Original Poster
Rep: Reputation: 35
I don't believe so, I haven't setup any sort of firewall myself. Is there a way to check on that?
 
Old 06-10-2009, 01:44 PM   #4
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
I believe if you type iptables -L will show firewall rules. I'm no firewall expert (I typically use a gui like Firestarter to manage mine) so the results may look a bit cryptic. If you haven't set anything up, it should be essentially blank. If there's a problem specific to localhost, there should be something like DENY 127.0.0.1 blah blah.
 
Old 06-10-2009, 02:05 PM   #5
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Cups web interface does not use apache

Quote:
CUPS has traditionally provided a dynamic web interface through dedicated CGI programs that are executed when users open special directories on the CUPS server. Each CGI performs administration, class, help, job, and printer functions as directed by the user, but the actual programs that are run and functions that are available are limited to those that were originally designed into the scheduler.
you do have to have the documentroot configured properly in cupsd.conf, and the cgi files for the web interface need to have execute permissions. I would think that is all handled automatically when you install it though.

Quote:
DocumentRoot
Examples

DocumentRoot /usr/share/doc/cups
DocumentRoot /foo/bar/doc/cups

Description
The DocumentRoot directive specifies the location of web content for the HTTP server in CUPS. If an absolute path is not specified then it is assumed to be relative to the ServerRoot directory. The default directory is /usr/share/cups/doc-root.



CGI Programs

CUPS uses five CGI programs to manage the dynamic web interfaces:

* admin.cgi
* classes.cgi
* help.cgi
* jobs.cgi
* printers.cgi

Each CGI program accepts standard form variables such as OP for the operation to perform, PRINTER_NAME for the printer or class name to operate on, QUERY for any search words, FIRST for the first class, job, or printer to display, and ORDER to control the order that classes, jobs, or printers are displayed.
just reference info for ya.. ..

Last edited by farslayer; 06-10-2009 at 02:07 PM.
 
Old 06-10-2009, 04:10 PM   #6
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 157

Original Poster
Rep: Reputation: 35
This is the output of iptables -L:

Quote:
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
And my /etc/cups/cupsd.conf file has no DocumentRoot in it. I tried adding the line "DocumentRoot /usr/lib/cups" which has these files in it:

Quote:
$ ls -F /usr/lib/cups/
backend/ cgi-bin/ daemon/ driver/ filter/ monitor/ notifier/
But I restarted the cupsd afterwards and it hasn't helped at all. Still timing out.

Also all my .cgi files in the cgi-bin have execute permissions (755).

Last edited by zuzoa; 06-10-2009 at 04:12 PM. Reason: more info
 
Old 07-13-2009, 09:33 AM   #7
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 157

Original Poster
Rep: Reputation: 35
Okay, I realised that my DocumentRoot should actually be /usr/share/doc/cups and not /usr/lib/cups and changed it accordingly, but I still have no success.

Any ideas, anybody?
 
Old 07-13-2009, 10:26 AM   #8
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Quote:
pinging localhost shows that it is redirecting to 127.0.0.1 correctly, but the pings timeout and I have 100% packet loss.
This is serious. I am surprised your computer is working at all.
What does ifconfig lo tell you?
 
Old 07-13-2009, 10:44 AM   #9
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 157

Original Poster
Rep: Reputation: 35
OK, nevermind, I figured out the problem!

I had to bring up the loopback interface with
Code:
ifconfig lo up
, since it wasn't being brought up by default.

thanks everyone
 
  


Reply

Tags
apache2, cups, printing, server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Access CUPS localhost:631??? libertinux Linux - Networking 8 05-21-2009 10:08 AM
CUPS. http://localhost:631/ not found Bester Linux - Server 2 03-25-2009 03:15 AM
cups +localhost:631 trscookie Linux - Software 5 12-05-2005 07:15 AM
CUPS http://localhost:631/ LUB997 Linux - Software 1 09-26-2005 07:52 PM
CUPS Problem - can not access localhost:631 ch.keller Linux - Hardware 3 06-06-2005 05:56 PM


All times are GMT -5. The time now is 03:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration