Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[risolto]configurazione stampante
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Tue Mar 27, 2007 7:57 pm    Post subject: [risolto]configurazione stampante Reply with quote

Per installare la stampante, dopo aver configurato il kernel ho dato
Code:
emerge cups
rc-update add cupsd default
/etc/init.d/cupsd restart

come da guida (http://www.gentoo.org/doc/it/printing-howto.xml).
Provando a collegarmi ad http://localhost:631, appunto per configurare la stampante, non si riesce a caricare la pagina, e resta sempre in caricamento...avete idee??
Grazie!!


Last edited by simone-27 on Wed Mar 28, 2007 12:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1415
Location: <ud|me|ts> - Italy

PostPosted: Tue Mar 27, 2007 8:09 pm    Post subject: Reply with quote

Controlla di non avere firewall attivi, poi controlla la configurazione di cups, prova a guardare di avere il file /etc/cups/client.conf a posto. Il mio è così:
Code:
jarod ~ # cat /etc/cups/client.conf
ServerName localhost


/EDIT:
naturalmente devi avere anche:
Code:
jarod ~ # cat /etc/hosts |grep local
127.0.0.1       jarod.post.org jarod localhost.localdomain localhost

o qualcosa del genere...
_________________
LP
Back to top
View user's profile Send private message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Tue Mar 27, 2007 8:17 pm    Post subject: Reply with quote

Code:
localhost simone # cat /etc/cups/client.conf
cat: /etc/cups/client.conf: No such file or directory

allora ho creato /etc/cups/client.conf e ho aggiunto
Code:
ServerName localhost

ma il problema non persiste!!
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Tue Mar 27, 2007 8:20 pm    Post subject: Reply with quote

No, il file da configurare è /etc/cups/cupsd.conf. E' meglio se posti il suo contenuto, usa questo comando:
Code:

grep -vE '(^[[:space:]]*$|^[[:space:]]*(#|!|;|//))' /etc/cups/cupsd.conf

(Kernel78 docet 8) )
_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1415
Location: <ud|me|ts> - Italy

PostPosted: Tue Mar 27, 2007 8:22 pm    Post subject: Reply with quote

Le USE sono ok?
Le mie sono queste:
Code:
jarod ~ # eix cups -I
[D] net-print/cups
     Available versions:  1.1.23-r8 1.2.6 (~)1.2.7 (~)1.2.8
     Installed versions:  1.2.9(21:32:18 22/03/07)(X -dbus jpeg -ldap nls pam -php png ppds -samba -slp ssl tiff)
     Homepage:            http://www.cups.org/
     Description:         The Common Unix Printing System


a me con il cupsd.conf di default, il server da locale va che è una meraviglia....
_________________
LP
Back to top
View user's profile Send private message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Tue Mar 27, 2007 8:28 pm    Post subject: Reply with quote

Code:
localhost simone # grep -vE '(^[[:space:]]*$|^[[:space:]]*(#|!|;|//))' /etc/cups/cupsd.conf
LogLevel info
SystemGroup lpadmin
Listen localhost:631
Listen /var/run/cups/cups.sock
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
DefaultAuthType Basic
<Location />
  Order allow,deny
  Allow localhost
</Location>
<Location /admin>
  Encryption Required
  Order allow,deny
  Allow localhost
</Location>
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
</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 Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>


Le use sono queste
Code:
localhost simone # emerge -pv cups

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-print/cups-1.2.9  USE="X dbus jpeg nls pam ppds samba ssl -ldap -php -png -slp -tiff" 0 kB

grazie dell immediatezza!1
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Tue Mar 27, 2007 8:40 pm    Post subject: Reply with quote

Mah, la mia configurazione è precisa alla tua (ed è quella predefinita, fornita tramite l'ebuild ufficiale), e funziona tutto regolarmente.

Posta il contenuto di
Code:
/etc/hosts
e l'output di
Code:
netstat -na|grep :631
.

P.S. sicuro di non avere attivo qualche firewall locale?
_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Tue Mar 27, 2007 8:48 pm    Post subject: Reply with quote

sono dietro ad un router, potrebbe essere li il problema?dici che sia la porta bloccata?
Code:
localhost simone # grep -vE '(^[[:space:]]*$|^[[:space:]]*(#|!|;|//))' /etc/hosts
127.0.0.1       tux.homenetwork tux localhost

Code:
localhost simone # netstat -na|grep :631
udp        0      0 0.0.0.0:631             0.0.0.0:*
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1415
Location: <ud|me|ts> - Italy

PostPosted: Tue Mar 27, 2007 8:56 pm    Post subject: Reply with quote

il mio è così:
Code:
lucapost@jarod ~ $ netstat -na|grep :631
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN     
udp        0      0 0.0.0.0:631             0.0.0.0:*   


mi sa che devi aggiustare qualche regola di iptables....
_________________
LP
Back to top
View user's profile Send private message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Tue Mar 27, 2007 9:00 pm    Post subject: Reply with quote

quindi dici che non centra niente il router?Non potrebbe bloccare la porta?
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Tue Mar 27, 2007 9:02 pm    Post subject: Reply with quote

simone-27 wrote:
sono dietro ad un router, potrebbe essere li il problema?dici che sia la porta bloccata?

A meno che il router non sia la tua stessa macchina, non penso sia lì il problema (con "dietro ad un router" intendi che il tuo pc esce su Internet tramite un router esterno, giusto?)

Riavvia il servizio
Code:

/etc/init.d/cupsd restart

e posta le ultime 20 righe del log di CUPS
Code:

tail -20 /var/log/cups/error_log


Anch'io come lucapost ho una connessione TCP in ascolto, la cosa è un pò strana :?
_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Tue Mar 27, 2007 9:09 pm    Post subject: Reply with quote

in che senso a meno che non sia sulla mia stessa macchina?comunque si, sono collegato ad internel tramite router!

Code:
localhost simone # tail -20 /var/log/cups/error_log
I [27/Mar/2007:21:40:02 +0000] Listening to /var/run/cups/cups.sock on fd 2...
I [27/Mar/2007:23:08:27 +0000] Scheduler shutting down normally.
I [27/Mar/2007:23:08:27 +0000] Saving remote.cache...
I [27/Mar/2007:23:08:27 +0000] Saving job cache file "/var/cache/cups/job.cache"...
I [27/Mar/2007:23:08:27 +0000] Listening to 127.0.0.1:631 (IPv4)
I [27/Mar/2007:23:08:27 +0000] Listening to /var/run/cups/cups.sock (Domain)
I [27/Mar/2007:23:08:27 +0000] Loaded configuration file "/etc/cups/cupsd.conf"
W [27/Mar/2007:23:08:27 +0000] Repairing access permissions of "/etc/cups/ssl"
I [27/Mar/2007:23:08:27 +0000] Using default TempDir of /var/spool/cups/tmp...
W [27/Mar/2007:23:08:27 +0000] Repairing access permissions of "/var/spool/cups/tmp"
I [27/Mar/2007:23:08:27 +0000] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [27/Mar/2007:23:08:27 +0000] Configured for up to 100 clients.
I [27/Mar/2007:23:08:27 +0000] Allowing up to 100 client connections per host.
I [27/Mar/2007:23:08:27 +0000] Using policy "default" as the default!
I [27/Mar/2007:23:08:27 +0000] Full reload is required.
I [27/Mar/2007:23:08:27 +0000] Loaded MIME database from '/etc/cups': 34 types, 38 filters...
I [27/Mar/2007:23:08:27 +0000] Loading job cache file "/var/cache/cups/job.cache"...
I [27/Mar/2007:23:08:27 +0000] Full reload complete.
E [27/Mar/2007:23:08:27 +0000] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.
I [27/Mar/2007:23:08:27 +0000] Listening to /var/run/cups/cups.sock on fd 2...
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Tue Mar 27, 2007 9:26 pm    Post subject: Reply with quote

simone-27 wrote:
in che senso a meno che non sia sulla mia stessa macchina?comunque si, sono collegato ad internel tramite router!

Ipotizzavo che la macchina su cui lavori fungesse da router per la rete alla quale era collegata, ma poichè hai chiarito che non è cosi: no, non è un problema del tuo router :wink:

Il problema è qui
Code:

Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.

Il processo demone di cups (/usr/sbin/cupsd) trova la porta tcp 631 occupata, per cui non si avvia correttamente.

Fai così: spegni il servizio
Code:

/etc/init.d/cupsd stop

verifica se ci sono ancora processi di cups attivi
Code:

ps -ef|grep cups

e verifica chi sta occupando la porta tcp 631
Code:

fuser -uvn tcp 631

_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1415
Location: <ud|me|ts> - Italy

PostPosted: Tue Mar 27, 2007 9:27 pm    Post subject: Reply with quote

Il dilembo è questo:
Code:
E [27/Mar/2007:23:08:27 +0000] Unable to bind socket for address 127.0.0.1:631 - Cannot assign requested address.

Hai abilitato l'interfaccia di loop nel kernel?
cosa restituisce il comando:
Code:
ping -c 5 localhost

???
Un'altra cosa che puoi fare è provare a cambiare la porta del server cups, modifica la riga del cupsd.conf
Code:
Listen localhost:631

in
Code:
Listen localhost:3000

riavvia cups e dal browser clicca su questo link: http://localhost:3000.

Cambia qualcosa?
_________________
LP
Back to top
View user's profile Send private message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Tue Mar 27, 2007 9:34 pm    Post subject: Reply with quote

Code:
localhost simone # ps -ef|grep cups
root     15370 15312  0 23:33 pts/0    00:00:00 grep --colour=auto cups

mentre
Code:
fuser -uvn tcp 631

non restituisce niente!

Cosa intendi per "il loop del kernel"?

Code:
localhost simone # ping -c 5 localhost
PING tux.homenetwork (127.0.0.1) 56(84) bytes of data.

--- tux.homenetwork ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms


cambiando la porta da lo stesso problema...
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1415
Location: <ud|me|ts> - Italy

PostPosted: Tue Mar 27, 2007 9:52 pm    Post subject: Reply with quote

Devi ricompilare il kernel attivando questa opzione:
Code:
jarod linux # zcat /proc/config.gz |grep LOOP
CONFIG_BLK_DEV_LOOP=y

Code:
cd /usr/src/linux
make menuconfig

e trovi la voce
Code:
-> Device Drivers -> Block devices -> Loopback device support

salvi, ricompili, riavvi...
_________________
LP
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Tue Mar 27, 2007 9:57 pm    Post subject: Reply with quote

@lucapost: stai facendo confusione, quel supporto nel kernel non ha niente a che vedere con l'interfaccia di rete di loopback. Difatti, se guardi l'help del kernel
Quote:

Note that this loop device has nothing to do with the loopback
device used for network connections from the machine to itself.


@simone-27: Sembra che l'interfaccia di rete di loopback non sia attiva.

Verifica che sia attiva
Code:

ifconfig lo

e che venga attivata all'avvio del sistema
Code:

rc-update show | grep net.lo

e se il sistema la ritiene avviata
Code:

rc-status boot | grep net.lo

_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1415
Location: <ud|me|ts> - Italy

PostPosted: Tue Mar 27, 2007 10:05 pm    Post subject: Reply with quote

@Scen
...in effetti... :oops:
_________________
LP
Back to top
View user's profile Send private message
simone-27
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2007
Posts: 118

PostPosted: Wed Mar 28, 2007 12:48 pm    Post subject: Reply with quote

ecco ecco risolto. net.lo non veniva attivata all' avvio del sistema, ho risolto quindi dando
Code:
rc-update add net.lo boot

Grazie della mano!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum