Skip to content

label-printer: sometimes the printer stops printing #170

@tingox

Description

@tingox

A service for the label printeris created as a docker container, see #168. Sometimes the printer stops printing labels, and restarting the service helps:

tingo@heim:~$ sudo systemctl restart docker-service-p2k16-label-server
sudo: unable to resolve host heim: Name or service not known

before the service is restarted, it is not possible to see that there is anything wrong with it

tingo@heim:~$ systemctl status docker-service-p2k16-label-server
● docker-service-p2k16-label-server.service - Docker service: p2k16-label-server
     Loaded: loaded (/etc/systemd/system/docker-service-p2k16-label-server.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sat 2022-05-07 14:07:31 CEST; 1 months 0 days ago
    Process: 1379 ExecStartPre=/usr/bin/docker-compose pull (code=exited, status=0/SUCCESS)
    Process: 1571 ExecStart=/usr/bin/docker-compose up -d (code=exited, status=0/SUCCESS)
   Main PID: 1571 (code=exited, status=0/SUCCESS)
        CPU: 1.627s

May 07 14:07:24 heim systemd[1]: Starting Docker service: p2k16-label-server...
May 07 14:07:28 heim docker-compose[1379]: Pulling p2k16-label ...
May 07 14:07:29 heim docker-compose[1379]: [259B blob data]
May 07 14:07:30 heim docker-compose[1571]: Starting p2k16-label-server_p2k16-label_1 ...
May 07 14:07:31 heim docker-compose[1571]: [64B blob data]
May 07 14:07:31 heim systemd[1]: Finished Docker service: p2k16-label-server.

it looks the same after it is restarted

tingo@heim:~$ systemctl status docker-service-p2k16-label-server
● docker-service-p2k16-label-server.service - Docker service: p2k16-label-server
     Loaded: loaded (/etc/systemd/system/docker-service-p2k16-label-server.service; enabled; vendor preset: enabled)
     Active: active (exited) since Tue 2022-06-07 21:22:16 CEST; 2s ago
    Process: 1192842 ExecStartPre=/usr/bin/docker-compose pull (code=exited, status=0/SUCCESS)
    Process: 1192844 ExecStart=/usr/bin/docker-compose up -d (code=exited, status=0/SUCCESS)
   Main PID: 1192844 (code=exited, status=0/SUCCESS)
        CPU: 1.243s

Jun 07 21:22:14 heim systemd[1]: Starting Docker service: p2k16-label-server...
Jun 07 21:22:14 heim docker-compose[1192842]: Pulling p2k16-label ...
Jun 07 21:22:15 heim docker-compose[1192842]: [259B blob data]
Jun 07 21:22:16 heim docker-compose[1192844]: Starting p2k16-label-server_p2k16-label_1 ...
Jun 07 21:22:16 heim docker-compose[1192844]: [64B blob data]
Jun 07 21:22:16 heim systemd[1]: Finished Docker service: p2k16-label-server.

Perhaps we should change the way p2k16 talks to the service; it could ask "hello, are you there?" and expect an answer "yes, I'm ready" before trying to print, That way it would be possible to show an error message to the user if the service doesn't respond.
(if we want end-to-end checking, the service should probably talk to the printer before accepting print jobs as well)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions