LINUX.ORG.RU

Cups как принт-сервер. «Unable to connect to server »


0

0

Уже 9 часов как пытаюсь в своей локальной сети (хе, состоящей из двух компов соединённых напрямую) открыть доступ от одного cups'а (под AltLinux, в данном случае клиент) к другому (Arch, --//-- сервер).
Из под Arch всё печатает, пинги идут, сервер через клиента ходит в интернет (т.е. проблем с настрокой самого принтера и сети не должно быть).
Проблема в следующем: клиент ни в какую не видит сервер с его принтерами, хотя уже на третий раз прописал всё как надо (а точнее как советуют все статьи что я нашёл и все мои...3 книги :) ), но всё равно "не выходит каменный цветок"...

На клиенте пишет следующее:
[root@localhost rap-kasta]# LANG=C lpstat -v
lpstat: Unable to connect to server

На сервере в логах тишина (по крайней мере я это считаю тишиной, до этого были проблемы с Avahi и DNS-DS, но запуск авахи их поправил таки :-) )

Вот конфиги:

++Сервер
bash-3.2# cat cupsd.conf
#
# "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z 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 localhost:631
Listen *:631

Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAddress @IF(eth0)
BrowseAllow 192.168.0.*

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

# Restrict access to the server...
<Location />
Order allow,deny
Allow From localhost
Allow From 192.168.0.1
</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>

#
# End of "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $".
#

++Клиент
[root@localhost rap-kasta]# cat /etc/cups/cupsd.conf
#                                                   
# "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z 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 info                                                        

# Administrator user group...
SystemGroup sys root         


# 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                             

#ServerName localhost
#ServerName 192.168.0.2

# 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>

#
# End of "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $".
#

[root@localhost rap-kasta]# cat /etc/cups/client.conf
ServerName 192.168.0.2:631


rap-kasta
() автор топика
Ответ на: комментарий от rap-kasta

Вот "голые логи", т.е. логи удалил и cups'ы перезапустил (оба, на сервере включен debug режим).

++Сервер
bash-3.2# cat /var/log/cups/error_log 
I [29/Apr/2009:19:22:06 +0600] Saving job cache file "/var/cache/cups/job.cache"...
I [29/Apr/2009:19:22:07 +0600] Listening to 0.0.0.0:631 (IPv4)
I [29/Apr/2009:19:22:07 +0600] Listening to :::631 (IPv6)
I [29/Apr/2009:19:22:07 +0600] Listening to /var/run/cups/cups.sock (Domain)
I [29/Apr/2009:19:22:07 +0600] Remote access is enabled.
I [29/Apr/2009:19:22:07 +0600] Loaded configuration file "/etc/cups/cupsd.conf"
I [29/Apr/2009:19:22:07 +0600] Using default TempDir of /var/spool/cups/tmp...
I [29/Apr/2009:19:22:07 +0600] Configured for up to 100 clients.
I [29/Apr/2009:19:22:07 +0600] Allowing up to 100 client connections per host.
I [29/Apr/2009:19:22:07 +0600] Using policy "default" as the default!
I [29/Apr/2009:19:22:07 +0600] Full reload is required.
I [29/Apr/2009:19:22:07 +0600] Loaded MIME database from '/etc/cups': 35 types, 40 filters...
D [29/Apr/2009:19:22:07 +0600] Loading printer Samsung_ML-1210...
*** WARNING *** The program 'cupsd' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=cupsd>
I [29/Apr/2009:19:22:07 +0600] Loading job cache file "/var/cache/cups/job.cache"...
D [29/Apr/2009:19:22:07 +0600] [Job 1] Loading from cache...
D [29/Apr/2009:19:22:07 +0600] [Job 2] Loading from cache...
D [29/Apr/2009:19:22:07 +0600] [Job 3] Loading from cache...
D [29/Apr/2009:19:22:07 +0600] [Job 4] Loading from cache...
D [29/Apr/2009:19:22:07 +0600] [Job 5] Loading from cache...
D [29/Apr/2009:19:22:07 +0600] [Job 6] Loading from cache...
I [29/Apr/2009:19:22:07 +0600] Full reload complete.
I [29/Apr/2009:19:22:07 +0600] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [29/Apr/2009:19:22:07 +0600] Listening to 0.0.0.0:631 on fd 8...
I [29/Apr/2009:19:22:07 +0600] Listening to :::631 on fd 9...
I [29/Apr/2009:19:22:07 +0600] Listening to /var/run/cups/cups.sock on fd 10...
I [29/Apr/2009:19:22:07 +0600] Resuming new connection processing...
E [29/Apr/2009:19:22:07 +0600] Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported
D [29/Apr/2009:19:22:07 +0600] Discarding unused server-started event...
D [29/Apr/2009:19:22:07 +0600] Report: clients=0
D [29/Apr/2009:19:22:07 +0600] Report: jobs=6
D [29/Apr/2009:19:22:07 +0600] Report: jobs-active=0
D [29/Apr/2009:19:22:07 +0600] Report: printers=1
D [29/Apr/2009:19:22:07 +0600] Report: printers-implicit=0
D [29/Apr/2009:19:22:07 +0600] Report: stringpool-string-count=308
D [29/Apr/2009:19:22:07 +0600] Report: stringpool-alloc-bytes=6816
D [29/Apr/2009:19:22:07 +0600] Report: stringpool-total-bytes=6312
D [29/Apr/2009:19:22:08 +0600] cupsdNetIFUpdate: "lo" = localhost:631
D [29/Apr/2009:19:22:08 +0600] cupsdNetIFUpdate: "eth0" = 192.168.0.2:631
D [29/Apr/2009:19:22:08 +0600] cupsdNetIFUpdate: "lo" = localhost:631
D [29/Apr/2009:19:22:08 +0600] cupsdNetIFUpdate: "eth0" = fe80::204:61ff:fe60:6b09%eth0:631

