# [SOLVED] http://localhost:631 (CUPS) -> 404 Not Found

## lalebarde

Hello everybody,

I am following the install documentation for printers. I am at the step where I have to install my printer in CUPS. But http://localhost:631 returns me 404 Not Found  :Sad: .

Here is my configuration :

```
PCTRAVAIL ~ # uname -a

Linux PCTRAVAIL 2.6.19-gentoo-r5 #12 Sat Jun 16 10:54:43 CEST 2007 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux

```

My printer is a Canon BJ200, connected to the parallel port. But I think this info is useless at this step.

I have tried /etc/init.d/cupsd zap, /etc/init.d/cupsd start : nothing changed. /etc/init.d/cupsd stop, /etc/init.d/cupsd start : nothing changed. Reboot : nothing changed. Thought CUPS is running : 

```
PCTRAVAIL ~ # ps -A |grep cups

 6450 ?        00:00:00 cupsd

```

OK, I added some use flags :

```
echo net-print/cups jpeg tiff png ppds X >> /etc/portage/package.use
```

So I came back, suppressing this line, stopping cupsd, re-emerging with vN, restart cupsd : nothing changed.

So what ? Anyone has some idea ?Last edited by lalebarde on Sat Oct 27, 2007 7:09 pm; edited 3 times in total

----------

## NeddySeagoon

lalebarde,

That suggests that cupsd is not running. Did it exit with an error?

Look in dmesg.

Is localhost listed in your /etc/hosts file ?

Does http://127.0.0.1:631 work ?

What about  http://<real-IP-addr>:631

----------

## lalebarde

Hello NeddySeagoon,

I am very pleased to meet you again   :Very Happy: .

cupsd looks running, and nothing in dmesg concerning cupsd :

```
PCTRAVAIL ~ # !520

/etc/init.d/cupsd start

 * WARNING:  cupsd has already been started.

PCTRAVAIL ~ # dmesg | grep cup

PCTRAVAIL ~ #   

```

Looking carrefully at dmesg, nothing special except for drm, but it is another issue. /etc/hosts is ok :

```
cat /etc/hosts

127.0.0.1       PCTRAVAIL.MAISON PCTRAVAIL localhost

::1     localhost

192.168.2.1     GATEWAY
```

http://127.0.0.1:631  does not work. It is the same behaviour : 404 Not Found

http://192.168.2.10 (local adress) does not work too : Error! Could not connect to remote server

http://<my internet address>:631 does not work too : no answer

```
PCTRAVAIL ~ # ifconfig

eth0      Lien encap:Ethernet  HWaddr 00:08:02:FC:F7:2B

          inet adr:192.168.2.10  Bcast:192.168.2.255  Masque:255.255.255.0

          adr inet6: fe80::208:2ff:fefc:f72b/64 Scope:Lien

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:7582 errors:0 dropped:0 overruns:0 frame:0

          TX packets:7886 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 lg file transmission:1000

          RX bytes:3489533 (3.3 Mb)  TX bytes:1257670 (1.1 Mb)

lo        Lien encap:Boucle locale

          inet adr:127.0.0.1  Masque:255.0.0.0

          adr inet6: ::1/128 Scope:Hôte

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:396 errors:0 dropped:0 overruns:0 frame:0

          TX packets:396 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 lg file transmission:0

          RX bytes:55995 (54.6 Kb)  TX bytes:55995 (54.6 Kb)

```

Best regards,

lalebarde.

----------

## NeddySeagoon

lalebarde,

I am not thinking very well. As you get a web page at all, even the 404 error page, it shows that a server is running listening to your localhost:631.

My cups in installed with USE flags

```
net-print/cups-1.2.11  USE="X dbus jpeg ldap nls pam png ppds ssl tiff -php -samba -slp" 
```

Maybe that helps but I don't know why

----------

## lalebarde

Hello NeddySeagoon,

I put your use flags and it works now   :Shocked: . I have then installed my printer and print a test page. Nothing happens. I tryed another driver from http://www.linuxprinting.org/printer_list.cgi, but it is the same   :Sad: .

As it is a long time I have not made it work, I am going to try to print something from another PC, and I will tell you.

See you soon,

lalebarde.

----------

## lalebarde

My printer & cable are OK (test from another PC). Then, I have installed it on my PC on another linux distribution (Sabayon). It installs right, but printing the test page fails. Six months ago I was on Mandriva and printing worked.

Possibly my parrallel port is out of order, but I don't have instruments to test it properly. Any idea to test it ?

----------

## kernelOfTruth

try emerging gimp-print / gutenprint & see if those drivers work 

good luck   :Smile: 

----------

## NeddySeagoon

lalebarde,

The good news is that as it worked in any Linux, it can be made to work in any other Linux.

Starting at the beginning, do you have parallel port support in your kernel ?

Having a /dev/lp0 or a symlink pointing to a real /dev file would be encoraging.

Does your user belong to the right group ?

My dmesg shows 

```
[   72.827603] parport: PnPBIOS parport detected.

[   72.827836] parport0: PC-style at 0x3bc, irq 7 [PCSPP,TRISTATE]
```

which is my port being detected, my module is loaded but I don't get a /dev entry.  That may well be a problem.

----------

## lalebarde

Hello NeddySeagoon,

 *Quote:*   

> do you have parallel port support in your kernel ?

 Yes

 *Quote:*   

> Having a /dev/lp0 or a symlink pointing to a real /dev file would be encoraging.

 Could you precise please, I don't see what I should shake.

```
PCTRAVAIL ~ # ll /dev/lp0

crw-rw---- 1 root lp 6, 0 jun 25  2007 /dev/lp0
```

Oups   :Embarassed:  nobody was in the lp group except lp itself. After modification, it  is still the same. Possibly I have to reboot.

About parport :

```
PCTRAVAIL ~ # dmesg | grep parport

parport: PnPBIOS parport detected.

parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE]

lp0: using parport0 (interrupt-driven).
```

I reboot and come back....

kernelOfTruth,

Thanks you for your help. I am going to try too.

----------

## NeddySeagoon

lalebarde,

You have to log out and back in again to pick up new group memberships. A reboot is not required

----------

## lalebarde

I have rebooted (I read your message after). Nothing is changed. 

kernelOfTruth, it seems I cannot try your idea : my canon bj200 is not in the list of supported printers - it is probably too old !

http://gutenprint.sourceforge.net/p_Supported_Printers.php3

----------

## lalebarde

Hello NeddySeagoon,

I have ordered an usb2parallel adaptor. In the time between I receive it, I propose to suspend. Then I will test the printer connected to a USB port. Possibly I will have a parallel test feature.

I will inform you and at this point I do thank you very much for your help.

See you,

lalebarde.

----------

## Brolin Empey

I was getting the same "404 Not Found" message from <http://localhost:631/>.  I looked through /var/log/cups/error_log and found this:

```

d [02/Jul/2007:19:22:44 -0700] get_file: 6 filename=/usr/share/cups/docs/ size=-1

D [02/Jul/2007:19:22:44 -0700] cupsdSendError: 6 code=404 (Not Found)

```

I checked /usr/share/cups/ and found that it did not contain a docs directory.  However, it did have an html directory, which contained an index.html file.  So, I symlinked docs to html.  <http://localhost:631/> works now!

This is strange because <http://localhost:631/> worked when I last used it a few weeks ago.  I do not know what has changed since then to cause it to break.

lalebarde: Can you check this?  I am curious to see if your problem is caused by a missing docs directory too.

----------

## alnramz

I just updated my entire system, including cups, and this problem appeared for me as well.

The Document root in my /etc/cups/cupsd.conf was set like this:

```
DocumentRoot /usr/share/cups/docs
```

But, like you, I do not have a docs/ directory, I have an html/ directory.  I changed it to:

```
DocumentRoot /usr/share/cups/html
```

and this fixed my problem.  

I am guessing at one point this HTML document tree was under the docs/ directory and at some point moved to be under the html/ directory but the default cupsd.conf in the emerge build was set to the wrong location.  Just a guess.

-alan

----------

## gerard27

Hi,

After reading this post I checked my cups files:

I have no "document root" or "filename =/usr/share/xx"in any of them.

I have had my share of problems with getting my printer going

but they were solved by installing the latest (masked) gimp-print.

I don't mean to say that that would solve your problem but I am

very curious about the cups issue.Without cups no printer.

In my case cups was installed june 12 2007.

Gerard.

----------

## lalebarde

The usb2parallel adaptor has changed nothing. I bought a new printer and it works.

----------

