Bug 439154 - Cannot print on a Windows shared printer
Cannot print on a Windows shared printer
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
9
i386 Linux
low Severity urgent
: ---
: ---
Assigned To: Simo Sorce
Fedora Extras Quality Assurance
: Reopened
: 446582 447542 448216 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-27 07:41 EDT by antonio montagnani
Modified: 2008-06-30 15:25 EDT (History)
12 users (show)

See Also:
Fixed In Version: 3.2.0-1.rc1.14.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-30 15:25:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
troubleshoot file (17.31 KB, text/plain)
2008-03-27 07:41 EDT, antonio montagnani
no flags Details
troubleshoot file for HP1200 file (second printer) (5.58 KB, text/plain)
2008-03-27 07:42 EDT, antonio montagnani
no flags Details
debugjob18.txt (24.79 KB, text/plain)
2008-03-27 12:02 EDT, Darwin H. Webb
no flags Details
troubleshootjob18 (34.90 KB, text/plain)
2008-03-27 12:03 EDT, Darwin H. Webb
no flags Details
a newer troubleshoot (34.24 KB, text/plain)
2008-05-18 20:27 EDT, Darwin H. Webb
no flags Details
wiresharc libpcap file (2.89 KB, application/octet-stream)
2008-05-19 01:13 EDT, MASAO TAKAHASHI
no flags Details
cups troubleshoot file (31.68 KB, text/plain)
2008-05-19 02:47 EDT, Julian Sikorski
no flags Details
Emmanuel Chanel's troubleshoot file for printing on a Windows shared printer. (10.11 KB, text/plain)
2008-05-20 15:49 EDT, Emmanuel Chanel
no flags Details
Requested files (18.46 KB, application/octet-stream)
2008-05-21 06:18 EDT, Tim Waugh
no flags Details
stderr from smbclient (success) (13.63 KB, text/plain)
2008-05-21 09:51 EDT, Tim Waugh
no flags Details
Requested files (17.26 KB, application/octet-stream)
2008-05-21 10:48 EDT, Tim Waugh
no flags Details
F-8: smbclient -d 10 -W WORKGROUP -U Tim%test //KINGFISHER/HPLJ6MP -c "put /usr/share/cups/data/testprint.ps" (29.06 KB, text/plain)
2008-05-21 11:14 EDT, Tim Waugh
no flags Details
F-9: smbclient -d 10 -W WORKGROUP -U Tim%test //KINGFISHER/HPLJ6MP -c "put /usr/share/cups/data/testprint.ps" &>f9-smbclient.log (18.34 KB, text/plain)
2008-05-21 11:16 EDT, Tim Waugh
no flags Details

  None (edit)
Description antonio montagnani 2008-03-27 07:41:01 EDT
Description of problem:
In a mixed environment where a laser printer is connected to a Windows XP
machine, printer from a Rawhide machine doesn't work while from a F8 machine is o.k.
Printer configurated by config-system-printer on both fedora ssystems

Version-Release number of selected component (if applicable):
cups-1.3.6-6.fc9.i386

How reproducible:
always

Steps to Reproduce:
1.Start System-config-printer
2.Try to print a test page
3.
  
Actual results:
No print

Expected results:
Printing of the CUPS Printer Test Page

Additional info:

Created two printers
Comment 1 antonio montagnani 2008-03-27 07:41:01 EDT
Created attachment 299305 [details]
troubleshoot file
Comment 2 antonio montagnani 2008-03-27 07:42:37 EDT
Created attachment 299306 [details]
troubleshoot file for HP1200 file (second printer)
Comment 3 Tim Waugh 2008-03-27 08:25:57 EDT
Seems like job 53 gets through CUPS without problems until the 'smb' backend,
which is part of samba.

What does this command say?:

smbclient -W workgroup -L //celeron
Comment 4 antonio montagnani 2008-03-27 08:52:08 EDT
[antonio@acer ~]$ smbclient -W workgroup -L //celeron
Password: 
Domain=[CELERON] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

	Sharename       Type      Comment
	---------       ----      -------
	IPC$            IPC       IPC remoto
	print$          Disk      Driver della stampante
	EPSONSty        Printer   EPSON Stylus Photo 915
	Documenti       Disk      
	HPLaserJ        Printer   Hp su Celeron
	Volume (F)      Disk      
	Immagini        Disk      
Domain=[CELERON] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

	Server               Comment
	---------            -------

	Workgroup            Master
	---------            -------
