cups не печатает (крокодил не ловится, не растет кокос)

Knoppix

Модераторы: Warderer, Модераторы разделов

Аватара пользователя
SLEDopit
Модератор
Сообщения: 4824
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

cups не печатает

Сообщение SLEDopit »

Довольно долго уже бьюсь с несчастными принтерами (нормальная печать в линуксах - миф? (: )
Собственно есть 2 принтера: hp1018 и hp1025nw. Что один, что другой - не печатают.
В /var/log/cups/error_log упорно пишется:

Код: Выделить всё

E [10/Aug/2011:01:28:08 +0400] [CGI] Saw EOF, expected '}'!
E [10/Aug/2011:01:28:11 +0400] [CGI] Saw EOF, expected '}'!
E [10/Aug/2011:01:28:16 +0400] [CGI] Saw EOF, expected '}'!
E [10/Aug/2011:01:28:18 +0400] [CGI] Saw EOF, expected '}'!
E [10/Aug/2011:01:28:21 +0400] [CGI] Saw EOF, expected '}'!
E [10/Aug/2011:01:28:23 +0400] [CGI] Saw EOF, expected '}'!

Ставить пытался как с дровами от hplip с проприетарным плагиным, так и с foo2zjs (пробовал как и из репозитория, так и собранный с офф. сайта). Ни один из них по-человечески не работает.
От версии капса так же ничего не зависит: одинаково не работает и 1.5.0 из experimental'a, и 1.4 из сидов/тестингов/стейблов (даже из олдстейбла не завелся).
Печать не идет, капс просто проглатывает задание и радостно рапортует об успешно распечатанной странице, которую я, естественно не получаю.
Помимо того, что просто не печатает, капс еще и не хочет вещать свои принтеры на соседние системы, несмотря на то, что все системы явно инструктированы отображать расшаренные принтеры.
Если добавлять на удаленных системах принтеры руками, то задания так же просто глотаются.
Как научить их всех меня слушаться печатать, я уже не знаю. Прошу совета.

ps. конфиг капса:

Код: Выделить всё

LogLevel warn
MaxLogSize 0
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Share local printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseRemoteProtocols
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS dnssd
DefaultAuthType Basic
WebInterface Yes
<Location />
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow @LOCAL
</Location>
<Policy default>
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    Order deny,allow
  </Limit>
  <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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
  </Limit>
  <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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <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>
  <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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
конфиг принтеров:

Код: Выделить всё

# Printer configuration file for CUPS v1.5.0
# Written by cupsd
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<Printer HP_LaserJet_1018>
UUID urn:uuid:a1e0a762-b882-3b99-53ad-bc20b386c195
Info HP_LaserJet_1018
Location Office
MakeModel HP LaserJet 1018 Foomatic/foo2zjs-z1 (recommended)
DeviceURI usb://HP/LaserJet%201018?serial=KP1SV62
State Idle
StateTime 1312925295
Type 8425476
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
<Printer HP_LaserJet_CP1025nw>
UUID urn:uuid:affb674f-cc12-3267-7bfc-3542742fdb7b
Info HP_LaserJet_CP1025nw
Location oFFice
MakeModel HP LaserJet cp1028nw, hpcups 3.11.5, requires proprietary plugin
DeviceURI hp:/usb/HP_LaserJet_CP1025nw?serial=00000SV028TFS
State Idle
StateTime 1312923537
Type 36876
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
тест hplip:

Код: Выделить всё

 hp-check -r

HP Linux Imaging and Printing System (ver. 3.11.5)
Dependency/Version Check Utility ver. 14.3

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait...
\/usr/lib/python2.6/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux leko 3.0.0-rc6-amd64 #1 SMP Tue Jul 5 09:30:35 UTC 2011 x86_64 GNU/Linux

Distribution:
debian 0.0

Checking Python version...
OK, version 2.6.7 installed

Checking PyQt 4.x version...
OK, version 4.8.3 installed.

Checking for CUPS...
Status: scheduler is running
warning: Version: (cups-config) Not available. Unable to determine installed version of CUPS.)
error_log is set to level: warn

Checking for dbus/python-dbus...
dbus daemon is running.
python-dbus version: 0.84.0


------------------------
| RUNTIME DEPENDENCIES |
------------------------


Checking for dependency: CUPS - Common Unix Printing System...
OK, found.

Checking for dependency: CUPS DDK - CUPS driver development kit...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: PolicyKit - Administrative policy framework...
OK, found.

Checking for dependency: PyQt 4 DBus - DBus Support for PyQt4...
OK, found.

Checking for dependency: Python DBus - Python bindings for DBus...
OK, found.

Checking for dependency: Python libnotify - Python bindings for the libnotify Desktop notifications...
OK, found.

Checking for dependency: Python XML libraries...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.


----------------------
| HPLIP INSTALLATION |
----------------------


Currently installed HPLIP version...
HPLIP 3.11.5 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.11.5

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip-doc/HTML
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.11.5
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=yes
hpijs-only-build=no
lite-build=no
udev-acl-rules=yes
hpcups-only-build=no
hpijs-only-build=no


Current contents of '/var/lib/hp/hplip.state' file:
[plugin]
eula = 1
installed = 1



Current contents of '~/.hplip/hplip.conf' file:
error: Could not access file: No such file or directory

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

  Device URI                                         Model
  -------------------------------------------------  -----------------------------------------------
  hp:/usb/HP_LaserJet_CP1025nw?serial=00000SV028TFS  HP LaserJet CP1025nw
  hp:/usb/HP_LaserJet_1018?serial=KP1SV62            HP LaserJet 1018

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------


HP_LaserJet_1018
----------------
Type: Unknown
Device URI: usb://HP/LaserJet%201018?serial=KP1SV62
PPD: /etc/cups/ppd/HP_LaserJet_1018.ppd
PPD Description: HP LaserJet 1018 Foomatic/foo2zjs-z1 (recommended)
Printer status: printer HP_LaserJet_1018 is idle.  enabled since Wed 10 Aug 2011 01:28:15 AM MSK
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend to function in HPLIP.

HP_LaserJet_CP1025nw
--------------------
Type: Printer
Device URI: hp:/usb/HP_LaserJet_CP1025nw?serial=00000SV028TFS
PPD: /etc/cups/ppd/HP_LaserJet_CP1025nw.ppd
PPD Description: HP LaserJet cp1028nw, hpcups 3.11.5, requires proprietary plugin
Printer status: printer HP_LaserJet_CP1025nw is idle.  enabled since Wed 10 Aug 2011 12:58:57 AM MSK
Required plug-in status: Installed
Communication status: Good


----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
'hpaio' in '/etc/sane.d/dll.d/hplip'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...


---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.



-----------------
| USB I/O SETUP |
-----------------

Checking for permissions of USB attached printers...

HP Device 0x4117 at 001:002:
    Device URI: hp:/usb/HP_LaserJet_1018?serial=KP1SV62
    Device node: /dev/bus/usb/001/002
    Mode: 0666
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/002
# owner: root
# group: lp
user::rw-
group::rw-
other::rw-



HP Device 0xb2a at 001:003:
    Device URI: hp:/usb/HP_LaserJet_CP1025nw?serial=00000SV028TFS
    Device node: /dev/bus/usb/001/003
    Mode: 0666
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/001/003
# owner: root
# group: lp
user::rw-
group::rw-
other::rw-



---------------
| USER GROUPS |
---------------

user lp lpadmin

User member of group 'lp'. Enables print/ scan/ fax.
User member of group 'lpadmin'.

-----------
| SUMMARY |
-----------

error: 2 errors and/or warnings.

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html


Done.
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
Аватара пользователя
DjSpike
Сообщения: 2265
Статус: в поисках истины
ОС: Lubuntu 12.04

Re: cups не печатает

Сообщение DjSpike »

Не знаю что у тебя за проблема, но у меня 1018 что на Мандриве, что сейчас на убунту работает без проблем.
AvReg - По для организации Видеонаблюдения на Linux.
ДЭНСИ:КАССА - Рабочее место кассира под Linux.
Терминальные решения под Linux
Консультации по установке 1с+PostgreSQL+Ubuntu.
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU

Re: cups не печатает

Сообщение sash-kan »

SLEDopit писал(а):
10.08.2011 01:43
Помимо того, что просто не печатает, капс еще и не хочет вещать свои принтеры на соседние системы, несмотря на то, что все системы явно инструктированы отображать расшаренные принтеры.
запрещён где-нибудь broadcasting?
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
Аватара пользователя
SLEDopit
Модератор
Сообщения: 4824
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: cups не печатает

Сообщение SLEDopit »

DjSpike писал(а):
10.08.2011 09:31
Не знаю что у тебя за проблема, но у меня 1018 что на Мандриве, что сейчас на убунту работает без проблем.
Весьма благодарен за столь ценный совет. Дома у меня тоже все работает, но тут затыка и решить ее у меня не получается. Иначе я бы и не писал этот топик.
sash-kan писал(а):
10.08.2011 14:52
запрещён где-нибудь broadcasting?
Никак нет. В самом начале броадкастинг был, но пропал после того, как я удалил и заново создал принтеры. Галку "расшаренный принтер" в капсе я отмечал.
Хм, хотя примерно в тот же момент на этой же машине встал ксен и я сделал бридж на используемый интерфейс. Может это как-то влияет. Пойду потестирую.
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
Аватара пользователя
SLEDopit
Модератор
Сообщения: 4824
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: cups не печатает

Сообщение SLEDopit »

Ну собственно говоря, переставил принтер 1018 на другую машину и все завелось с полоборота.
Остался только спортивный интерес, почему не получается завести принтер именно на этой машинке.
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
BuxarNET
Сообщения: 73
ОС: С Mandriva ушел на MagOS

Re: cups не печатает

Сообщение BuxarNET »

У меня таже хрень с Мандривой 2010,2 и 2011
никак добиться работы не могу на обоих компах с МФУ М1212
Спасибо сказали: