Created attachment 1654112 [details] journalctl -u cups.service log Description of problem: printing to SMB printer share results Version-Release number of selected component (if applicable): fedora 31 cups-2.2.12-3.fc31.x86_64 How reproducible: fails every single time Steps to Reproduce: 1. setup network printer - windows Printer via Samba enter and save your printer login credentials 2. print your 'favorite' and watch the print queue 3. status turn to 'pending' and job never arrives at network printer 4. print again and you see the print status "unable to connect to CIFS host after (3 times) Actual results: Expected results: Additional info: This use to work just fine with previous Fedora version. But since Fedora 30 and 31 it is broken. printing directly to the smb network printer just works fine smbspool smb://username:passwd@DOMAIN/inf235/PTR155CLR 5 5 0 1 1 file.pdf according to # Bug 1706316 - Fedora Stopped Printing to Samba printer after upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1706316 adding AuthInfoRequired username,password should fix the issue. but this trick does not work for me. Here my current /etc/cups/printers.conf: # Printer configuration file for CUPS v2.2.12 # Written by cupsd on 2020-01-20 11:53 # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING <DefaultPrinter KONICA-MINOLTA-C658SeriesPS-P> UUID urn:uuid:26f4e96e-af63-3dc8-5647-8c4910dc7086 AuthInfoRequired username,password Info KONICA MINOLTA C658SeriesPS/P Location MakeModel KONICA MINOLTA C658SeriesPS(P) DeviceURI smb://user:password@domain/usscinf235/USSCPTR155CLR State Stopped StateMessage Unable to connect to CIFS host after (tried 3 times) StateTime 1579548022 ConfigTime 1579549990 Reason paused Type 8401100 Accepting Yes Shared No JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 OpPolicy default ErrorPolicy stop-printer </DefaultPrinter>
Hi, did you stop cupsd when you started manipulating with printers.conf? And restarted afterwards? Please provide job log for the job - see https://fedoraproject.org/wiki/How_to_debug_printing_problems Anyway, connecting to samba share is done in smb backend provided by samba, authentication info is contained in device uri so smb can use it - reassigning to samba.
Created attachment 1654436 [details] cups job log
Created attachment 1654437 [details] cups whole log
(In reply to Zdenek Dohnal from comment #1) > did you stop cupsd when you started manipulating with printers.conf? And > restarted afterwards? Yes I did, sorry for the confusion: systemctl stop cups.service edit /etc/cups/printer.conf systemctl start cups.service > Please provide job log for the job - see > https://fedoraproject.org/wiki/How_to_debug_printing_problems I attached 2 logs. I hope it helps to narrow down the problem: cups_job_log cup_whole_log I glanced over it, but I cant see anything alerting. (though not sure what exactly to look for) I still see the error message in the UI. (which for some reason I think is not reflected in the 2 last cups logs): "Unable to connect to CIFS host after (tried 3 times)" > Anyway, connecting to samba share is done in smb backend provided by samba, > authentication info is contained in device uri so smb can use it - > reassigning to samba. it seems like the samba end is working. I can print directly to the smb network printer just fine using the following command: smbspool smb://username:passwd@DOMAIN/inf235/PTR155CLR 5 5 0 1 1 file.pdf
A small breaktrhu on this topic: Finally found a way to get the printer status from the command line: $lpstat -t scheduler is running system default destination: KONICA-MINOLTA-C658SeriesPS-P device for KONICA-MINOLTA-C658SeriesPS-P: smb://plt/usscinf235/USSCPTR155CLR KONICA-MINOLTA-C658SeriesPS-P accepting requests since Mon 20 Jan 2020 11:20:22 AM PST printer KONICA-MINOLTA-C658SeriesPS-P disabled since Mon 20 Jan 2020 11:20:22 AM PST - Unable to connect to CIFS host after (tried 3 times) KONICA-MINOLTA-C658SeriesPS-P-17 mattes 22924288 Tue 21 Jan 2020 04:56:30 PM PST I thing I just caught, it says "printer disabled" (see line 5 in the response above). this is something I did not spot / or is not shown on the GUI tool. It seems cups is accepting new print jobs, but it is not executing them. Don't know when and how it got disabled for good. Even the reboot last night did not change it. Anyway I just executed: $sudo cupsenable KONICA-MINOLTA-C658SeriesPS-P that seemed to do the trick. $lpstat -t scheduler is running system default destination: KONICA-MINOLTA-C658SeriesPS-P device for KONICA-MINOLTA-C658SeriesPS-P: smb://plt/usscinf235/USSCPTR155CLR KONICA-MINOLTA-C658SeriesPS-P accepting requests since Tue 21 Jan 2020 05:22:56 PM PST printer KONICA-MINOLTA-C658SeriesPS-P is idle. enabled since Tue 21 Jan 2020 05:22:56 PM PST Now the print jobs are executed. I did $lp -d KONICA-MINOLTA-C658SeriesPS-P file.ps and finally i see it printing. Including the queued up jobs. Excellent. I think that fixed my print problem. Tough one/two questions remain: 1) Why is cups (or the print-config system) not adding the 'AuthInfoRequired' line when creating a new print smb queue 2) Second, there seems to be no indication on the GUI tool that the printer is disabled And shouldn't a reboot automatically at least fix that up? thanks for all the help to get this fixed. Hope someone can figure out what it takes to setup a SMB print queue with proper Authentication. this is something that is broken since Fedora29 or so. m
(In reply to Mat Kattanek from comment #5) > Don't know when and how it got disabled for good. smb backend returned error 'Unable to connect to CIFS host after (tried 3 times)' and you have probably default error policy for print queue - 'stop-printer'. The reason is to forbid overloading non-functional (backend should return CUPS_BACKEND_FAILED for serious error) queue with other jobs. > Tough one/two questions remain: > > 1) Why is cups (or the print-config system) not adding the > 'AuthInfoRequired' line when creating a new print smb queue It is not needed for backends provided by CUPS - f.e. ipp backend does the check for username and password in device uri by default and use it if available. smb backend could do the same. > 2) Second, there seems to be no indication on the GUI tool that the > printer is disabled There is a indication in GNOME control center by text 'Paused', in CUPS web ui by text 'Paused' and in system-config-printer by symbol '||' in the right down corner of printer icon. (seen after I disabled the queue manually) > And shouldn't a reboot automatically at least fix that up? Reboot does not influence the behavior, the error policy does - default is stop-printer, which gives opportunity to rerun job after you solve the reason why it failed before (f.e. smb backend was not able to connect samba share) and after you enable the queue.
I concurr, I removed the 'AuthRequiredInfo' from /etc/cups/printer.conf and I can still print successfully to th e SMB network printer. It is sufficient enough that the 'DeviceURI' contains the credentials needed for the SMB backend. DeviceURI smb://user:passwd@plt/usscinf235/USSCPTR155CLR I conclude I misread the problem initially. All my printing problems where most likely caused because something 'disabled' the printer queue. So all I did to get it to work: $sudo cupsenable KONICA-MINOLTA-C658SeriesPS-P $ lpstat -t scheduler is running system default destination: KONICA-MINOLTA-C658SeriesPS-P device for KONICA-MINOLTA-C658SeriesPS-P: smb://plt/usscinf235/USSCPTR155CLR KONICA-MINOLTA-C658SeriesPS-P accepting requests since Wed 22 Jan 2020 11:08:50 AM PST printer KONICA-MINOLTA-C658SeriesPS-P is idle. enabled since Wed 22 Jan 2020 11:08:50 AM PST