You are not logged in.

#1 2010-03-13 22:39:48

perseus
Member
Registered: 2007-01-28
Posts: 160

Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I share my printer with my wife's XP laptop and another linux box.  This has been the position for the past 2 years or so, without any problems at all.  Yesterday I did my first reboot for a couple of weeks, and the first, therefore, since samba / smbclient upgraded to 3.5.0.  I can no longer print from the XP or other linux boxes.  Samba logs the error as :


laptop (10.0.0.5) connect to service Oki initially as user visitor (uid=1001, gid=1001) (pid 12634)
[2010/03/13 18:31:51.509666,  0] printing/print_cups.c:108(cups_connect)
  Unable to connect to CUPS server /var/run/cups/cups.sock:631 - Interrupted system call

Setting cups logging to debug, the closest entries to the above attempt is as follows :

D [13/Mar/2010:18:31:21 +0000] cupsdAcceptClient: 13 from localhost (Domain)
D [13/Mar/2010:18:31:21 +0000] Report: clients=1
D [13/Mar/2010:18:31:21 +0000] Report: jobs=500
D [13/Mar/2010:18:31:21 +0000] Report: jobs-active=0
D [13/Mar/2010:18:31:21 +0000] Report: printers=1
D [13/Mar/2010:18:31:21 +0000] Report: printers-implicit=0
D [13/Mar/2010:18:31:21 +0000] Report: stringpool-string-count=1334
D [13/Mar/2010:18:31:21 +0000] Report: stringpool-alloc-bytes=6496
D [13/Mar/2010:18:31:21 +0000] Report: stringpool-total-bytes=18208
D [13/Mar/2010:18:31:21 +0000] cupsdReadClient: 13 WAITING Closing on EOF
D [13/Mar/2010:18:31:21 +0000] cupsdCloseClient: 13
D [13/Mar/2010:18:31:21 +0000] cupsdAcceptClient: 13 from localhost (Domain)
I [13/Mar/2010:18:31:21 +0000] Generating SSL server key...
E [13/Mar/2010:18:32:12 +0000] Unable to create SSL server key file "/etc/cups/ssl/server.key" - No such file or directory
D [13/Mar/2010:18:32:12 +0000] cupsdCloseClient: 13

I am guessing tht the "WAITING Closing on EOF" part may be important.

Other aspects of samba do not appear to be affected. I can mount shares on the remote computers, use smbclient etc.

Googling is not getting me anywhere.

Any help will be greatly appreciated.

Last edited by perseus (2010-03-14 18:54:41)

Offline

#2 2010-03-14 00:58:41

max.bra
Member
From: Bologna - Italy
Registered: 2008-06-02
Posts: 93

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

confirmed, same behavior (and log) here behind a similar lan/share configuration

i was googling and testing around since about a week and you have preceded me with this post

unfortunately, samba downgrade (samba, smbclient and tdb) does not solve here. it's a little more complicate this time.

Offline

#3 2010-03-14 08:23:38

perseus
Member
Registered: 2007-01-28
Posts: 160

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

Thank you very much for the confirmation max.bra.  It is also very helpful to know that downgrading will not help because I was going to try that this morning.  Did you downgrade to 3.4.6?

This is a bad situation .. a wife who cannot print is not a happy wife sad

One would imagine that if this was a common problem, there would be posts all over the net about it by now, and neither of us can find them.  I did check the samba bugtracker and nothing showed up (it was late at night though and I was not yet very thorough).

I will post a bug here in arch if I can't fix the problem later today.

Edit : Can you tell me also please which printer/driver you are using?

Last edited by perseus (2010-03-14 09:00:43)

Offline

#4 2010-03-14 12:09:15

max.bra
Member
From: Bologna - Italy
Registered: 2008-06-02
Posts: 93

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

perseus wrote:

This is a bad situation .. a wife who cannot print is not a happy wife sad

lol yes, too bad

[2010-03-13 09:29] removed tdb (1.2.1-1)
[2010-03-13 09:29] removed samba (3.5.0-2)
[2010-03-13 09:29] removed smbclient (3.5.0-2)
[2010-03-13 09:29] installed tdb (1.2.0-1)
[2010-03-13 09:29] installed smbclient (3.4.5-1.1)
[2010-03-13 09:29] installed samba (3.4.5-1.1)

with my update/upgrade steps i've jumped 3.4.6 version and i've downgraded directly to 3.4.5. at the time of that version all was functional.

my box is sharing a canon pixma ip3600 using gutenprint ip4600 standard PPD

same search result here. it seems that we are the only two in the world with this problem.
searching for "Unable to connect to CUPS server /var/run/cups/cups.sock:631" i'm able to find a lots of permission denied problems, that are normally easy to track and resolve
but with "Unable to connect to CUPS server /var/run/cups/cups.sock:631 - Interrupted system call" there is nothing recent. only some old match when peng.. dinosaurs were hulking whole world

Interrupted system call (as far as i know) is a symptom of a serious problem of internal communication. WTH?

Offline

#5 2010-03-14 15:01:27

perseus
Member
Registered: 2007-01-28
Posts: 160

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I am not going to mark this thread "Solved" yet because : (a) If I have cured this problem, I don't know how, and (b) what I have done may not work for max.bra.  I am, however, able to print again from the XP laptop and my other linux box.

My approach was not very scientific, but here is what I did.

(1) I switched to using  the cupsd.conf.default configuration and restarted cups.  This made no difference.

(2) I found a post which said that samba does not work with some printer drivers.  I am using HP Laserjet drivers for my Oki. There are several of those and I changed twice.  This made no difference, but I left the last change in place.

(3) I created the sub-directory /etc/cups/ssl.  If this is necessary, then I do not know why it was not created by pacman when cups was installed/updated.  I don't like creating things in /etc by hand.  Certificates were created in there after attempts to connect, but at first this did not seem to make any difference.

(4) I restarted samba.  After this I found that I could print again.

I still have the errors "Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported" and "Unable to open listen socket for address ::1:631 - Address family not supported by protocol", but googlins suggests that these are not important. The first requires the acl package to be installed and the second is something to do with ipv6 support.

I will post again if I encounter any further problems.

Offline

#6 2010-03-14 18:12:16

max.bra
Member
From: Bologna - Italy
Registered: 2008-06-02
Posts: 93

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

good shot perseus!

in my tests i've done all your steps (and in a week, damn, also others big_smile) except the 3rd

directory /etc/cups/ssl is now needed by cups (seems) to create certificates for samba connection.

confirmed that i can remotely print again from my lan via samba, almost for now

but now the question is:

when and why is this appened? cups has been updated BEFORE samba (and in past packages and actual one the culprit directory is NEVER created).
3 weeks ago with samba 3.4.x and actual cups my lan printing was fuctional!! downgrading, as i've already said, is a non solving action.

why now /etc/cups/ssl is needed in cups-samba comunications? have you been able to read docs about this? i've not found nothing and as we see, arch devs also have not been notified of the change.

maybe a third package involved?

i'm really confused...

EDIT: typo

Last edited by max.bra (2010-03-14 18:14:04)

Offline

#7 2010-03-14 18:53:35

perseus
Member
Registered: 2007-01-28
Posts: 160

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I am very pleased that it worked for you smile

Like you, I am baffled.  Why should there be only two people who have encountered this problem - and both of us on Arch?  Then there are the questions you raise concerning the way that these packages have been updated in the past without any problems arising.  I still don't feel that I have found a real solution - just a procedure to make things work again.  Like you, I wondered if a third package might be involved, and went through pacman.log trying to find what the culprit might be - but I can't find one.

Offline

#8 2010-03-15 17:25:20

syre
Member
From: Denmark
Registered: 2009-08-04
Posts: 100

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

i have the problem aswell, and i have not been able to resolve it yet, i've tried all of your steps above, still, no luck.

Offline

#9 2010-03-15 18:15:14

perseus
Member
Registered: 2007-01-28
Posts: 160

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I am not expert enough to offer much help, but: (1) Did you restart cups after creating /etc/cups/ssl? (2) Have you checked to see whether any files have been created in that directory? I have server.crt and server.key.

Offline

#10 2010-03-15 18:23:54

syre
Member
From: Denmark
Registered: 2009-08-04
Posts: 100

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

perseus wrote:

I am not expert enough to offer much help, but: (1) Did you restart cups after creating /etc/cups/ssl? (2) Have you checked to see whether any files have been created in that directory? I have server.crt and server.key.

actually after changing driver (again) and restarting cups/samba (again) the problem seems to be solved. I have the same files in the ssl directory

Offline

#11 2010-03-20 12:41:55

nullvoid
Member
Registered: 2009-01-18
Posts: 33

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I'm having the same problem. I am able to print directly from the CUPS web interface, but CUPS fail to print if printing from a Windows machine using Samba. I've reinstalled the printer, reinstalled the CUPS package and created /etc/cups/ssl with the proper permissions for CUPS. I'm still unable to get it to work. No certificates are created in /etc/cups/ssl. Any pointers on how I should fix this?

I'm getting a lot of these in my error log too:

E [20/Mar/2010:13:49:32 +0100] Unable to set ACLs on root certificate "/var/run/cups/certs/0" - Operation not supported

Last edited by nullvoid (2010-03-20 12:50:34)

Offline

#12 2010-03-23 03:53:56

drankinatty
Member
From: Nacogdoches, Texas
Registered: 2009-04-24
Posts: 70
Website

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

perseus wrote:

This is a bad situation .. a wife who cannot print is not a happy wife sad

Amen!!

Same issue here, wife NOT happy tongue


David C. Rankin, J.D.,P.E.

Offline

#13 2010-03-23 03:59:04

drankinatty
Member
From: Nacogdoches, Texas
Registered: 2009-04-24
Posts: 70
Website

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

Guys,

    I have a love/hate relationship with cups. For the past eight years at least I
have configured cups to share laserjet printers at both the office and home and
99.9% time, I never have to think about printing again. The other .1% is usually
what seems like an effort in futility trying to get cups to print. I am having
one of those .1% moments now.

    I enabled cups printing on my arch server about a month ago and it just printed
without issue until my wife needed to print today. Now cups is refusing to print
at all. The strange part is that the cups daemon seems to be freezing or
crashing requiring a kill -9 on cupsd to kill it and restart the process. For
example, I can open the web interface of port 631 and I can change options, look
at the printers and past jobs, etc..., but when I send a job to the server, the
web interface freezes, nothing prints and I have to use 'kill -9 <cupsd pid>' to
stop cups and restart it. For example:

[00:46 nirvana:/var/log/cups] # /etc/rc.d/cups stop
:: Stopping CUPS Daemon
                        [DONE]
[00:52 nirvana:/var/log/cups] # ps ax | grep cups
4618 pts/1    S+     0:00 vi cupsd.conf
5052 ?        Ss     0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
5128 pts/3    S+     0:00 grep cups
[00:52 nirvana:/var/log/cups] # kill 5052
[00:52 nirvana:/var/log/cups] # ps ax | grep cups
4618 pts/1    S+     0:00 vi cupsd.conf
5052 ?        Ss     0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
5131 pts/3    S+     0:00 grep cups
[00:52 nirvana:/var/log/cups] # kill -9 5052

Huh?

Even after adding /etc/cups/ssl, I am still having to 'kill -9 <pid of cupsd> to restart cups. What gives on that? Cups has been great until this last samba update.


David C. Rankin, J.D.,P.E.

Offline

#14 2010-03-23 04:05:36

drankinatty
Member
From: Nacogdoches, Texas
Registered: 2009-04-24
Posts: 70
Website

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I can confirm creating /etc/cups/ssl and setting permissions to root:lp (chown root:lp /etc/cups/ssl) and then restarting cups fixed my remote print problem.

Now I just how to undo the rest of the modifications to cups I made trying to solve this tongue


David C. Rankin, J.D.,P.E.

Offline

#15 2010-03-24 20:37:10

nullvoid
Member
Registered: 2009-01-18
Posts: 33

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I'm having the same problem as drankinatty described. CUPS seems to freeze whenever printing from SMB. Changed the permissions on /etc/cups/ssl to 777, still wont work. Seems the permissions are changed back by CUPS to 700 when I restart it as well.

Offline

#16 2010-03-24 22:12:55

perseus
Member
Registered: 2007-01-28
Posts: 160

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

nullvoid - I wish I could help.  For what little it may be worth, my /etc/cups/ssl is also 700 and I don't have any problems.  Also, so far as I can tell, those E "Unable to set ACLs on root certificate" errors are harmless.

Offline

#17 2010-03-25 20:26:57

nullvoid
Member
Registered: 2009-01-18
Posts: 33

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

Just did a clean install on another machine, installed samba and cups, Windows listed the printer and my home folder correctly when connecting to the SMB service. Still have the same problem with cups though, when trying to connect (or even opening) the printer in Windows, cups freezes and does not respond in any way. Going to use another distro on my printing server until this is resolved, hope someone is going to find out whats wrong soon.

Offline

#18 2010-03-27 18:30:13

somekool
Member
Registered: 2008-08-27
Posts: 25

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

SOLVED !!!!

thank you for the hint through the thread!!!! here is a small sumarry

- perfectly working setup
- pacman -Syu
- cups/samba is broken

Solution

sudo mkdir /etc/cups/ssl
sudo chown root:lp /etc/cups/ssl
sudo chmod 775 /etc/cups/ssl
sudo /etc/init.d/cups restart
function pacman { echo 'think TWICE before using pacman.'; }

thank you again Arch team for breaking our working services through your updates...

Offline

#19 2010-03-28 14:50:21

nullvoid
Member
Registered: 2009-01-18
Posts: 33

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

Anyone else still having trouble with this one? Feels a bit like I'm the only one not being able to get cups work properly with samba.

Offline

#20 2010-03-28 18:15:46

nullvoid
Member
Registered: 2009-01-18
Posts: 33

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

OK! After a LOT of hunting, debugging and googling, I have finally found and isolated the problem. CUPS freezes when it tries to generate an SSL certificate. You need a lot of entropy to generate an SSL-certificate. My arch box is headless and has no keyboard or mouse, meaning it will suffer from having little entropy available.

Short answer: When cups is frozen, run 'find /' as root to generate entropy. After a few minutes it should unfreeze and be able to generate a certificate. Connecting a keyboard and using it may also help.

Last edited by nullvoid (2010-03-28 18:40:19)

Offline

#21 2010-03-31 05:03:05

TornadoTDi
Member
Registered: 2008-06-12
Posts: 8

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I came across this exact same problem a month or so ago. Also running a headless box, so not enough entropy being generated. One thing you can try is installing a cheap soundcard (or use the onboard sound) + randomsound to generate lots of nice entropy from the noise on the Mic input:

http://www.digital-scurf.org/software/randomsound
http://aur.archlinux.org/packages.php?ID=20653

Offline

#22 2010-03-31 05:18:43

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

nullvoid wrote:

OK! After a LOT of hunting, debugging and googling, I have finally found and isolated the problem. CUPS freezes when it tries to generate an SSL certificate. You need a lot of entropy to generate an SSL-certificate. My arch box is headless and has no keyboard or mouse, meaning it will suffer from having little entropy available.

Short answer: When cups is frozen, run 'find /' as root to generate entropy. After a few minutes it should unfreeze and be able to generate a certificate. Connecting a keyboard and using it may also help.

your box wasn't frozen. generating the key takes up to half an hour or so. no matter how fast your cpu is. you probably found a workaround to speed it up. maybe somebody should add a note to our wiki about cert creation taling ages. see http://burtonini.com/blog/computers/cup … 8-14-18-00 for more.

i have no idea if we could do the cert creation in a fast way in our cups post.install script. if somebody has a good suggestionplease file a feature request.

Offline

#23 2010-03-31 11:33:39

nullvoid
Member
Registered: 2009-01-18
Posts: 33

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

AndyRTR wrote:
nullvoid wrote:

OK! After a LOT of hunting, debugging and googling, I have finally found and isolated the problem. CUPS freezes when it tries to generate an SSL certificate. You need a lot of entropy to generate an SSL-certificate. My arch box is headless and has no keyboard or mouse, meaning it will suffer from having little entropy available.

Short answer: When cups is frozen, run 'find /' as root to generate entropy. After a few minutes it should unfreeze and be able to generate a certificate. Connecting a keyboard and using it may also help.

your box wasn't frozen. generating the key takes up to half an hour or so. no matter how fast your cpu is. you probably found a workaround to speed it up. maybe somebody should add a note to our wiki about cert creation taling ages. see http://burtonini.com/blog/computers/cup … 8-14-18-00 for more.

i have no idea if we could do the cert creation in a fast way in our cups post.install script. if somebody has a good suggestionplease file a feature request.

Generating a new certificate usually takes less than once second on my box. Using the PRNG (urandom) is much better than relying on real entropy which CUPS seems to do.

Running find / creates lots of HDD activity which helps adding to the entropy pool. Any system interupts etc also helps adding to the pool which will speed up the certificate creation a lot.

You can watch how much data your kernel has in the randon entropy pool with this command:
watch sysctl kernel.random.entropy_avail

It is possible to create a certificate in post.install, openssl may generate the self-signed certificate. A tutorial of how this can be done may be found here:

http://sial.org/howto/openssl/self-signed/

Offline

#24 2011-02-26 19:01:18

markie83
Member
Registered: 2011-02-26
Posts: 1

Re: Printer shares not working since upgrade to samba 3.5.0 - SOLVED-ish

I have had similar issues at my office.......I had a hylafax server (also sharing a couple printers via samba) running on debian 5 (samba 3.2) and upgraded it to debian 6 (samba 3.5). and it was samba printer sharing hell after that. What would happen is I would get samba logs full of the same jibberish

[2011/02/25 15:11:20.201234,  0] lib/util_sock.c:1432(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  write_data: write failure in writing to client 0.0.0.0. Error Connection reset by peer
[2011/02/25 15:11:20.201249,  0] smbd/process.c:79(srv_send_smb)
  Error writing 4 bytes to client. -1. (Transport endpoint is not connected)
[2011/02/25 15:43:20.134201,  0] lib/util_sock.c:675(write_data)
[2011/02/25 15:43:20.134220,  0] lib/util_sock.c:1432(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  write_data: write failure in writing to client 0.0.0.0. Error Connection reset by peer
[2011/02/25 15:43:20.134234,  0] smbd/process.c:79(srv_send_smb)
  Error writing 4 bytes to client. -1. (Transport endpoint is not connected)


I only post this here since I think it was more of a samba problem than a debian problem and we seem to be the only ppl out there talking about it......... the getpeername seemed to be the problem (to me anyway) and what would happen on our 25 or so XP home clients is that you would print but it wouldnt go ANYWHERE. Cups was not even recieving the jobs since samba was not passing the jobs to cups.

It seems to me that the XP machines were not finding the server by its hostname so I messed around with changing the clients to map the printer by ip address instead of by hostname and it helped "some" but it still had big time glitchyness.

the only conclusion I could come to in my mind is that this reminded me of back in the day when we had a win98se computer sharing a printer and the windows XP systems would hang for up to 2 min while trying to access the printer. The problem back then amounted to win XP not wanting to downstep to the older way of windows98's password encryption. So I started changing my smb.conf to allow guest on the printer, changed the mask to 777 and I even wrote up a whole new smb.conf from scratch to work on security = share no authentication, allow from everyone 777 etc etc.............STILL had problems.

So I ended up throwing together a new server from a spare machine and installing debian 5.0.3 (with samba 3.2.5) and swapping it out yesterday........now EVERYTHING works fine.

my educated guess here is that the new samba is probobly geared more towards vista & win7 than it is XP (since XP is a pretty old dog these days). I would loved to have worked this issue out but we just could not have the downtime any longer......so it looks like I am not going to be updating for a long time (which I now is not really the best policy) but it has to work.

I hope this helps.....trust me you are not the only ones having this problem.

Offline

Board footer

Powered by FluxBB