++Клиент
[root@localhost rap-kasta]# cat /var/log/cups/error_log
I [29/Apr/2009:19:11:50 +0600] Saving job cache file "/var/cache/cups/job.cache"...
I [29/Apr/2009:19:11:50 +0600] Listening to ::1:631 (IPv6)
I [29/Apr/2009:19:11:50 +0600] Listening to 127.0.0.1:631 (IPv4)
I [29/Apr/2009:19:11:50 +0600] Listening to /var/run/cups/cups.sock (Domain)
I [29/Apr/2009:19:11:50 +0600] Remote access is disabled.
I [29/Apr/2009:19:11:50 +0600] Loaded configuration file "/etc/cups/cupsd.conf"
I [29/Apr/2009:19:11:50 +0600] Using default TempDir of /var/spool/cups/tmp...
I [29/Apr/2009:19:11:50 +0600] Configured for up to 100 clients.
I [29/Apr/2009:19:11:50 +0600] Allowing up to 100 client connections per host.
I [29/Apr/2009:19:11:50 +0600] Using policy "default" as the default!
I [29/Apr/2009:19:11:50 +0600] Full reload is required.
I [29/Apr/2009:19:11:50 +0600] Loaded MIME database from '/etc/cups': 35 types, 39 filters...
I [29/Apr/2009:19:11:50 +0600] Loading job cache file "/var/cache/cups/job.cache"...
I [29/Apr/2009:19:11:50 +0600] Full reload complete.
I [29/Apr/2009:19:11:50 +0600] Cleaning out old temporary files in "/var/spool/cups/tmp"...
E [29/Apr/2009:19:11:50 +0600] Unable to open listen socket for address ::1:631 - Address family not supported by protocol.
I [29/Apr/2009:19:11:50 +0600] Listening to 127.0.0.1:631 on fd 3...
I [29/Apr/2009:19:11:50 +0600] Listening to /var/run/cups/cups.sock on fd 4...
I [29/Apr/2009:19:11:50 +0600] Resuming new connection processing...
E [29/Apr/2009:19:11:50 +0600] Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported



!(В этом логе меня настораживает Remote access is disabled, но мой мозг подсказывает мне что это он говорит о входящих соединениях)

+Ах да, в веб-мордочку сервера (http://192.168.0.2:631) пускает с клиента 

rap-kasta
() автор топика
Ответ на: комментарий от rap-kasta

Методом научных извращений было выясненно, что lpstat -v пытается достучаться до днс-прова...непонятно зачем и мне пока непонятно как с этим бороться...

udp        0      0 dyn-54-8.e-sky.ru:52828     ns1.e-sky.ru:domain         ESTABLISHED 11786/lpstat
udp        0      0 dyn-54-8.e-sky.ru:38202     ns1.e-sky.ru:domain         ESTABLISHED 11792/lpstat

rap-kasta
() автор топика
Ответ на: комментарий от rap-kasta

Рецепт.
Поднимаем на локалхосте cups. Заново, начисто, чтобы старых косяков не осталось.
Печатаем.
Идем в http://localhost:631/admin
Ставим галку в "Share published printers connected to this system"
Применяем изменения.

На соседнем компе, клиенте, cups сносим нафиг. Cups ставить на клиенте для печати вообще не надо !!!, достаточно иметь libcups*. А эти либы уже, наверное, есть.

На клиенте заводим 1 (один) файлик:
$ cat /etc/cups/client.conf
ServerName 192.168.1.10

Айпишник пропишите своего cups сервера.
Открываем чегонить в браузере. Жмем "Печать". Выбираем внезапно появившийся удалённый принтер. Печатаем.

Курим маны и конфиги и думаем, как оно работает.

kilolife ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.