CUPS 1.3.5: 'connection refused' when trying to print from thecommandline...

Evan Bradley ebradley at williams-int.com
Fri Jan 11 13:10:39 PST 2008


> Evan Bradley wrote:
> > Hi Helge,
> >
> > Thanks for the reply!
> >
> > Here is the output of the 'svcs | grep print' command:
> >
> >
> > [517-root at unixbuild-/opt/cups/1.3.5/etc/cups] svcs | grep print
> > online         Nov_27   svc:/application/cde-printinfo:default
> > offline        Nov_27   svc:/application/print/ipp-listener:default
> >
> >
> > It appears as if the ipp-listener is already disabled, and the rfc1179 service isn't even found.
> >
> >
> > Evan
> >
> >
> >
> >
> >>Evan Bradley wrote:
> >>
> >>>Hello,
> >>>
> >>>I am testing the 1.3.5 version of CUPS on a Sun Blade 1000 loaded with Solaris 10.  CUPS is installed in /opt/cups/1.3.5 and GPL Ghostscript 8.6.1 is installed in /opt/ghostscript/8.6.1
> >>>
> >>>I've copied the etc/cupsd.conf, etc/ppd and share/model files from our production CUPS installation into their respective places in the /opt/cups/1.3.5 tree; as well as the pstoraster.convs file from the Ghostscript 8.6.1 installation into /opt/cups/1.3.5/etc as well.
> >>>
> >>>
> >>>The web interface works just fine, in that I can connect to it, add printers, and print test pages.  The problem occurs when I attempt to use the lp or lpstat commands found in /opt/cups/1.3.5/bin from the command line:
> >>>
> >>>[code]
> >>>[496-root at unixbuild-/opt/cups/1.3.5/bin] ps -aef | grep cups
> >>>    root 24913     1   0 10:55:53 ?           0:02 /opt/cups/1.3.5/sbin/cupsd
> >>>
> >>>[497-root at unixbuild-/opt/cups/1.3.5/bin] ./lpstat -a
> >>>/lpstat: Unable to connect to server
> >>>
> >>>[513-root at unixbuild-/opt/cups/1.3.5/bin] ./lp -d misq2 /u/eb1850/Documents/Misc/konstruct-error.txt
> >>>/lp: Connection refused
> >>>[/code]
> >>>
> >>>The log level is set to 'debug', but none of the logs have any info regarding this condition.  I can post any of the conf files or log files if they would be helpful.
> >>>
> >>>Any help would be greatly appreciated, as this is preventing us from upgrading from our production version (1.1.23) of CUPS.
> >>>
> >>>Thanks in advance,
> >>>
> >>>
> >>>Evan
> >>
> >>Did you properly disable the native spool system of Solaris?
> >>Since Solaris 10, the native spooler runs an ipp listener.
> >>
> >>To see if they are running, execute
> >>
> >>svcs | grep print
> >>
> >>which will return something like
> >>
> >>online         Sep_14   svc:/application/print/cleanup:default
> >>online         Sep_14   svc:/application/cde-printinfo:default
> >>offline        Sep_14   svc:/application/print/ipp-listener:default
> >>offline        Sep_14   svc:/application/print/rfc1179:default
> >>
> >>Tu successfully run CUPS on this machine, the last two *must be* disabled
> >>using the command
> >>
> >>svcadm disable svc:/application/print/ipp-listener:default
> >>svcadm disable svc:/application/print/rfc1179:default
> >>
> >>Then restart CUPS.
> >>
> >>Helge
> >>
> >>--
> >>Helge Blischke
> >>Softwareentwicklung
> >>
> >>H.Blischke at acm.org
> >
> >
> What does your cupsd.conf look like?
> You cannot simmply copy it over from 1.1.x.
>
> Helge
>
>
> --
> Helge Blischke
> Softwareentwicklung
>
> H.Blischke at acm.org

You're right...I was mistaken earlier.  The cupsd.conf file wasn't copied from the production 1.1.23 version, but from an earlier test installation of CUPS 1.2.4.

Please note that I have changed the name of the machines in the Allow sections.

#
# "$Id: cupsd.conf.in 6720 2007-07-25 00:40:03Z mike $"
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.  See "man cupsd.conf" for a complete description of this
#   file.
#

# Log general information in error_log - change "info" to "debug" for
# troubleshooting...
LogLevel debug

# Administrator user group...
SystemGroup sys root


# Only listen for connections from the local machine.
Listen 632

# Host name lookups:  Whether or not to do lookups on IP addresses to get a FQHN.  Defaults to Off for performance reasons.
HostNameLookups On
# Show shared printers on the local network.
Browsing Off
#--------------------------------------------------
# BrowseOrder allow,deny
# BrowseAllow all
# BrowsePoll server.domain.com:631
# BrowseInterval 30
# BrowseProtocols cups
# BrowseShortNames Yes
#--------------------------------------------------

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

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow all
</Location>

# Restrict access to the admin pages...
<Location /admin>
#  Encryption Required
  Order allow,deny
  Allow all
  Allow localhost
    Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
   Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
</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
 Allow localhost
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  </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 Basic
    Require user @SYSTEM
 Allow localhost
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
    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
 Allow localhost
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  </Limit>

  <Limit All>
    Order deny,allow
 Allow localhost
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  Allow machinename.domain.com
  </Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 6720 2007-07-25 00:40:03Z mike $".
#

Thanks,

Evan




More information about the cups mailing list