Closed hftsai256 closed 4 years ago
The error message refers to the bjnp backend, I'm not sure whether AirSane can do anything about it. If the delay fixes it, it's fine.
I did a closer look on this and turns out they are two separate issues.
The first one is when airsaned
starts after the network interface is up, but before it is actually online. I found this reference and change
After=network.target
to
After=network-online.target
which can then bring up airsaned
on boot successfully.
The second one still remains after the first fix, but turns out it doesn't have impact on the actual functionality.
Thanks.
This is very helpful, thank you. I modified the systemd service description accordingly.
My /lib/systemd/system/airsaned.service
already had After=network-online.target
in it by default but still I had to add the ExecStartPre=/bin/sleep 15
before I could have the service start successfully on boot (on Raspberry Pi 3). More info in the issue I wrote (https://github.com/SimulPiscator/AirSane/issues/55) before finding this one.
[Unit]
Description=AirSane Imaging Service
After=network-online.target
[Service]
EnvironmentFile=-/etc/default/airsane
ExecStartPre=/bin/sleep 15
ExecStart=/usr/local/bin/airsaned --interface=${INTERFACE} --base-port=${BASE_PORT} --access-log=${ACCESS_LOG} --hotplug=${HOTPLUG} --mdns-announce=${M$
ExecReload=/bin/kill -HUP $MAINPID
User=saned
Group=saned
Type=simple
[Install]
WantedBy=multi-user.target
Alias=airsaned.service
I've noticed that the service may fail with the following error on boot:
I'm not an expert in networking services loading order but one hacky way to get around it could be delay the service by a couple of seconds e.g.: