On 2/11/2021 7:05 AM, Michael wrote:
On Wednesday, 10 February 2021 23:03:18 GMT Dan Egli wrote:
On 2/10/2021 4:30 AM, Michael wrote:
This is how I understand the printing process ought to work in your use
case:

The Samba server, Athena, will use the MSWindows Network Printer
identified as "Windows Printer via SAMBA" in its CUPS GUI.

Printing jobs will be submitted from Athena's CUPS to the MSWindows PC &
its attached printer, via the corresponding smb:// URI.  CUPS which will
use the Samba server on Athena to authenticate and send the data for
printing to the MSWindows PC and its shared printer.

The same process will need to be followed by Janus; i.e. the CUPS server
on Janus will have to use the same smb:// URI to submit the data to be
printed to Athena's Samba server and as long as authentication is
successful Athena will forward it to the Windows PC.
Forgive me, but if I use the SAME url, then it's not Athena acting as
the print server, it's the windows client that the printer is hooked up
to.
Sorry, I meant to say on Janus use the smb://Athena/<printer> URI and see if
Athena then forwards the request via the shared Samba printer service onward
to the MSWindows PC.  Of course if you try to print directly to the MSWindows
PC with smb://IRIS/<printer> it will work, just as it works from Athena - but
that's not what you're after.
That may work. I guess I'm just a bit worried about back and forth. i.e. Janus tries to print, then Athena asks for permission to let it happen, and that request goes right back to Janus. I'm VERY unfamiliar with AD so I can't be 100% certain this will work. I can't see any reason why it wouldn't, but that's not the same thing as saying there ISN'T a reason why it wouldn't work.
I tried to use the LPD to print to Athena and have Athena print to
the printer via Samba. That's where I was running into problems. I
suppose I can try IPP. I don't know of a smb:// url would work goinf
from Janus (or anyone else) to Athena. After all, the printer isn't
connected to Athena. It's connected to the windows 10 home PC. I suppose
IPP might work if I configure that. As far as listening on 631, Athena's
cups was ALREADY listening on that port because that's where the web
interface is. the url I use to manage the printers is
https://athena:631. I guess that somehow Cups can tell the difference
between https, http, and ipp all coming on the same port.
The ports listened to by CUPS are as follows:

https://www.cups.org/doc/firewalls.html

When the printer URI used is http, then the MIME type used by IPP will be
"application/ipp" to transact printing commands.  A browser will access the
admin GUI over http also on port 631.

LPD/LPR is limited in functionality and deprecated, although if it could be
made to work for now there'd be no argument against using it.  ;-)

IPP is well supported, however, without trying it out I wouldn't know if it
will work in your particular use case.  In theory a shared CUPS server on
Athena, plus its shared printer, should allow Janus to submit print jobs to
it.  The shared printer advertised by CUPS in Athena should pop up on Janus as
an available printer via mDNS.

I know nothing of mDNS. I tried IPP to no avail, but then again perhaps I formed the URLs wrong. I tried ipp://athena/ipp/<PRINTER> and it didn't work. I tried http/https mode too. That ALMOST worked. But I get an error on Janus saying "Filter Failed" and a lot of messages in my error_log (debug mode) that really make no sense to me.  Here's a sample. I'll put the full log on my web server if you want to see it. It's 77k nearly with debug turned on and that's only for trying to print ONE test page and failing. The url is https://www.newideatest.site/cups_error_log

---- CUT HERE ----
D [11/Feb/2021:13:08:33 -0700] [Client 1] Server address is "192.168.10.2".
D [11/Feb/2021:13:08:33 -0700] [Client 1] Accepted from 192.168.10.3:38830 (IPv4)
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request.
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided.
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Get-Printer-Attributes 1
D [11/Feb/2021:13:08:33 -0700] [Client 1] Returning IPP successful-ok for Get-Printer-Attributes (http://athena:631/printers/ENVY) from 192.168.10.3.
D [11/Feb/2021:13:08:33 -0700] [Client 1] Content-Length: 1840
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [11/Feb/2021:13:08:33 -0700] [Client 1] con->http=0x5642ebffaad0
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=1840, response=0x5642ebfda600(IPP_STATE_DATA), pipe_pid=0, file=-1 D [11/Feb/2021:13:08:33 -0700] [Client 1] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 D [11/Feb/2021:13:08:33 -0700] [Client 1] bytes=0, http_state=0, data_remaining=1840
D [11/Feb/2021:13:08:33 -0700] [Client 1] Flushing write buffer.
D [11/Feb/2021:13:08:33 -0700] [Client 1] New state is HTTP_STATE_WAITING
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request.
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided.
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Validate-Job 2
D [11/Feb/2021:13:08:33 -0700] [Client 1] Returning IPP successful-ok for Validate-Job (http://athena:631/printers/ENVY) from 192.168.10.3.
D [11/Feb/2021:13:08:33 -0700] [Client 1] Content-Length: 75
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [11/Feb/2021:13:08:33 -0700] [Client 1] con->http=0x5642ebffaad0
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=75, response=0x5642ebfda720(IPP_STATE_DATA), pipe_pid=0, file=-1 D [11/Feb/2021:13:08:33 -0700] [Client 1] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 D [11/Feb/2021:13:08:33 -0700] [Client 1] bytes=0, http_state=0, data_remaining=75
D [11/Feb/2021:13:08:33 -0700] [Client 1] Flushing write buffer.
D [11/Feb/2021:13:08:33 -0700] [Client 1] New state is HTTP_STATE_WAITING
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request.
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided.
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Create-Job 4
D [11/Feb/2021:13:08:33 -0700] [Client 1] Returning IPP successful-ok for Create-Job (http://athena:631/printers/ENVY) from 192.168.10.3.
D [11/Feb/2021:13:08:33 -0700] [Client 1] Content-Length: 201
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [11/Feb/2021:13:08:33 -0700] [Client 1] con->http=0x5642ebffaad0
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=201, response=0x5642ebfda680(IPP_STATE_IDLE), pipe_pid=0, file=-1 D [11/Feb/2021:13:08:33 -0700] [Client 1] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 D [11/Feb/2021:13:08:33 -0700] [Client 1] bytes=0, http_state=0, data_remaining=201
D [11/Feb/2021:13:08:33 -0700] [Client 1] Flushing write buffer.
D [11/Feb/2021:13:08:33 -0700] [Client 1] New state is HTTP_STATE_WAITING
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request.
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided.
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Send-Document 5
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6
D [11/Feb/2021:13:08:36 -0700] [Client 1] Returning IPP successful-ok for Send-Document (http://athena:631/printers/ENVY) from 192.168.10.3.
D [11/Feb/2021:13:08:36 -0700] [Client 1] Content-Length: 171
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [11/Feb/2021:13:08:36 -0700] [Client 1] con->http=0x5642ebffaad0
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=171, response=0x5642ebfdadd0(IPP_STATE_DATA), pipe_pid=0, file=-1 D [11/Feb/2021:13:08:36 -0700] [Client 1] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 D [11/Feb/2021:13:08:36 -0700] [Client 1] bytes=0, http_state=0, data_remaining=171
D [11/Feb/2021:13:08:36 -0700] [Client 1] Flushing write buffer.
D [11/Feb/2021:13:08:36 -0700] [Client 1] New state is HTTP_STATE_WAITING
D [11/Feb/2021:13:08:36 -0700] [Client 1] Waiting for request.
D [11/Feb/2021:13:08:36 -0700] [Client 1] POST /printers/ENVY HTTP/1.1
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=200, state=6
D [11/Feb/2021:13:08:36 -0700] [Client 1] No authentication data provided.
D [11/Feb/2021:13:08:36 -0700] [Client 1] 2.0 Get-Printer-Attributes 10
D [11/Feb/2021:13:08:36 -0700] [Client 1] Returning IPP successful-ok for Get-Printer-Attributes (http://athena:631/printers/ENVY) from 192.168.10.3.
D [11/Feb/2021:13:08:36 -0700] [Client 1] Content-Length: 1840
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [11/Feb/2021:13:08:36 -0700] [Client 1] con->http=0x5642ebffaad0
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=1840, response=0x5642ebfda680(IPP_STATE_DATA), pipe_pid=0, file=-1 D [11/Feb/2021:13:08:36 -0700] [Client 1] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 D [11/Feb/2021:13:08:36 -0700] [Client 1] bytes=0, http_state=0, data_remaining=1840
D [11/Feb/2021:13:08:36 -0700] [Client 1] Flushing write buffer.
D [11/Feb/2021:13:08:36 -0700] [Client 1] New state is HTTP_STATE_WAITING
D [11/Feb/2021:13:08:36 -0700] [Client 1] Waiting for request.
D [11/Feb/2021:13:08:36 -0700] [Client 1] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [11/Feb/2021:13:08:36 -0700] [Client 1] Closing connection.
---- CUT HERE ----

The Samba configuration on Athena will deal with the settings for sharing
the MSWindows printer.
Okay, so basically you're saying that Athena would connect via
smb://windows/<PRINTER> and that Janus or other computers would connect
via smb://Athena/<PRINTER>? Okay, that may work.
Yes, under this configuration scenario the printing service served by Samba on
Athena is a shared Windows printer and would be accessed via the smb://
protocol.  So, the Janus CUPS server will connect to the printer service
provided by the Samba server on Athena.  Again, without trying it out and
troubleshooting it I wouldn't know if it'd work.

With the above stated worry excluded, I can't see a reason why it wouldn't. I'll check it out.


As long as Janus (the Samba client) is authenticated to use Samba services
being served by Athena, it /should/ work.  You would need to configure
firewalls accordingly to keep ports available, if you have firewalls enabled.
There are no internal firewalls. Only the internet <-> lan firewall.

Grant's comment about buying a printer is opportune, depending on the value of
(your) time.  The cost of printers and especially 2nd hand printers with so
many companies going bust, should approximate zero.  The expense of running a
printer is in the overinflated ink price, which is a multiple of the upfront
cost of buying the device.

On the other hand, if cashflow itself is zero, options are understandably
limited.

Yea. Money is more than essentially zero. It's basically negative at the moment.  So a new printer, even a 2nd hand one, isn't an option. And as I also mentioned, it's exceptionally difficult to hook a PHYSICAL printer to a VIRTUAL computer. Not saying that it can't be done, but it's not easy. And even then, since it's all virtual, the computer is actually hooked to the windows host. Windows just doesn't USE it except for relaying messages to/from the VMs.

--
Dan Egli
On my test server


Reply via email to