Cannot get through to localhost:631

Hi
I have a fresh openSUSE 11.1 Gnome 64 bit install. I’ve installed some drivers for a brother printer that works fine to date in all prior 32 bit openSUSE installs.
I’m trying to get into the cups admin GUI on browser address

http://localhost:631

but I get only the Firefox error page as follows:

Failed to Connect
Firefox can’t establish a connection to the server at localhost:631.
Though the site seems valid, the browser was unable to establish a connection.

The firewall allows cups and I also have rcSuSEfirewall2 stopped.
The cups daemon is running (sudo /usr/sbin/rccups status returns “running”).

What can be my problem.

What do the following return?

netstat -atn | grep 631
host localhost
grep localhost /etc/hosts

Here they are:

john@suse111g:~> netstat -atn | grep 631
john@suse111g:~>

john@suse111g:~> host localhost
localhost has address 127.0.0.1
Host localhost not found: 3(NXDOMAIN)
Host localhost not found: 3(NXDOMAIN)

john@suse111g:~> grep localhost /etc/hosts
::1 localhost ipv6-localhost ipv6-loopback
john@suse111g:~>

Thanks

Cups is not listening on port 631.

Do you have the following entry in /etc/cups/cupsd.conf?

Only listen for connections from the local machine.

Listen localhost:631

I’ve got this:

# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

I get this

grep localhost /etc/hosts
127.0.0.1 localhost
::1 localhost ipv6-localhost ipv6-loopback

and in my /etc/hosts config I have

IP-Address Full-Qualified-Hostname Short-Hostname

127.0.0.1 localhost

special IPv6 addresses

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 linux.site linux

Is your localhost entry missing or commented out by any chance?

PS: At the limit of my knowledge here.

It looks as if

127.0.0.1       localhost

is missing from your /etc/hosts.

and

boven:~ # netstat -atnp | grep 631
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN      3624/cupsd
boven:~ #

should be like this.

Thasnks guys.
I found this line in /etc/hosts:

127.0.0.1   nil

so I edited it to this:

127.0.0.1   localhost

And I rebooted. Then I looked at /etc/hosts again and it had reverted to this:

127.0.0.1     nil

Any clues?

It is similar to this recent thread. Not sure what the cause would be - Its new to me.

A bug?

cups deamon not accessable - openSUSE Forums

[opensuse] localhost and 127.0.0.1](http://linux.derkeiler.com/Mailing-Lists/SuSE/2009-06/msg00354.html)

Maybe try adding

127.0.0.1 localhost

and leave the nil entry alone. Then see what happens (next boot).

Changing to ‘localhost’ by editor and

chmod a-w /etc/hosts

should stop changing the file again. Reboot and check *dmesg *to see who complains. Let the culprit reveal himself >:)

I remember somebody else also had a problem with YaST host setup putting nil where localhost should be. Not sure how to find that posting though.

deano ferrari wrote:

> A bug?

Indeed…

Bug 502922 - /etc/hosts gets corrupted
https://bugzilla.novell.com/show_bug.cgi?id=502922

Greetings,


Camaleón

I am a little ashamed :shame: to say that I took the easy way out and reinstalled (the root partition only). That was an option only because the install was 1/2 a day old and nothing much would be lost. http://localhost:631 worked straight up.

Thanks very much for the help.

So we will never, never know who did it :frowning: :frowning:

So we will never, never know who did it

I was looking forward to this as well. Its like not seeing the end of an intriguing movie. I’ve read rumours that networkmanager or even yast may be involved (if you look at bug report discussions).

OK, you guys wand a challenge? Have a go at this:
How to resurrect my /home partition - openSUSE Forums

On Wed, 15 Jul 2009 06:36:02 GMT, swerdna
<swerdna@no-mx.forums.opensuse.org> wrote:

>
>OK, you guys wand a challenge? Have a go at this:
>‘How to resurrect my /home partition - openSUSE Forums’
>(http://tinyurl.com/ll8fsc)

I took a look. You are right, it is command line time. Never thought
the day where i knew something that the regs didn’t.

Before begriming, read up on dd and parted. dd in particular can be
very dangerous, calculate the sector address 5 times for source and
destination. Also read the whole method first and refer back to dd
and parted documentation to clarify

First. Command line time, i presume that you know how to get there
and can start a su session.

Second. Create a 21 GiB Linux volume on an external disk. Use dd to
copy the old home inside of it, this is the backup

Third. Use parted to create a new linux volume in the 34 GiB free
space after sda8, and dd a copy of old home inside there also. This
will be the working copy.

Fourth. Use parted to deallocate the volume after sda8, followed by
asking parted to recover a volume just inside the limits of the
working copy.

Fifth. Backup and verify the just recovered partition carefully.

Sixth. If this recovered partition is very clean, try using parted to
recover the original partition.
If not back up everything that is usable form on another drive and
copy the step 2 backup over the top of the working copy just beyond
sda8.

Seventh. If either recovered partition is very clean you are done.
Otherwise try using parted to copy the best recovered part over a
formatted old home partition, and continue with piecemeal repairs.

I realize that this is not all that clear. Just the same happy
hunting.

I took a look. You are right, it is command line time. Never thought
the day where i knew something that the regs didn’t.

Looks like you didn’t know how to post to correct thread… anyway John’s sorted the problem now :slight_smile: