-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raw socket gets data, but does not send data to printer #331
Comments
Try running
It is possible the default listener isn't responding to the loopback interface... |
Pinging the port via
but I'll recheck. In the meantime I'm on another machine, but sw versions are the same, but the port differs. However, the behavior is the same with hostname and non-localhost IP - the port is accessible, wireshark shows the data was sent, but no TCP FIN packet (which makes netcat hang):
|
OK, I think I know what is going wrong - when the maximum number of active jobs is not set (default), the raw loop doesn't get a chance to accept the connection. Simple fix... [master 5db71eb] Fix the raw input socket code to not wait indefinitely when max-active-jobs is 0 (Issue #331) [v1.4.x 3e1524c] Fix the raw input socket code to not wait indefinitely when max-active-jobs is 0 (Issue #331) |
Unfortunately, it didn't help :( - I heard there was some issues when accessing lower numbered ports, but I don't remember what was the fix - disabling firewall and selinux did not help. |
910x isn't a low-numbered ("privileged") port less than 1024. Please collect debug logs and try this with the testpappl program from the PAPPL sources (to isolate issues with a particular printer application). |
Do you mean debug logs from lprint? Or does pappl have another way of debugging? The current lprint logs are EDIT: From the log:
that 10s is the time frame when I wait whether the netcat finishes. Looks like lprint is looping here:
After file is sent, poll always returns 0 and revents is 0 as well. Probably
should be |
For some reason I see bytes being 0, but the execution does not go into true branch even if the condition is <=... |
netcat and similar tools hang when they send data to PAPPL's raw socket. It is because these tools wait for input from the destination, and we never end because update `activity` every time `poll()` returns non-negative value, and the tools never send POLLHUP. The proposed fix is to update `activity` only when we read from the socket, and break out of the loop after 10s of inactivity. Fixes michaelrsweet#331
Describe the bug
Printing via raw socket does not work, because file is not sent to the device. This current behavior was seen when using lprint, but probably all PAPPL based printer applications are affected.
To Reproduce
Steps to reproduce the behavior:
lprint server
with-o server-options=raw-socket
http://localhost:8000
- Zebra GK420t in my case (driver ZPL, 4inch, 203dpi)avahi-browse -avrt
on Linux:Expected behavior
Printer-ready file will be printed
System Information:
Additional context
Attaching debug log from lprint and packet capture between my machine and printer - first it is attempt to send the file via lprint raw socket, then, after approx. 10s, I sent the same file directly to the printer via netcat. I can see in the log that the file is sent to the destination in both cases, but no activity after that in lprint case.
lprint.pcap.txt
lprint-raw.log.txt
The text was updated successfully, but these errors were encountered: