Strona 1 z 1
					
				Cups nie działa przez przeglądarkę
				: 03 kwietnia 2009, 23:34
				autor: kubov
				Witam.
Mam problem z serwerem cups otóż nie działa on przez przeglądarkę. Na komputerze jest zainstalowany apache2, php5, mysql, cups, hplip, samba.
Log CUPS (error_log):
Kod: Zaznacz cały
E [04/Apr/2009:01:28:10 +0200] cupsdStartBrowsing: Unable to bind broadcast socket - Address already in use.
 
			
					
				
				: 04 kwietnia 2009, 00:15
				autor: panel
				Możesz próbować znaleźć to co zajmuje port 631, albo zmienić port w /etc/cups/cupsd.conf
			 
			
					
				
				: 04 kwietnia 2009, 11:16
				autor: kubov
				Dokonywałem już tych zmian. Niestety nadal nie działa.
EDIT
Dodałem wpis do pliku konfiguracyjnego cups o treści 
Listen 192.168.0.102:631, bo taki adres ma serwer i teraz otrzymuje wiadomość w przeglądarce:
wygląda mi to na brak dostępu do zasobów interfejsu przez przeglądarke. Wnioskuje to po tym logu:
access_log
Kod: Zaznacz cały
192.168.0.100 - - [04/Apr/2009:13:35:54 +0200] "GET / HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:54 +0200] "GET /cups.css HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:54 +0200] "GET /favicon.ico HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:55 +0200] "GET / HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:55 +0200] "GET /cups.css HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:55 +0200] "GET / HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:55 +0200] "GET /cups.css HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:58 +0200] "GET /favicon.ico HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:58 +0200] "GET /favicon.ico HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:35:58 +0200] "GET /favicon.ico HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:40:37 +0200] "GET / HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:40:37 +0200] "GET /cups.css HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:40:37 +0200] "GET /favicon.ico HTTP/1.1" 403 0 - -
192.168.0.100 - - [04/Apr/2009:13:40:41 +0200] "GET /favicon.ico HTTP/1.1" 403 0 - -
Ale niestety nie wiem gdzie te pliki się znajdują i czy nadanie im uprawnień przez 
chmod -R 777 * da zamierzony efekt.
EDIT2
Google działa. Dodałem wpis 
Allow 192.168.0.100 i działa. W razie dalszych problemów będę pisał.
EDIT3
Napotkałem kolejny problem. Otóż kiedy chce dodac drukarkę dostaje komunikat 
Kod: Zaznacz cały
426 Upgrade Required
Aby uzyskać dostęp do tej strony, użyj URL-a [url]https://192.168.0.102:631/admin[/url].
dodanie linijki 
DefaultEncryption Never niestety nie pomogło.
 
			
					
				
				: 04 kwietnia 2009, 12:09
				autor: silentwr
				kubov pisze:dodanie linijki DefaultEncryption Never niestety nie pomogło.
Zrestartowałeś cupsa?
 
			
					
				
				: 04 kwietnia 2009, 12:26
				autor: kubov
				oczywiście!
Znalazłem inną metodę:
Zainstalowałem openssl i wygenerowałem klucz 
Drukarka dodana, ale kiedy chce wydrukować stronę testową stan drukowania zmienia się z przetwarzanie na drukowanie i koniec.
może to wam coś powie bo ja nie wiem
error_log
Kod: Zaznacz cały
E [04/Apr/2009:14:20:44 +0200] PID 2612 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [04/Apr/2009:14:21:23 +0200] PID 2627 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [04/Apr/2009:14:23:46 +0200] PID 2644 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
E [04/Apr/2009:14:24:58 +0200] CUPS-Add-Modify-Printer: Unauthorized
E [04/Apr/2009:14:25:08 +0200] PID 2686 (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
EDIT
Dobra drukarka działa. Z poziomu www strona testowa idzie, ale udostępnić jej nie umiem. Pomoże mi ktoś?
EDIT2
Drukarka niby dodana tzn. windows ją widzi i dodaje bez problemu, ale żadne zadanie drukowania nie przechodzi:
smb.conf
Kod: Zaznacz cały
[global] 
workgroup = GRUPA_ROBOCZA
netbios name = debian
server string = serwer
interfaces = eth0
security = share 
character set = ISO8859-2 
client code page = 852 
encrypt passwords = yes 
smb passwd file = /etc/smbpass 
log file = /var/log/samba/log.%m 
log level = 2
max log size = 60 
load printers = yes 
local master = yes 
preferred master = yes 
os level = 200 
#wins support = yes 
host allow = all 
disable spoolss = Yes
show add printer wizard = No
printing = cups
wins support = no
[printers]
        comment = All Printers
        path = /tmp
        create mask = 0700
        printable = Yes
        browseable = Yes
[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers
[share] 
comment = folder udostepniony debian
path = /share 
create mask = 0777 
directory mask = 0777 
browsable = yes
writable = yes 
guest ok = yes
Kod: Zaznacz cały
DefaultEncryption Never
# Show general information in error_log.
LogLevel info
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  Encryption Required
  # Allow remote administration...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow @LOCAL
</Location>
<Policy default>
  <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>
  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes 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-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>
    AuthType Basic
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  # Only the owner or an administrator can cancel a job...
  <Limit Cancel-Job>
    Order deny,allow
    Require user @OWNER @SYSTEM
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
Printcap /var/run/cups/printcap
DefaultEncryption Never