1 |
On 2/11/2021 7:05 AM, Michael wrote: |
2 |
> On Wednesday, 10 February 2021 23:03:18 GMT Dan Egli wrote: |
3 |
>> On 2/10/2021 4:30 AM, Michael wrote: |
4 |
>>> This is how I understand the printing process ought to work in your use |
5 |
>>> case: |
6 |
>>> |
7 |
>>> The Samba server, Athena, will use the MSWindows Network Printer |
8 |
>>> identified as "Windows Printer via SAMBA" in its CUPS GUI. |
9 |
>>> |
10 |
>>> Printing jobs will be submitted from Athena's CUPS to the MSWindows PC & |
11 |
>>> its attached printer, via the corresponding smb:// URI. CUPS which will |
12 |
>>> use the Samba server on Athena to authenticate and send the data for |
13 |
>>> printing to the MSWindows PC and its shared printer. |
14 |
>>> |
15 |
>>> The same process will need to be followed by Janus; i.e. the CUPS server |
16 |
>>> on Janus will have to use the same smb:// URI to submit the data to be |
17 |
>>> printed to Athena's Samba server and as long as authentication is |
18 |
>>> successful Athena will forward it to the Windows PC. |
19 |
>> Forgive me, but if I use the SAME url, then it's not Athena acting as |
20 |
>> the print server, it's the windows client that the printer is hooked up |
21 |
>> to. |
22 |
> Sorry, I meant to say on Janus use the smb://Athena/<printer> URI and see if |
23 |
> Athena then forwards the request via the shared Samba printer service onward |
24 |
> to the MSWindows PC. Of course if you try to print directly to the MSWindows |
25 |
> PC with smb://IRIS/<printer> it will work, just as it works from Athena - but |
26 |
> that's not what you're after. |
27 |
That may work. I guess I'm just a bit worried about back and forth. i.e. |
28 |
Janus tries to print, then Athena asks for permission to let it happen, |
29 |
and that request goes right back to Janus. I'm VERY unfamiliar with AD |
30 |
so I can't be 100% certain this will work. I can't see any reason why it |
31 |
wouldn't, but that's not the same thing as saying there ISN'T a reason |
32 |
why it wouldn't work. |
33 |
>> I tried to use the LPD to print to Athena and have Athena print to |
34 |
>> the printer via Samba. That's where I was running into problems. I |
35 |
>> suppose I can try IPP. I don't know of a smb:// url would work goinf |
36 |
>> from Janus (or anyone else) to Athena. After all, the printer isn't |
37 |
>> connected to Athena. It's connected to the windows 10 home PC. I suppose |
38 |
>> IPP might work if I configure that. As far as listening on 631, Athena's |
39 |
>> cups was ALREADY listening on that port because that's where the web |
40 |
>> interface is. the url I use to manage the printers is |
41 |
>> https://athena:631. I guess that somehow Cups can tell the difference |
42 |
>> between https, http, and ipp all coming on the same port. |
43 |
> The ports listened to by CUPS are as follows: |
44 |
> |
45 |
> https://www.cups.org/doc/firewalls.html |
46 |
> |
47 |
> When the printer URI used is http, then the MIME type used by IPP will be |
48 |
> "application/ipp" to transact printing commands. A browser will access the |
49 |
> admin GUI over http also on port 631. |
50 |
> |
51 |
> LPD/LPR is limited in functionality and deprecated, although if it could be |
52 |
> made to work for now there'd be no argument against using it. ;-) |
53 |
> |
54 |
> IPP is well supported, however, without trying it out I wouldn't know if it |
55 |
> will work in your particular use case. In theory a shared CUPS server on |
56 |
> Athena, plus its shared printer, should allow Janus to submit print jobs to |
57 |
> it. The shared printer advertised by CUPS in Athena should pop up on Janus as |
58 |
> an available printer via mDNS. |
59 |
> |
60 |
I know nothing of mDNS. I tried IPP to no avail, but then again perhaps |
61 |
I formed the URLs wrong. I tried ipp://athena/ipp/<PRINTER> and it |
62 |
didn't work. I tried http/https mode too. That ALMOST worked. But I get |
63 |
an error on Janus saying "Filter Failed" and a lot of messages in my |
64 |
error_log (debug mode) that really make no sense to me. Here's a |
65 |
sample. I'll put the full log on my web server if you want to see it. |
66 |
It's 77k nearly with debug turned on and that's only for trying to print |
67 |
ONE test page and failing. The url is |
68 |
https://www.newideatest.site/cups_error_log |
69 |
|
70 |
---- CUT HERE ---- |
71 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Server address is "192.168.10.2". |
72 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Accepted from |
73 |
192.168.10.3:38830 (IPv4) |
74 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request. |
75 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1 |
76 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6 |
77 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided. |
78 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Get-Printer-Attributes 1 |
79 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Returning IPP successful-ok |
80 |
for Get-Printer-Attributes (http://athena:631/printers/ENVY) from |
81 |
192.168.10.3. |
82 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Content-Length: 1840 |
83 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdSendHeader: code=200, |
84 |
type="application/ipp", auth_type=0 |
85 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] con->http=0x5642ebffaad0 |
86 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdWriteClient error=0, |
87 |
used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, |
88 |
data_remaining=1840, response=0x5642ebfda600(IPP_STATE_DATA), |
89 |
pipe_pid=0, file=-1 |
90 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Writing IPP response, |
91 |
ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 |
92 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] bytes=0, http_state=0, |
93 |
data_remaining=1840 |
94 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Flushing write buffer. |
95 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] New state is HTTP_STATE_WAITING |
96 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request. |
97 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1 |
98 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6 |
99 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided. |
100 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Validate-Job 2 |
101 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Returning IPP successful-ok |
102 |
for Validate-Job (http://athena:631/printers/ENVY) from 192.168.10.3. |
103 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Content-Length: 75 |
104 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdSendHeader: code=200, |
105 |
type="application/ipp", auth_type=0 |
106 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] con->http=0x5642ebffaad0 |
107 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdWriteClient error=0, |
108 |
used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, |
109 |
data_remaining=75, response=0x5642ebfda720(IPP_STATE_DATA), pipe_pid=0, |
110 |
file=-1 |
111 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Writing IPP response, |
112 |
ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 |
113 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] bytes=0, http_state=0, |
114 |
data_remaining=75 |
115 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Flushing write buffer. |
116 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] New state is HTTP_STATE_WAITING |
117 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request. |
118 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1 |
119 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6 |
120 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided. |
121 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Create-Job 4 |
122 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Returning IPP successful-ok |
123 |
for Create-Job (http://athena:631/printers/ENVY) from 192.168.10.3. |
124 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Content-Length: 201 |
125 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdSendHeader: code=200, |
126 |
type="application/ipp", auth_type=0 |
127 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] con->http=0x5642ebffaad0 |
128 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] cupsdWriteClient error=0, |
129 |
used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, |
130 |
data_remaining=201, response=0x5642ebfda680(IPP_STATE_IDLE), pipe_pid=0, |
131 |
file=-1 |
132 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Writing IPP response, |
133 |
ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 |
134 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] bytes=0, http_state=0, |
135 |
data_remaining=201 |
136 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Flushing write buffer. |
137 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] New state is HTTP_STATE_WAITING |
138 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Waiting for request. |
139 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] POST /printers/ENVY HTTP/1.1 |
140 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] Read: status=200, state=6 |
141 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] No authentication data provided. |
142 |
D [11/Feb/2021:13:08:33 -0700] [Client 1] 2.0 Send-Document 5 |
143 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
144 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
145 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
146 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
147 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
148 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
149 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
150 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
151 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
152 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
153 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
154 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
155 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
156 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
157 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
158 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
159 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
160 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
161 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
162 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
163 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
164 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
165 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
166 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
167 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
168 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
169 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
170 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
171 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
172 |
D [11/Feb/2021:13:08:34 -0700] [Client 1] Read: status=100, state=6 |
173 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
174 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
175 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
176 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
177 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
178 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
179 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
180 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
181 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
182 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
183 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
184 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
185 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
186 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
187 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
188 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
189 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
190 |
D [11/Feb/2021:13:08:35 -0700] [Client 1] Read: status=100, state=6 |
191 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6 |
192 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6 |
193 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6 |
194 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6 |
195 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=100, state=6 |
196 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Returning IPP successful-ok |
197 |
for Send-Document (http://athena:631/printers/ENVY) from 192.168.10.3. |
198 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Content-Length: 171 |
199 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdSendHeader: code=200, |
200 |
type="application/ipp", auth_type=0 |
201 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] con->http=0x5642ebffaad0 |
202 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdWriteClient error=0, |
203 |
used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, |
204 |
data_remaining=171, response=0x5642ebfdadd0(IPP_STATE_DATA), pipe_pid=0, |
205 |
file=-1 |
206 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Writing IPP response, |
207 |
ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 |
208 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] bytes=0, http_state=0, |
209 |
data_remaining=171 |
210 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Flushing write buffer. |
211 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] New state is HTTP_STATE_WAITING |
212 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Waiting for request. |
213 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] POST /printers/ENVY HTTP/1.1 |
214 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Read: status=200, state=6 |
215 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] No authentication data provided. |
216 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] 2.0 Get-Printer-Attributes 10 |
217 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Returning IPP successful-ok |
218 |
for Get-Printer-Attributes (http://athena:631/printers/ENVY) from |
219 |
192.168.10.3. |
220 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Content-Length: 1840 |
221 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdSendHeader: code=200, |
222 |
type="application/ipp", auth_type=0 |
223 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] con->http=0x5642ebffaad0 |
224 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] cupsdWriteClient error=0, |
225 |
used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, |
226 |
data_remaining=1840, response=0x5642ebfda680(IPP_STATE_DATA), |
227 |
pipe_pid=0, file=-1 |
228 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Writing IPP response, |
229 |
ipp_state=IPP_STATE_DATA, old wused=0, new wused=0 |
230 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] bytes=0, http_state=0, |
231 |
data_remaining=1840 |
232 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Flushing write buffer. |
233 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] New state is HTTP_STATE_WAITING |
234 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Waiting for request. |
235 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] HTTP_STATE_WAITING Closing for |
236 |
error 32 (Broken pipe) |
237 |
D [11/Feb/2021:13:08:36 -0700] [Client 1] Closing connection. |
238 |
---- CUT HERE ---- |
239 |
|
240 |
>>> The Samba configuration on Athena will deal with the settings for sharing |
241 |
>>> the MSWindows printer. |
242 |
>> Okay, so basically you're saying that Athena would connect via |
243 |
>> smb://windows/<PRINTER> and that Janus or other computers would connect |
244 |
>> via smb://Athena/<PRINTER>? Okay, that may work. |
245 |
> Yes, under this configuration scenario the printing service served by Samba on |
246 |
> Athena is a shared Windows printer and would be accessed via the smb:// |
247 |
> protocol. So, the Janus CUPS server will connect to the printer service |
248 |
> provided by the Samba server on Athena. Again, without trying it out and |
249 |
> troubleshooting it I wouldn't know if it'd work. |
250 |
> |
251 |
With the above stated worry excluded, I can't see a reason why it |
252 |
wouldn't. I'll check it out. |
253 |
|
254 |
|
255 |
> As long as Janus (the Samba client) is authenticated to use Samba |
256 |
> services |
257 |
> being served by Athena, it /should/ work. You would need to configure |
258 |
> firewalls accordingly to keep ports available, if you have firewalls enabled. |
259 |
There are no internal firewalls. Only the internet <-> lan firewall. |
260 |
> |
261 |
> Grant's comment about buying a printer is opportune, depending on the value of |
262 |
> (your) time. The cost of printers and especially 2nd hand printers with so |
263 |
> many companies going bust, should approximate zero. The expense of running a |
264 |
> printer is in the overinflated ink price, which is a multiple of the upfront |
265 |
> cost of buying the device. |
266 |
> |
267 |
> On the other hand, if cashflow itself is zero, options are understandably |
268 |
> limited. |
269 |
|
270 |
Yea. Money is more than essentially zero. It's basically negative at the |
271 |
moment. So a new printer, even a 2nd hand one, isn't an option. And as |
272 |
I also mentioned, it's exceptionally difficult to hook a PHYSICAL |
273 |
printer to a VIRTUAL computer. Not saying that it can't be done, but |
274 |
it's not easy. And even then, since it's all virtual, the computer is |
275 |
actually hooked to the windows host. Windows just doesn't USE it except |
276 |
for relaying messages to/from the VMs. |
277 |
|
278 |
-- |
279 |
Dan Egli |
280 |
On my test server |