LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   CUPS web interface on localhost:631 not connecting (http://www.linuxquestions.org/questions/linux-software-2/cups-web-interface-on-localhost-631-not-connecting-731972/)

zuzoa 06-10-2009 11:41 AM

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.

pljvaldez 06-10-2009 12:08 PM

Do you have any firewall rules active that's denying access to localhost?

zuzoa 06-10-2009 12:10 PM

I don't believe so, I haven't setup any sort of firewall myself. Is there a way to check on that?

pljvaldez 06-10-2009 01:44 PM

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.

farslayer 06-10-2009 02:05 PM

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

zuzoa 06-10-2009 04:10 PM

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).

zuzoa 07-13-2009 09:33 AM

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? :(

tredegar 07-13-2009 10:26 AM

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?

zuzoa 07-13-2009 10:44 AM

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 :)


All times are GMT -5. The time now is 12:17 AM.