Loraserver not starting after reboot: redis connection error: dial

If I reboot my server the loraserver does not startup automatically.
If I then run “service loraserver start” by hand everything work perfectly until next reboot.
After boot loraserver.log shows:

time=“2018-08-19T12:19:48+12:00” level=info msg=“starting LoRa Server” band=“IN_865_867” docs=“https://docs.loraserver.io/
net_id=6d6a62 version=0.20.1
time=“2018-08-19T12:19:48+12:00” level=info msg=“setup redis connection pool” url=“redis://localhost:6379”
time=“2018-08-19T12:19:48+12:00” level=info msg=“connecting to postgresql”
time=“2018-08-19T12:19:48+12:00” level=info msg=“backend/gateway: connecting to mqtt broker” server=“tcp://localhost:1883”
time=“2018-08-19T12:19:48+12:00” level=info msg=“connecting to application-server” ca-cert= server=“127.0.0.1:8001” tls-cert
= tls-key=
time=“2018-08-19T12:19:48+12:00” level=info msg=“no network-controller configured”
time=“2018-08-19T12:19:48+12:00” level=info msg=“backend/gateway: connected to mqtt server”
time=“2018-08-19T12:19:48+12:00” level=info msg=“backend/gateway: subscribing to rx topic” topic=“gateway/+/rx”
time=“2018-08-19T12:19:48+12:00” level=fatal msg=“node-session migration error: get keys error: redis connection error: dial
tcp [::1]:6379: getsockopt: connection refused”

Any help with this would be appreciated.

Make sure Redis is started before LoRa Server. I don’t think this issue is present anymore in the latest v1 and v2 versions.