Bug 439154 - Cannot print on a Windows shared printer
Summary: Cannot print on a Windows shared printer
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 9
Hardware: i386
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 446582 447542 448216 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-27 11:41 UTC by antonio montagnani
Modified: 2008-06-30 19:25 UTC (History)
12 users (show)

Fixed In Version: 3.2.0-1.rc1.14.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-30 19:25:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
troubleshoot file (17.31 KB, text/plain)
2008-03-27 11:41 UTC, antonio montagnani
no flags Details
troubleshoot file for HP1200 file (second printer) (5.58 KB, text/plain)
2008-03-27 11:42 UTC, antonio montagnani
no flags Details
debugjob18.txt (24.79 KB, text/plain)
2008-03-27 16:02 UTC, Darwin H. Webb
no flags Details
troubleshootjob18 (34.90 KB, text/plain)
2008-03-27 16:03 UTC, Darwin H. Webb
no flags Details
a newer troubleshoot (34.24 KB, text/plain)
2008-05-19 00:27 UTC, Darwin H. Webb
no flags Details
wiresharc libpcap file (2.89 KB, application/octet-stream)
2008-05-19 05:13 UTC, MASAO TAKAHASHI
no flags Details
cups troubleshoot file (31.68 KB, text/plain)
2008-05-19 06:47 UTC, 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 19:49 UTC, Emmanuel Chanel
no flags Details
Requested files (18.46 KB, application/octet-stream)
2008-05-21 10:18 UTC, Tim Waugh
no flags Details
stderr from smbclient (success) (13.63 KB, text/plain)
2008-05-21 13:51 UTC, Tim Waugh
no flags Details
Requested files (17.26 KB, application/octet-stream)
2008-05-21 14:48 UTC, 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 15:14 UTC, 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 15:16 UTC, Tim Waugh
no flags Details

Description antonio montagnani 2008-03-27 11:41:01 UTC
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 11:41:01 UTC
Created attachment 299305 [details]
troubleshoot file

Comment 2 antonio montagnani 2008-03-27 11:42:37 UTC
Created attachment 299306 [details]
troubleshoot file for HP1200 file (second printer)

Comment 3 Tim Waugh 2008-03-27 12:25:57 UTC
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 12:52:08 UTC
[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 16:02:10 UTC
Created attachment 299350 [details]
debugjob18.txt

debug of win shared smb printer

Comment 6 Darwin H. Webb 2008-03-27 16:03:23 UTC
Created attachment 299351 [details]
troubleshootjob18

troubleshoot info

Comment 7 Tim Waugh 2008-03-31 16:20:55 UTC
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 06:55:54 UTC
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 20:55:26 UTC
*** Bug 446582 has been marked as a duplicate of this bug. ***

Comment 10 Julian Sikorski 2008-05-18 20:59:30 UTC
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 21:07:07 UTC
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 22:25:40 UTC
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-19 00:27:28 UTC
Created attachment 305883 [details]
a newer troubleshoot

Comment 14 Simo Sorce 2008-05-19 03:52:57 UTC
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 05:13:50 UTC
Created attachment 305897 [details]
wiresharc libpcap file

Comment 16 Julian Sikorski 2008-05-19 06:45:56 UTC
(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 06:47:01 UTC
Created attachment 305908 [details]
cups troubleshoot file

Comment 18 antonio montagnani 2008-05-19 08:18:33 UTC
I confirm comment #16 . No way to print on my Windows printer

Comment 19 Simo Sorce 2008-05-19 14:16:43 UTC
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 14:47:22 UTC
(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 14:54:29 UTC
and I have cups-1.3.7-2.fc9.i386 running on my Fedora machines....

Comment 22 Anton Guda 2008-05-19 15:11:27 UTC
Same result with Win2000 adn HP1320.
But printing a plain text file from smbclient works.


Comment 23 Simo Sorce 2008-05-19 16:40:23 UTC
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 16:54:05 UTC
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 06:58:47 UTC
(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 14:17:56 UTC
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 14:44:15 UTC
*** Bug 447542 has been marked as a duplicate of this bug. ***

Comment 28 Emmanuel Chanel 2008-05-20 19:49:09 UTC
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 10:18:17 UTC
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 10:22:35 UTC
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 10:40:04 UTC
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 10:48:48 UTC
(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 10:54:30 UTC
OK, thanks. Simo, if you need duplicate data, please let me know. Thanks.

Comment 34 Simo Sorce 2008-05-21 13:24:24 UTC
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 13:51:34 UTC
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 14:03:22 UTC
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 14:31:32 UTC
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 14:41:35 UTC
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 14:48:02 UTC
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 15:13:49 UTC
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 15:14:49 UTC
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 15:16:06 UTC
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 15:17:13 UTC
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 16:15:20 UTC
Tim can you post traces from F8 and F9 so that I can analyse the difference ?


Comment 45 Simo Sorce 2008-05-21 20:02:26 UTC
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-22 00:08:21 UTC
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-22 00:40:50 UTC
(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 07:50:01 UTC
It works fine also here with Windows XP printer!!!

Comment 49 Julian Sikorski 2008-05-22 09:41:00 UTC
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 11:06:53 UTC
Confirmed with Vista as well. Thanks.

Comment 51 Tim Waugh 2008-05-22 11:33:15 UTC
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 13:32:40 UTC
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 12:49:23 UTC
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 12:50:24 UTC
I might add that I have the same 'errsrv' issues here on my Fedora 9 install.

Comment 55 Simo Sorce 2008-05-23 14:38:59 UTC
working packages at comment #46

Comment 56 Tim Waugh 2008-05-25 21:45:33 UTC
*** Bug 448216 has been marked as a duplicate of this bug. ***

Comment 57 Michael Starling 2008-05-27 17:55:08 UTC
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 18:16:07 UTC
How about pushing this update? It's not even in testing yet.

Comment 59 Simo Sorce 2008-05-27 20:41:43 UTC
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 10:27:25 UTC
samba-3.2.0-1.rc1.14.fc9.i386 reintroduces same bug!!!! 

Comment 61 Julian Sikorski 2008-06-05 10:33:45 UTC
Oh. I thought it was working but I could be wrong. I'll recheck.

Comment 62 antonio montagnani 2008-06-05 10:41:13 UTC
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 10:49:39 UTC
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 12:04:25 UTC
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 12:46:11 UTC
Tested samba-3.2.0-1.rc2.16. Seems works for me.

Comment 66 antonio montagnani 2008-06-30 12:14:22 UTC
Can we close it???

Comment 67 Julian Sikorski 2008-06-30 13:15:19 UTC
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.