Operating System - Linux
1819681 Members
3514 Online
109605 Solutions
New Discussion юеВ

connection problem with CUPS

 
SOLVED
Go to solution
Yong Shiuh Rong
Frequent Advisor

connection problem with CUPS

I try to setup network printer at my Linux machine. After finish setup, I try to print a testpage, but it gave me this message "The connection was refused when attempting to contact localhost.localdomain:631", what could be the problem?

I am using Redhat 9.0 and 2 HP network printer.
10 REPLIES 10
Mark Grant
Honored Contributor

Re: connection problem with CUPS

First thing I would check is that "cupsd" is actually running. If not you will get a refused connection.

Never preceed any demonstration with anything more predictive than "watch this"
Paul Cross_1
Respected Contributor

Re: connection problem with CUPS

Just in case you need the same answer twice, the CUPS daemon responds to port 631 requests, no cups daemon, no administration page, no cups services.
Steven E. Protter
Exalted Contributor

Re: connection problem with CUPS

It could also be another issue. The firewall.

The standard iptables firewall isntall does not allow traffic on port 613.

You can add it to the fireall configuration at install, but the configuration of iptables is not automatically adjusted by the install. You have to do it yourself.

/etc/sysconfig/iptables

service iptables stop

try again. If it works you know its a firewall issue.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yong Shiuh Rong
Frequent Advisor

Re: connection problem with CUPS

cupsd is running, I can't find any iptables under /etc/sysconfig/

I am using HP laserjet 1200 with HP Jetdirect 300x and HP Deskjet 990cxi with HP Jetdirect 175x.

I login by using mozilla at localhost:631 to do the configuration. I choose IPP( internet printing protocol) and postscript driver for both my printers.

after the setting, when I try to test print, it prompt me the error. Sometime when I try to modify the printer setting, it will prompt me "the document contains no data."

I manage to set the same printer on my notebook by using the same setting, but not on my desktop.
Martin P.J. Zinser
Honored Contributor
Solution

Re: connection problem with CUPS

Hi,

poor mans approach. Do a telnet localhost 631 .
Does that connect ok? If yes cupsd is up and the firewall is ok to allow requests to cups.
If not either cups is not running or the firewall blocks you.

Greetings, Martin
Yong Shiuh Rong
Frequent Advisor

Re: connection problem with CUPS

Martin i can telnet 631 with no problem.
Mark Grant
Honored Contributor

Re: connection problem with CUPS

THat pretty much rules out the cupsd isn't running!

I would firstly try it with another browser.

If you have KDE installed, it has a print manager that can do everything the cupsd web server can, without using a web server. You could try that.

cups has an error log which is supposed to be in /var/log/cups but Red Hat could have put it anywhere by now.

You can increase the debug level by changing the "LogLevel" line in /etc/cups/cupsd.conf which might give you more information in your error log.

Never preceed any demonstration with anything more predictive than "watch this"
Yong Shiuh Rong
Frequent Advisor

Re: connection problem with CUPS

After reading through the error log, it shows me thousands of line on this message:
[12/Feb/2004: 15:50:16+0800 Possible DoS attack-more than 10 clients connecting from localhost."
Paul Cross_1
Respected Contributor

Re: connection problem with CUPS

Cups limits connections other than localhost by default. Try commenting the lines as follows in /etc/cups.conf (or wherever your conf file is) just for troubleshooting sake.

## Restrict access to local domain
#Order Deny,Allow
#Deny From All
#Allow From 127.0.0.1

these lines are generally at the end of the file.
Martin P.J. Zinser
Honored Contributor

Re: connection problem with CUPS

Hello Yong,

you might also want to try to telnet to your two printers to make sure you can reach them from your PC. Usually to talk on port 9100, but since you have them working on another system you will know for sure.

Greetings, Martin