# cups gone mad

## Mgiese

hi there,

cups was working fine for 6 months. but after upgrading to 1.3.7 i just can connect to http://127.0.0.1:631/. if i click then some link it takes hours and nothing happens... any ideas ? thx a lot

----------

## cyrillic

I just clicked on your link with firefox, and it worked for me.

I have net-print/cups-1.3.7-r1 currently installed.

Are you sure /etc/init.d/cupsd is currently running ?

Do you have any firewall rules that might be blocking it ?

Have you tried a different browser (links, etc.) ?

----------

## Ryhajlo

 *cyrillic wrote:*   

> I just clicked on your link with firefox, and it worked for me.
> 
> I have net-print/cups-1.3.7-r1 currently installed.
> 
> Are you sure /etc/init.d/cupsd is currently running ?
> ...

 

LOL, that was 127.0.0.1, Sorry I couldn't help myself.  :Wink: 

But also see if anything else is using that port.

----------

## Mgiese

i have 1.3.7-r1, too.

no i have no firewall and i tried it with konqueror. it is the same there.

i am lost...

----------

## Voltago

What does

```
cat cupsd.conf | grep listen -i
```

say? Did you run etc-update?

----------

## Mgiese

 *Voltago wrote:*   

> What does
> 
> ```
> cat cupsd.conf | grep listen -i
> ```
> ...

 

```
# Only listen for connections from the local machine.

# Listen localhost:631

# Listen /var/run/cups/cups.sock

```

yes i did run etc-update..

----------

## Voltago

Ok, so your cups server does not listen to a socket or a specific interface. Is there an entry 'Port 631'? If not, add

```
Listen localhost:631

Listen /var/run/cups/cups.sock
```

to your cupsd.conf. Also check if the access permissions are correct. Here is my cupsd.conf for reference.

```

LogLevel info

# Administrator user group...

SystemGroup lpadmin

# Only listen for connections from the local machine.

Listen localhost:631

Listen /var/run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseOrder allow,deny

BrowseAllow all

# Default authentication type, when authentication is required...

DefaultAuthType Basic

# Restrict access to the server...

<Location />

  Order allow,deny

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Encryption Required

  Order allow,deny

</Location>

# Restrict access to configuration files...

<Location /admin/conf>

  AuthType Default

  Require user @SYSTEM

  Order allow,deny

</Location>

# Set the default printer/job policies...

<Policy default>

  # Job-related operations must be done by the owner or an administrator...

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  # All administration operations require an administrator to authenticate...

  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # All printer operations require a printer operator to authenticate...

  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>

    AuthType Default

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>

```

----------

## nixnut

Moved from Installing Gentoo to Networking & Security.

Not about getting gentoo installed, so moved here.

----------

## Mgiese

 *Voltago wrote:*   

> Ok, so your cups server does not listen to a socket or a specific interface. Is there an entry 'Port 631'? If not, add
> 
> ```
> Listen localhost:631
> 
> ...

 

i took your config, restarted cups and now :

```
Unable to connect

Firefox can't establish a connection to the server at 127.0.0.1:631.
```

before i had the entry Port:631..

----------

## Mgiese

problem is still the same and not solved...  :Sad: 

----------

## Mgiese

moep moep moep. i need help here, cups is a very important application  !!!!

thx in advance

----------

## olger901

I've had about the same problem with cups on a clean install. For me it hung when I tried to switch to an SSL enabled connection with cups.

The following solution could fix your problem as well:

1. Generate a SSL certificate (crt) and key file and copy it to /etc/cups/ssl

2. Restart cups

3. Clear your cache, cookies etc... and exit your browser

4. Try to connect again

----------

## Mgiese

thanks a lot, but how do i create the SSL certificate (crt) ??

bye

----------

## olger901

 *Mgiese wrote:*   

> thanks a lot, but how do i create the SSL certificate (crt) ??
> 
> bye

 

Follow the following steps and enter the data when asked. (Enter a domain name for the common name)

```

openssl genrsa -out server.key 1024

openssl rsa -in server.key -out server.pem

openssl req -new -key server.pem -out server.csr 

openssl x509 -req -days 365 -in server.csr -signkey server.pem -out server.crt

```

----------

