Jump to content

Help with NodeLink autostart


kzboray

Recommended Posts

Posted

I use the following to start NodeLink as a service on a Pi reboot and it's been working well up until recently. 

[Unit]
Description=NodeLink Server
Documentation=http://automationshack.com/nodelink.html
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/mono /opt/nodelink/NodeLink.exe
Restart=always

[Install]
WantedBy=multi-user.target

With the release of 9.11 and above upon restarting the Pi this is what happens.

pi@raspberrypi:~ $ sudo systemctl status nodelink
● nodelink.service - NodeLink Server
   Loaded: loaded (/lib/systemd/system/nodelink.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-05 11:15:38 PDT; 42s ago
     Docs: http://automationshack.com/nodelink.html
 Main PID: 351 (mono)
   CGroup: /system.slice/nodelink.service
           └─351 /usr/bin/mono /opt/nodelink/NodeLink.exe

Apr 05 11:15:38 raspberrypi systemd[1]: Started NodeLink Server.
Apr 05 11:15:42 raspberrypi mono[351]: 2018-04-05 11:15:42 - ISY NodeLink Server v0.9.12 started [4]
Apr 05 11:15:42 raspberrypi mono[351]: 2018-04-05 11:15:42 - Mono version: 5.10.1.20 (tarball Thu Mar 29 12:41:14 UTC 2018)
Apr 05 11:15:44 raspberrypi mono[351]: 2018-04-05 11:15:44 - Web config server started (http://127.0.0.1:8090)
Apr 05 11:15:44 raspberrypi mono[351]: 2018-04-05 11:15:44 - ISY resolved to 10.0.0.50
Apr 05 11:15:45 raspberrypi mono[351]: 2018-04-05 11:15:45 - ISY Error: Network is unreachable (profiles/ns/0/connection)
Apr 05 11:15:45 raspberrypi mono[351]: 2018-04-05 11:15:45 - ISY Error: Error getting Node Server list - Root element is missing.
Apr 05 11:15:45 raspberrypi mono[351]: 2018-04-05 11:15:45 - ISY Node Server profile set to 1

Restarting the service, systemstl restart nodelink allows everything to work as expected.

pi@raspberrypi:~ $ sudo systemctl restart nodelink
pi@raspberrypi:~ $ sudo systemctl status nodelink
● nodelink.service - NodeLink Server
   Loaded: loaded (/lib/systemd/system/nodelink.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-05 11:16:59 PDT; 2s ago
     Docs: http://automationshack.com/nodelink.html
 Main PID: 988 (mono)
   CGroup: /system.slice/nodelink.service
           └─988 /usr/bin/mono /opt/nodelink/NodeLink.exe

Apr 05 11:16:59 raspberrypi systemd[1]: Started NodeLink Server.
Apr 05 11:17:00 raspberrypi mono[988]: 2018-04-05 11:16:59 - ISY NodeLink Server v0.9.12 started [4]
Apr 05 11:17:00 raspberrypi mono[988]: 2018-04-05 11:17:00 - Mono version: 5.10.1.20 (tarball Thu Mar 29 12:41:14 UTC 2018)
Apr 05 11:17:01 raspberrypi mono[988]: 2018-04-05 11:17:01 - Web config server started (http://10.0.0.55:8090)
Apr 05 11:17:01 raspberrypi mono[988]: 2018-04-05 11:17:01 - ISY resolved to 10.0.0.50

I'm not sure why this is happening and could use some advice.

Posted

So I went a head and made the change to raspi-config. sudo raspi-config. I changed option 3 <boot options> B2 wait for network at boot to <yes> and rebooted the Pi. Unfortunately NodeLink again failed to start with the same error.

Apr 05 11:15:38 raspberrypi systemd[1]: Started NodeLink Server.
Apr 05 11:15:42 raspberrypi mono[351]: 2018-04-05 11:15:42 - ISY NodeLink Server v0.9.12 started [4]
Apr 05 11:15:42 raspberrypi mono[351]: 2018-04-05 11:15:42 - Mono version: 5.10.1.20 (tarball Thu Mar 29 12:41:14 UTC 2018)
Apr 05 11:15:44 raspberrypi mono[351]: 2018-04-05 11:15:44 - Web config server started (http://127.0.0.1:8090)
Apr 05 11:15:44 raspberrypi mono[351]: 2018-04-05 11:15:44 - ISY resolved to 10.0.0.50
Apr 05 11:15:45 raspberrypi mono[351]: 2018-04-05 11:15:45 - ISY Error: Network is unreachable (profiles/ns/0/connection)
Apr 05 11:15:45 raspberrypi mono[351]: 2018-04-05 11:15:45 - ISY Error: Error getting Node Server list - Root element is missing.
Apr 05 11:15:45 raspberrypi mono[351]: 2018-04-05 11:15:45 - ISY Node Server profile set to 1

Any other suggestion?

Posted

You're network still isn't initialized, hence the bind to 127.0.0.1.  

Add a ExecStartPre delay before the ExecStart command.  

ExecStartPre=/bin/sleep 10

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...