Comment 5 Darwin H. Webb 2008-03-27 12:02:10 EDT
Created attachment 299350 [details]
debugjob18.txt

debug of win shared smb printer
Comment 6 Darwin H. Webb 2008-03-27 12:03:23 EDT
Created attachment 299351 [details]
troubleshootjob18

troubleshoot info
Comment 7 Tim Waugh 2008-03-31 12:20:55 EDT
This, from the attachment in comment #5, is interesting:

E [27/Mar/2008:08:50:21 -0700] [Job 18] Error writing spool: ERRSRV - ERRerror
(Non-specific error code.)
I [27/Mar/2008:08:50:21 -0700] Saving subscriptions.conf...
D [27/Mar/2008:08:50:21 -0700] PID 8894 (/usr/lib/cups/backend/smb) exited with
no errors.

It shows that the Samba 'smb' CUPS backend is exiting with a successful exit
code even though it failed.  That is a bug in samba.  If the backend fails to
print the job for some reason other than authentication required, it must exit
with CUPS_BACKEND_FAILED (1).

Note that fixing this samba bug still won't allow you to print -- I don't know
why the error occurs in the first place.  However, that is also a Samba issue of
some sort.

Changing component and reassigning.
Comment 8 Bug Zapper 2008-05-14 02:55:54 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Julian Sikorski 2008-05-18 16:55:26 EDT
*** Bug 446582 has been marked as a duplicate of this bug. ***
Comment 10 Julian Sikorski 2008-05-18 16:59:30 EDT
Seems that samba admits that something went wrong:
E [18/May/2008:22:47:18 +0200] [Job 64] Error writing spool: ERRSRV - ERRerror
(Non-specific error code.)
I [18/May/2008:22:47:18 +0200] Saving subscriptions.conf...
E [18/May/2008:22:47:30 +0200] PID 31014 (/usr/lib/cups/filter/foomatic-rip)
stopped with status 3!
Still, nothing gets printed. Seems to be a pretty serious regression against F8
to me. I tried deleting the printer and configuring it from scratch, but it did
not help. Please let me know if you need any more information.
Comment 11 antonio montagnani 2008-05-18 17:07:07 EDT
I changed from medium (when rawhide) to urgent as F9 is a working system and :
now this bug prevents my F9 network from printing on my Windows printer, that is
in my office is the only available printer: Not a bug at home where everything
is F9!!!
Comment 12 eric 2008-05-18 18:25:40 EDT
i've been following this bug, as i am having the same problem.  i wanted to add
that i have a third system with f8 that has cups running with the windows
printer working. from f9 i setup an ipp printer pointing to the f8 printer which
points to the windows printer.  in this way i can print to the windows printer
from f9.
Comment 13 Darwin H. Webb 2008-05-18 20:27:28 EDT
Created attachment 305883 [details]
a newer troubleshoot
Comment 14 Simo Sorce 2008-05-18 23:52:57 EDT
Antonio, can you test the samba packages that are now in the updates-testing
repository and see if they make any difference ?
Comment 15 MASAO TAKAHASHI 2008-05-19 01:13:50 EDT
Created attachment 305897 [details]
wiresharc libpcap file
Comment 16 Julian Sikorski 2008-05-19 02:45:56 EDT
(In reply to comment #14)
> Antonio, can you test the samba packages that are now in the updates-testing
> repository and see if they make any difference ?
They do not make a difference (samba-3.2.0-1.pre3.11.fc9), I still cannot print.
Changing hardware to All since it also happens on x86_64.
Comment 17 Julian Sikorski 2008-05-19 02:47:01 EDT
Created attachment 305908 [details]
cups troubleshoot file
Comment 18 antonio montagnani 2008-05-19 04:18:33 EDT
I confirm comment #16 . No way to print on my Windows printer
Comment 19 Simo Sorce 2008-05-19 10:16:43 EDT
I can't reproduce printing against samba all works perfectly.
What is the server you are using ?
Can you describe how I can try to reproduce it ?
Comment 20 antonio montagnani 2008-05-19 10:47:22 EDT
(In reply to comment #19)
> I can't reproduce printing against samba all works perfectly.
> What is the server you are using ?
> Can you describe how I can try to reproduce it ?

I have a Windows XP computer with two printers (HP Laserjet 1200 and a HP inkjet
printer).
Printers are seen from Fedora computers, I deleted them and re-installed and
printers were detected automatically.
Everything was working until I switched to F9. (and I am sure that it is not
connected to Windows as I had for some time a F8 machine and a F9 machine and I
could print only from F8 machine).
My Windows machine is 192.168.0.2, it can surf the net and shares files/folders
from/to any other F8 

At the moment I am out of the office where my network is so I can't provide
additional informations
Comment 21 antonio montagnani 2008-05-19 10:54:29 EDT
and I have cups-1.3.7-2.fc9.i386 running on my Fedora machines....
Comment 22 Anton Guda 2008-05-19 11:11:27 EDT
Same result with Win2000 adn HP1320.
But printing a plain text file from smbclient works.
Comment 23 Simo Sorce 2008-05-19 12:40:23 EDT
Can you check it is not a firewall problem ?
Use system-config-firewall to enable "samba" and see if that helps.
Comment 24 antonio montagnani 2008-05-19 12:54:05 EDT
already checked.There is no firewall running on that machine...and in any case I
can share folders back and forward from network machines, so it is not
definitely a problem of any firewall.(I suppose that I should not detect
printers in system-config-printers if I had any firewall trouble...) 

Furthermore on all machines it stopped working immediately after switching from
F8 to rawhide and then F9.

It had been a sleeping bug in rawhide as I was the only tester with a Windows
networked printer , now other users find same bug in F9
Comment 25 MASAO TAKAHASHI 2008-05-20 02:58:47 EDT
(In reply to comment #15)
> Created an attachment (id=305897) [edit]
> wiresharc libpcap file
> 
Please look this file with wireshark.
explanation
  172.16.100.66 ---- Windows2000 w/ shared printer Canon MP600
  mtakahashi    ---- fc9 , samba-3.2.0-1.pre3.11.fc9.i386
  execute smbspool 1 test 1 readme.txt
  
  wireshark dump
  14 mtakahashi send SMB "Open andX request, Path: test" --- request read/write
access
  15 172.16.100.6 response SMB "Open andX response"      --- response read only
access

  So, mtakahashi close a connection.
I don't know what this session is right.
 
Comment 26 Simo Sorce 2008-05-20 10:17:56 EDT
Unfortunately each of you is providing one piece of info but not the other.
From the ones that get:
Error writing spool: ERRSRV - ERRerror (Non-specific error code.)

I'd like to have: smb.conf, cups error log, a network trace taken when the error
happened and that captures the full smbspool transaction, the remote machine OS
and version.

Thanks.
Comment 27 Tim Waugh 2008-05-20 10:44:15 EDT
*** Bug 447542 has been marked as a duplicate of this bug. ***
Comment 28 Emmanuel Chanel 2008-05-20 15:49:09 EDT
Created attachment 306169 [details]
Emmanuel Chanel's troubleshoot file for printing on a Windows shared printer.

On http://www.fedoraforum.org/forum/showthread.php?t=188793 , it's taken for a
bug of Samba .	I have a similar problem and xyz introduced me this thread.
Comment 29 Tim Waugh 2008-05-21 06:18:17 EDT
Created attachment 306228 [details]
Requested files

Attach is:

1. /var/log/cups/error_log
2. print.pcap from tcpdump -nieth0 -s0 -w print.pcap not port ssh
3. /etc/samba/smb.conf
4. typescript, the output of running smbspool manually with loglevel=10
Comment 30 Tim Waugh 2008-05-21 06:22:35 EDT
192.168.1.10 (KINGFISHER) in comment #29 is running Windows Vista:

[tim@localhost ~]$ smbclient -W WORKGROUP -U Tim%test //KINGFISHER/HPLJ6MP -c quit
Domain=[KINGFISHER] OS=[Windows Vista (TM) Home Premium 6000] Server=[Windows
Vista (TM) Home Premium 6.0]
Comment 31 Julian Sikorski 2008-05-21 06:40:04 EDT
Tim, does it mean that you were able to reproduce the problem? I'm happy to
provide the necessary logs, but I am not sure how to get print.pcap and the
typescript. I'm afraid some more detailed instructions will be necessary. If
that matters, my remote machine is running Windows XP Professional SP3.
Comment 32 Tim Waugh 2008-05-21 06:48:48 EDT
(In reply to comment #31)
> Tim, does it mean that you were able to reproduce the problem?

Yes.  No special set-up was required; just a Windows machine with a password,
and a printer.

> I'm happy to
> provide the necessary logs, but I am not sure how to get print.pcap and the
> typescript.

Hopefully the set I've provided will be sufficient for Simo to diagnose the
problem.  All the commands I used are provided: for the tcpdump command line,
it's there in comment #29 (item 2); for the smbspool command line, the
typescript is a transcript of the session using 'script'.
Comment 33 Julian Sikorski 2008-05-21 06:54:30 EDT
OK, thanks. Simo, if you need duplicate data, please let me know. Thanks.
Comment 34 Simo Sorce 2008-05-21 09:24:24 EDT
At the moment I do not need additional traces.
This one shows pretty clearly that windows is returning an error. Although it is
yet not clear why, and the fact it is an "unspecific" error does not help.
Do you happen to have any log of this event on the windows side?
Comment 35 Tim Waugh 2008-05-21 09:51:34 EDT
Created attachment 306253 [details]
stderr from smbclient (success)

Not that I can find.  Note that smbclient in comment #30 is running on the same
machine as smbspool: smbclient succeeds, but smbspool fails.

Attached is the stderr output from:

smbclient -d 10 -W WORKGROUP -U Tim%test //KINGFISHER/HPLJ6MP -c quit

Perhaps it is useful to compare the log from smbspool, which fails, to that of
smbclient, which succeeds?
Comment 36 Guenther Deschner 2008-05-21 10:03:22 EDT
Can you please repeat the smbclient test with "-c put /etc/hosts" instead of "-c
quit" just to see if you can actually upload (just as smbspool) printjobs this way?
Comment 37 Simo Sorce 2008-05-21 10:31:32 EDT
Authentication is indeed not the probelm, from your traces tim, I see that
smbspool authenticated just fine and sent some data.

Please fetch samba-3.2.0-1pre3.11.fc9 from updates_testing and re-test
Comment 38 Tim Waugh 2008-05-21 10:41:35 EDT
OK, smbclient with -c "put /etc/hosts" works fine.

I didn't have the updates-testing package when I wrote comment 29.  Printing
with smbspool still doesn't work though -- I'll get some new logs from it and
attach them.
Comment 39 Tim Waugh 2008-05-21 10:48:02 EDT
Created attachment 306257 [details]
Requested files

This was from a failure to print with samba-3.2.0-1.pre3.11.fc9.x86_64.
Comment 40 Tim Waugh 2008-05-21 11:13:49 EDT
Hmm, just noticed this:

[tim@localhost ~]$ smbclient -d 10 -W WORKGROUP -U Tim%test //KINGFISHER/HPLJ6MP
-c "put /usr/share/cups/data/testprint.ps" 2> smbclient.log
Error writing file: ERRSRV - ERRerror (Non-specific error code.)

so perhaps it is something to do with larger files.
Comment 41 Tim Waugh 2008-05-21 11:14:49 EDT
Created attachment 306264 [details]
F-8: smbclient -d 10 -W WORKGROUP -U Tim%test //KINGFISHER/HPLJ6MP -c "put /usr/share/cups/data/testprint.ps"

This succeeded on Fedora 8.
Comment 42 Tim Waugh 2008-05-21 11:16:06 EDT
Created attachment 306265 [details]
F-9: smbclient -d 10 -W WORKGROUP -U Tim%test //KINGFISHER/HPLJ6MP -c "put /usr/share/cups/data/testprint.ps" &>f9-smbclient.log

This failed on Fedora 9.

/usr/share/cups/data/testprint.ps hasn't changed between Fedora 8 and Fedora 9.
Comment 43 Tim Waugh 2008-05-21 11:17:13 EDT
So, something I noticed from comparing Fedora 8's smbclient to Fedora 9's is
that the newer code sends the 17k file in one big chunk, although Fedora 8 would
send it in smaller chunks.  Could that be anything to do with it?
Comment 44 Simo Sorce 2008-05-21 12:15:20 EDT
Tim can you post traces from F8 and F9 so that I can analyse the difference ?
Comment 45 Simo Sorce 2008-05-21 16:02:26 EDT
We opened a bug upstream:
https://bugzilla.samba.org/show_bug.cgi?id=5479

Jeremy,
proposed a patch there that should fix the problem, expect fixed packages soon.
Comment 46 Simo Sorce 2008-05-21 20:08:21 EDT
Can you test this package and confirm it solves the issue?
http://koji.fedoraproject.org/koji/buildinfo?buildID=50056
Comment 47 MASAO TAKAHASHI 2008-05-21 20:40:50 EDT
(In reply to comment #46)
> Can you test this package and confirm it solves the issue?
> http://koji.fedoraproject.org/koji/buildinfo?buildID=50056
I have tested this package samba-3.2.0-1.pre3.12.fc9.
It works fine.


Comment 48 antonio montagnani 2008-05-22 03:50:01 EDT
It works fine also here with Windows XP printer!!!
Comment 49 Julian Sikorski 2008-05-22 05:41:00 EDT
I can confirm that this build fixes the problem for me (XP Pro SP3). Thank you
for the swift action.
Comment 50 Tim Waugh 2008-05-22 07:06:53 EDT
Confirmed with Vista as well. Thanks.
Comment 51 Tim Waugh 2008-05-22 07:33:15 EDT
Incidentally, it is really bad behaviour for smbspool to have an exit code of 0
when there is an error such as that.  Really it needs to have exit code 1 to
tell CUPS that the job failed.
Comment 52 antonio montagnani 2008-05-22 09:32:40 EDT
It has been to be provided also for F10 that is suffering of the same problem.

Tnx for help
Comment 53 Glenn Johnson 2008-05-23 08:49:23 EDT
Looks like we're going to have to wait for a Samba update? I'm having the same
trouble where I could print like a champ in Fedora 8 but not in 9. I've spent a
lot of time reading posts, searching web, etc. Nothing helps. 
Comment 54 Glenn Johnson 2008-05-23 08:50:24 EDT
I might add that I have the same 'errsrv' issues here on my Fedora 9 install.
Comment 55 Simo Sorce 2008-05-23 10:38:59 EDT
working packages at comment #46
Comment 56 Tim Waugh 2008-05-25 17:45:33 EDT
*** Bug 448216 has been marked as a duplicate of this bug. ***
Comment 57 Michael Starling 2008-05-27 13:55:08 EDT
I'm having the same issue with a WIN 2K shared printer. In the meantime I
enabled lpd/lpr printing on the 2000 server which enable to be to add the
printer to my linux host via lpp.

Instructions can be found here on how to enable the service on windows.

http://www.le.ac.uk/cc/dsss/docs/print-lpr.shtml
Comment 58 Julian Sikorski 2008-05-27 14:16:07 EDT
How about pushing this update? It's not even in testing yet.
Comment 59 Simo Sorce 2008-05-27 16:41:43 EDT
We are checking some other bugs and rc1 just came out, we are going to push that
instead if all issues we know of are solved.
Comment 60 antonio montagnani 2008-06-05 06:27:25 EDT
samba-3.2.0-1.rc1.14.fc9.i386 reintroduces same bug!!!! 
Comment 61 Julian Sikorski 2008-06-05 06:33:45 EDT
Oh. I thought it was working but I could be wrong. I'll recheck.
Comment 62 antonio montagnani 2008-06-05 06:41:13 EDT
I tested samba-3.2.0-1.pre3.12.fc9 and it was fine. Tnx anyway.
Very annoying as I needed to print some work documents today...
Comment 63 antonio montagnani 2008-06-05 06:49:39 EDT
I tested samba-3.2.0-1.pre3.12.fc9 and it was fine. Tnx anyway.
Very annoying as I needed to print some work documents today...
Comment 64 antonio montagnani 2008-06-05 08:04:25 EDT
it is not connected to samba...on the same network I have one computer that
prints and another one that doesn't print: look at the difference:

smbclient -W workgroup -L //celeron
Enter antonio's password: 
Domain=[CELERON] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

	Sharename       Type      Comment
	---------       ----      -------
	IPC$            IPC       IPC remoto
	print$          Disk      Driver della stampante
	EPSONSty        Printer   EPSON Stylus Photo 915
	Documenti       Disk      
	HPLaserJ        Printer   Hp su Celeron
	Volume (F)      Disk      
	Immagini        Disk      
Domain=[CELERON] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

	Server               Comment
	---------            -------

	Workgroup            Master
	---------            -------


on the non-printing computer:

$ smbclient -W workgroup -L //celeron
timeout connecting to 212.48.8.140:445
timeout connecting to 212.48.8.140:139
Connection to celeron failed (Error NT_STATUS_ACCESS_DENIED)

Comment 65 Anton Guda 2008-06-12 08:46:11 EDT
Tested samba-3.2.0-1.rc2.16. Seems works for me.
Comment 66 antonio montagnani 2008-06-30 08:14:22 EDT
Can we close it???
Comment 67 Julian Sikorski 2008-06-30 09:15:19 EDT
I believe so. I have just successfully printed a document using
samba-0:3.2.0-1.rc1.15.fc9.

Note You need to log in before you can comment on or make changes to this bug.