ippsample icon indicating copy to clipboard operation
ippsample copied to clipboard

ippserver: Jobs in "processing-stopped" state and "job-fetchable" but Get-Notifications reports no jobs

Open wifiprintguy opened this issue 6 years ago • 5 comments
trafficstars

  1. Start your ippserver
$ ./test/start-server.sh
  1. Find your ippserver hosted Printers (infra and ipp-everywhere-pdf)
$ ./tools/ippfind
  1. Create a couple of Jobs
$ ./tools/ipptool -vt ipp://localhost:8000/ipp/print/infra -f ./examples/testfile.pdf ./examples/create-job.test
$ ./tools/ipptool -vt 'ipp://localhost:8000/ipp/print/infra' -f ./examples/testfile.pdf ./examples/create-job.test
  1. Confirm that the jobs are there and fetchable
$ ./tools/ipptool -vt ipp://localhost:8000/ipp/print/infra ./examples/get-jobs-fetchable.test

(If this shows no jobs, there are other defects to fix first. But this is working currently.)

  1. Start your ippproxy to make the infra queue the Infrastructure Printer and the ipp-everywhere-pdf the Physical Printer
$ ./tools/ippproxy -vv -d ipp://localhost:8000/ipp/print/ipp-everywhere-pdf ipp://localhost:8000/ipp/print/infra

Expected results: It finds the two jobs and fetches them.

Actual results: The ippserver process implementing the infra Printer fails to report the presence of jobs in its Get-Notifications response.

wifiprintguy avatar May 30 '19 16:05 wifiprintguy

Get-Notifications only reports new events AFTER the subscription is created.

Get-Jobs with which-jobs='fetchable' should prime things in ippproxy, checking...

michaelrsweet avatar May 30 '19 19:05 michaelrsweet

Ah, you are right, the ordering of when the ippproxy is started affects this. If the ippproxy is started before the Jobs are created, it fetches them. (There are other issues I'm tracking down that will be filed soon.)

IMHO, the ippproxy should be getting the jobs already fetchable when it starts up, but it's not.

wifiprintguy avatar May 30 '19 19:05 wifiprintguy

Yes, the spec is pretty clear about the startup sequence for proxies so they can sync up the state of existing jobs...

michaelrsweet avatar May 30 '19 20:05 michaelrsweet

2019-09-18T15:05:21.823Z [Job 1] job-id integer '1' 2019-09-18T15:05:21.823Z [Job 1] requesting-user-name nameWithoutLanguage 'XXX' 2019-09-18T15:05:21.823Z [Job 1] document-format mimeMediaType 'application/pdf' 2019-09-18T15:05:21.823Z [Job 1] compression keyword 'gzip' 2019-09-18T15:05:21.823Z [Job 1] last-document boolean 'true' 2019-09-18T15:05:21.824Z [Job 1] Unable to create local job: Broken pipe

This is what I'm getting sometime after following the steps included in the description of this issue.

Sunil-P avatar Sep 18 '19 15:09 Sunil-P

After commenting out the following line

ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "compression-accepted", NULL, "gzip");

in ippproxy.c, the proxy seems to give jobs to local printer properly without the broken pipe alert. However, when the local printer completes the job, the return status doesn't get sent back to the infra printer. Seems like an unrelated issue..

Sunil-P avatar Oct 09 '19 09:10 Sunil-P

The notification is working, but ippproxy isn't doing an initial Get-Jobs with which-jobs='fetchable'... Plus it doesn't retry or abort the job if things go wrong... Need more error handling for sure...

michaelrsweet avatar Sep 26 '22 20:09 michaelrsweet

OK, think I have this fixed now.

michaelrsweet avatar Sep 27 '22 01:09 michaelrsweet