LAN printing hell on 20.04 (UPnP VS mDNS? Or maybe IPv4 vs IPv6??)

Bug #1884303 reported by Daniel LaSalle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hello,

I have been experiencing this problem for at least 2 LTS versions I believe and it concerns and issue with a LAN printer. I am still not quite too sure if it involves a happy mix-up of TCPvsmDNSvsuPnP and|or if it's a lpstat VS GUI binary setting and|or ??

Anyways, when using 20.04 fully patched(and also possibly not) while using a LAN printer there seems to be a "duplicated-corrupted entry" that ends up somewhat generated in the system.

For example:
$ lpstat -p
printer Samsung_C460_Series_SEC30CDA7A49F15_ now printing Samsung_C460_Series_SEC30CDA7A49F15_-12. enabled since Fri 19 Jun 2020 01:09:47 PM
$

And MATE agrees with that (See attachment "1.jpg")

But when using Atril (See "2.jpg") or LOWriter (See "3.jpg") (or any other binary such as firefox) the story isn't so clear.

That brought me back to this:
$ lpstat -p
lpstat: No destinations added.
$

And MATE still agrees with that (See "4.jpg")

Yet LOWriter (and co) seemed a bit still challenged (See "5.jpg")

Anyways, time to delete everything and readd. But why are there 2x choices? (See "6.jpg")

Looking carefully at both entries, I believe that one is the TCP socket (See "7.jpg") while the 2nd one is via SSDP/UPnP (See "8.jpg").

But anyways, I always go for the TCP entry and that's done (See "9.jpg").

$ lpstat -p 1 ↵
printer Samsung-C460 is idle. enabled since Fri 19 Jun 2020 02:36:42 PM
$

And MATE again agrees (See "10.jpg")

Yaaay! Time to print out that SOB, so let's go back into Atril and print it (See "11.jpg")
Nothing surprising there: the old ghosted/MAC addressed profile still shows.

But did printing on the newly added via TCP one actually worked? YES! This time it did. Why this time? Because in other times it will just die in the spoiler and have me started back at the very beginning of this ticket.

Also, a major point of interest is: after having readded the printer, notice how lpstat named it, it was "Samsung-C460". Well, if/when I'll reboot the system, that simple name will be gone and will have been changed to "Samsung-C460-Series-SEC30CDA7A49F15" while still showing this "Samsung_C460_Series_SEC30CDA7A49F15_" ghost.

From the printer's perspective, here is what's opened on it:
PORT STATE SERVICE VERSION
80/tcp open http Samsung SyncThru Web Service
|_http-favicon: Unknown favicon MD5: 10E320BB701D0D099E175B6C339958F9
| http-methods:
|_ Supported Methods: GET POST
| http-robots.txt: 1 disallowed entry
|_*
|_http-title: Site doesn't have a title (text/html; charset=utf-8).
427/tcp open svrloc?
515/tcp open printer?
| fingerprint-strings:
| TerminalServerCookie:
|_ PortThru lpd: No Jobs on this queue
631/tcp open http Samsung SyncThru Web Service
|_http-favicon: Unknown favicon MD5: 10E320BB701D0D099E175B6C339958F9
| http-methods:
|_ Supported Methods: GET POST
|_http-title: Site doesn't have a title (text/html; charset=utf-8).
5200/tcp open targus-getdata?
| fingerprint-strings:
| DNSStatusRequestTCP, DNSVersionBindReqTCP, FourOhFourRequest, GenericLines, GetRequest, HTTPOptions, Help, Kerberos, LDAPSearchReq, LPDString, RPCCheck, RTSPRequest, SMBProgNeg, SSLSessionReq, TLSSessionReq, TerminalServerCookie, X11Probe:
| HTTP/1.1 405 Method Not Allowed
| Connection: close
|_ Server: ESWeb/0.5
9100/tcp open jetdirect?
10001/tcp open scp-config?

Here's what /var/log/cups/error_log as to say about all of this:
E [19/Jun/2020:00:00:00 -0400] Unable to open listen socket for address [v1.::1]:631 - Cannot assign requested address.
E [19/Jun/2020:13:02:02 -0400] [Job 10] File \'\' not found
E [19/Jun/2020:13:05:58 -0400] Unable to open listen socket for address [v1.::1]:631 - Cannot assign requested address.
E [19/Jun/2020:13:08:09 -0400] [Job 11] No destination host name supplied by cups-browsed for printer \"Samsung_C460_Series_SEC30CDA7A49F15_\", is cups-browsed running?
E [19/Jun/2020:13:08:39 -0400] [Job 12] No destination host name supplied by cups-browsed for printer \"Samsung_C460_Series_SEC30CDA7A49F15_\", is cups-browsed running?
E [19/Jun/2020:13:09:58 -0400] [Client 2371] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [19/Jun/2020:13:09:58 -0400] [Client 2493] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [19/Jun/2020:13:10:07 -0400] [Job 12] No destination host name supplied by cups-browsed for printer \"Samsung_C460_Series_SEC30CDA7A49F15_\", is cups-browsed running?
E [19/Jun/2020:13:10:17 -0400] [Client 2371] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [19/Jun/2020:13:10:17 -0400] [Client 2706] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [19/Jun/2020:13:11:17 -0400] [Client 3301] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [19/Jun/2020:13:11:17 -0400] [Client 3300] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [19/Jun/2020:13:11:20 -0400] [Client 3301] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [19/Jun/2020:13:11:20 -0400] [Client 3335] Returning IPP client-error-not-possible for Cancel-Job (ipp://localhost/jobs/11) from localhost.
E [18/Jun/2020:00:00:35 -0400] Unable to open listen socket for address [v1.::1]:631 - Cannot assign requested address.
W [18/Jun/2020:00:00:35 -0400] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'Samsung_C460_Series_SEC30CDA7A49F15_-Gray..\' already exists
W [18/Jun/2020:00:00:35 -0400] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'Samsung_C460_Series_SEC30CDA7A49F15_-DeviceN..\' already exists

The last thing I think I need to mention about this is that IPv6 is disabled on both my system and on the printer.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Tags: focal
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Norbert (nrbrtx)
tags: added: focal
Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Download full text (15.1 KiB)

Using Eye of MATE to print, sometimes it works, sometimes it does not, yet they are all the same file types and content.

/var/log/cups/error_log :

E [13/Sep/2020:00:00:01 -0400] Unknown directive BrowseOrder on line 24 of /etc/cups/cupsd.conf.
E [13/Sep/2020:00:00:01 -0400] Unknown directive BrowseAllow on line 25 of /etc/cups/cupsd.conf.
E [13/Sep/2020:00:00:01 -0400] Unknown browse protocol "CUPS" ignored.
E [13/Sep/2020:00:00:01 -0400] Unknown directive BrowseAddress on line 27 of /etc/cups/cupsd.conf.
W [13/Sep/2020:00:00:01 -0400] No limit for Validate-Job defined in policy default and no suitable template found.
W [13/Sep/2020:00:00:01 -0400] No limit for Cancel-Jobs defined in policy default - using Pause-Printer's policy.
W [13/Sep/2020:00:00:01 -0400] No limit for Cancel-My-Jobs defined in policy default - using Send-Document's policy.
W [13/Sep/2020:00:00:01 -0400] No limit for Close-Job defined in policy default - using Send-Document's policy.
W [13/Sep/2020:00:00:01 -0400] No JobPrivateAccess defined in policy default - using defaults.
W [13/Sep/2020:00:00:01 -0400] No JobPrivateValues defined in policy default - using defaults.
W [13/Sep/2020:00:00:01 -0400] No SubscriptionPrivateAccess defined in policy default - using defaults.
W [13/Sep/2020:00:00:01 -0400] No SubscriptionPrivateValues defined in policy default - using defaults.
W [13/Sep/2020:00:00:01 -0400] No limit for Validate-Job defined in policy authenticated - using Print-Job's policy.
W [13/Sep/2020:00:00:01 -0400] No limit for Cancel-Jobs defined in policy authenticated - using Pause-Printer's policy.
W [13/Sep/2020:00:00:01 -0400] No limit for Cancel-My-Jobs defined in policy authenticated - using Send-Document's policy.
W [13/Sep/2020:00:00:01 -0400] No limit for Close-Job defined in policy authenticated - using Send-Document's policy.
W [13/Sep/2020:00:00:01 -0400] No JobPrivateAccess defined in policy authenticated - using defaults.
W [13/Sep/2020:00:00:01 -0400] No JobPrivateValues defined in policy authenticated - using defaults.
W [13/Sep/2020:00:00:01 -0400] No SubscriptionPrivateAccess defined in policy authenticated - using defaults.
W [13/Sep/2020:00:00:01 -0400] No SubscriptionPrivateValues defined in policy authenticated - using defaults.
E [13/Sep/2020:00:00:01 -0400] Unable to open listen socket for address [v1.::1]:631 - Cannot assign requested address.
E [13/Sep/2020:15:55:32 -0400] [Job 9] File \'\' not found
E [13/Sep/2020:15:57:12 -0400] Unknown directive BrowseOrder on line 24 of /etc/cups/cupsd.conf.
E [13/Sep/2020:15:57:12 -0400] Unknown directive BrowseAllow on line 25 of /etc/cups/cupsd.conf.
E [13/Sep/2020:15:57:12 -0400] Unknown browse protocol "CUPS" ignored.
E [13/Sep/2020:15:57:12 -0400] Unknown directive BrowseAddress on line 27 of /etc/cups/cupsd.conf.
W [13/Sep/2020:15:57:12 -0400] No limit for Validate-Job defined in policy default and no suitable template found.
W [13/Sep/2020:15:57:12 -0400] No limit for Cancel-Jobs defined in policy default - using Pause-Printer's policy.
W [13/Sep/2020:15:57:12 -0400] No limit for Cancel-My-Jobs defined in policy default - using Send-Document's policy.
W [13/Sep/2020:15:57:12 -0400] No limit fo...

Revision history for this message
Daniel LaSalle (daniellasalle) wrote :
Download full text (4.1 KiB)

As a FYI:

$ cat /etc/cups/cupsd.conf #
#
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0

# Administrator user group...
SystemGroup lpadmin

# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing Off
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <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 CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>

  <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 CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Orde...

Read more...

Revision history for this message
Daniel LaSalle (daniellasalle) wrote :

PS: This last time I tried printing something (a 65k file), it got stuck into my spoiler and it claims that it's size is 0k.

I also cannot delete this entry.

$ sudo service cups restart

fails to do anything.

For my printer spoiler to work again, I need to.... reboot.

#Windozelifestyle

Revision history for this message
Daniel LaSalle (daniellasalle) wrote :

PSS: This was printing ID #13 and of course all previous 12 attempts were successful.

summary: - LAN printing hell on 20.04 (UPnP VS mDNS?)
+ LAN printing hell on 20.04 (UPnP VS mDNS? Or maybe IPv4 vs IPv6??)
no longer affects: ubuntu-mate
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.