Device is offline all the time

Dears,

I run resin on Raspberry Pi 3 but the device is offline all the time as shown :

https://imgur.com/7ehEbgy

I logged in into the host and run :

root@:~# journalctl -a -u openvpn-resin
– Logs begin at Wed 2018-02-28 06:08:21 UTC, end at Tue 2018-05-08 09:55:11 UTC. –
– No entries –

Any help to get the pi connect to resin network? BTW I am from Egypt

Thanks

Hi @m.nabil
Did you access the host using the dashboard?

Hi @lucianbuzzo

Thanks for your reply, I access the host using resin cli, by the following command :

sudo resin local ssh 192.168.1.167 -s

Thanks

Hi @m.nabil can you send me a link to the device summary page and enable support access for the device?

Hi @lucianbuzzo
Sure, here you are :

https://dashboard.resin.io/devices/a7b6c214e66bdb4e7e605d21e6fe9dff/summary

and I enabled the support access.

Thanks in advance

Is the device connected by ethernet or over Wifi?

the device is connected via ethernet

Can you run the following commands from a device connected to the same network as the device and post the output here?

curl https://api.resin.io/ping

and

nmap -p 443 api.resin.io

Hi @lucianbuzzo
Thanks for your fast reply, here are the outputs of the commands from a device connected to the same network :

λ curl https://api.resin.io/ping

OK

λ nmap -p 443 api.resin.io
Starting Nmap 7.70 (**** ) at 2018-05-08 15:54 Egypt Standard Time
Nmap scan report for ***** (34.202.104.136)
Host is up (0.15s latency).
Other addresses for ****** (not scanned): 52.86.191.185
rDNS record for 34.202.104.136: *********

PORT STATE SERVICE
443/tcp open https

Nmap done: 1 IP address (1 host up) scanned in 11.30 seconds

I replaced the urls with * as forum lime me to post only 2 links in a single post

Thanks in advance

Can you log in to the Host OS and run the following command then post the output?

journalctl -u resin-supervisor

Hi @lucianbuzzo

journalctl -u resin-supervisor

here is the output :

root@a7b6c21:~#     journalctl -u resin-supervisor
-- Logs begin at Wed 2018-02-28 06:08:21 UTC, end at Tue 2018-05-08 16:31:42 UTC. --
May 05 08:10:13 a7b6c21 systemd[1]: Starting Resin supervisor...
May 05 08:10:13 a7b6c21 balena[993]: Error response from daemon: No such container: resin_supervisor
May 05 08:10:13 a7b6c21 systemd[1]: Started Resin supervisor.
May 05 08:10:13 a7b6c21 healthdog[1009]: Error: No such object: resin_supervisor
May 05 08:10:13 a7b6c21 healthdog[1009]: Error: No such object: resin_supervisor
May 05 08:10:14 a7b6c21 healthdog[1009]: Error response from daemon: No such container: resin_supervisor
May 05 08:10:22 a7b6c21 healthdog[1009]: [2018-05-05T08:10:22.881Z] Event: Supervisor start {}
May 05 08:10:22 a7b6c21 healthdog[1009]: [2018-05-05T08:10:22.964Z] Starting native logger
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.386Z] Connectivity check enabled: true
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.395Z] Starting periodic check for IP addresses
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.411Z] Reporting initial state, supervisor version and API info
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.423Z] Event: Loading preloaded apps failed {"error":{"message":""}}
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.430Z] Starting API server
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.466Z] Ensuring device is provisioned
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.476Z] Event: Device bootstrap {}
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.495Z] New device detected. Provisioning...
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.515Z] Applying target state
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.692Z] Internet Connectivity: OK
May 05 08:10:24 a7b6c21 healthdog[1009]: [2018-05-05T08:10:24.171Z] Creating supervisor0 network
May 05 08:10:24 a7b6c21 healthdog[1009]: [2018-05-05T08:10:24.661Z] Event: Device bootstrap success {}
May 05 08:10:24 a7b6c21 healthdog[1009]: [2018-05-05T08:10:24.685Z] Reporting initial configuration
May 05 08:10:25 a7b6c21 healthdog[1009]: [2018-05-05T08:10:25.334Z] Finished applying target state
May 05 08:10:25 a7b6c21 healthdog[1009]: [2018-05-05T08:10:25.337Z] Apply success!
May 05 08:10:30 a7b6c21 healthdog[1009]: [2018-05-05T08:10:30.589Z] Starting current state report
May 05 08:10:30 a7b6c21 healthdog[1009]: [2018-05-05T08:10:30.608Z] Starting target state poll
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.693Z] Applying target state
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.903Z] Event: Apply config change in progress {}
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.964Z] Event: Apply config change success {}
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.969Z] Stopping native logger
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.971Z] Starting pubnub logger
May 05 08:10:32 a7b6c21 healthdog[1009]: [2018-05-05T08:10:32.386Z] Event: Network creation {}
May 05 08:10:33 a7b6c21 healthdog[1009]: [2018-05-05T08:10:33.310Z] Finished applying target state
May 05 08:10:33 a7b6c21 healthdog[1009]: [2018-05-05T08:10:33.315Z] Apply success!
May 08 15:34:57 a7b6c21 healthdog[1009]: [2018-05-08T15:34:57.728Z] Waiting for connectivity...
May 08 15:35:07 a7b6c21 healthdog[1009]: [2018-05-08T15:35:07.899Z] Internet Connectivity: OK
May 08 16:02:14 a7b6c21 healthdog[1009]: [2018-05-08T16:02:14.558Z] Waiting for connectivity...
May 08 16:02:24 a7b6c21 healthdog[1009]: [2018-05-08T16:02:24.776Z] Internet Connectivity: OK

Thanks

The supervisor logs look healthy and normal.
Can you run curl https://api.resin.io/ping from inside the device?

curl https://api.resin.io/ping

Hi @lucianbuzzo

here is the output from the device :

root@a7b6c21:~# curl https://api.resin.io/ping
OK

I think we can rule out issues with the network the device is connected to.
Can you try restarting the openvpn service and the supervisor?

systemctl restart openvpn-resin && systemctl restart resin-supervisor

Hi @lucianbuzzo

here is the output :

root@a7b6c21:~# systemctl restart openvpn-resin && systemctl restart resin-supervisor

root@a7b6c21:~# journalctl -u resin-supervisor
-- Logs begin at Sat 2018-05-05 08:10:02 UTC, end at Wed 2018-05-09 12:28:07 UTC. --
May 05 08:10:13 a7b6c21 systemd[1]: Starting Resin supervisor...
May 05 08:10:13 a7b6c21 balena[993]: Error response from daemon: No such container: resin_supervisor
May 05 08:10:13 a7b6c21 systemd[1]: Started Resin supervisor.
May 05 08:10:13 a7b6c21 healthdog[1009]: Error: No such object: resin_supervisor
May 05 08:10:13 a7b6c21 healthdog[1009]: Error: No such object: resin_supervisor
May 05 08:10:14 a7b6c21 healthdog[1009]: Error response from daemon: No such container: resin_supervisor
May 05 08:10:22 a7b6c21 healthdog[1009]: [2018-05-05T08:10:22.881Z] Event: Supervisor start {}
May 05 08:10:22 a7b6c21 healthdog[1009]: [2018-05-05T08:10:22.964Z] Starting native logger
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.386Z] Connectivity check enabled: true
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.395Z] Starting periodic check for IP addresses
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.411Z] Reporting initial state, supervisor version and API info
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.423Z] Event: Loading preloaded apps failed {"error":{"message":""}}
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.430Z] Starting API server
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.466Z] Ensuring device is provisioned
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.476Z] Event: Device bootstrap {}
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.495Z] New device detected. Provisioning...
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.515Z] Applying target state
May 05 08:10:23 a7b6c21 healthdog[1009]: [2018-05-05T08:10:23.692Z] Internet Connectivity: OK
May 05 08:10:24 a7b6c21 healthdog[1009]: [2018-05-05T08:10:24.171Z] Creating supervisor0 network
May 05 08:10:24 a7b6c21 healthdog[1009]: [2018-05-05T08:10:24.661Z] Event: Device bootstrap success {}
May 05 08:10:24 a7b6c21 healthdog[1009]: [2018-05-05T08:10:24.685Z] Reporting initial configuration
May 05 08:10:25 a7b6c21 healthdog[1009]: [2018-05-05T08:10:25.334Z] Finished applying target state
May 05 08:10:25 a7b6c21 healthdog[1009]: [2018-05-05T08:10:25.337Z] Apply success!
May 05 08:10:30 a7b6c21 healthdog[1009]: [2018-05-05T08:10:30.589Z] Starting current state report
May 05 08:10:30 a7b6c21 healthdog[1009]: [2018-05-05T08:10:30.608Z] Starting target state poll
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.693Z] Applying target state
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.903Z] Event: Apply config change in progress {}
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.964Z] Event: Apply config change success {}
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.969Z] Stopping native logger
May 05 08:10:31 a7b6c21 healthdog[1009]: [2018-05-05T08:10:31.971Z] Starting pubnub logger
May 05 08:10:32 a7b6c21 healthdog[1009]: [2018-05-05T08:10:32.386Z] Event: Network creation {}
May 05 08:10:33 a7b6c21 healthdog[1009]: [2018-05-05T08:10:33.310Z] Finished applying target state
May 05 08:10:33 a7b6c21 healthdog[1009]: [2018-05-05T08:10:33.315Z] Apply success!
May 08 15:34:57 a7b6c21 healthdog[1009]: [2018-05-08T15:34:57.728Z] Waiting for connectivity...
May 08 15:35:07 a7b6c21 healthdog[1009]: [2018-05-08T15:35:07.899Z] Internet Connectivity: OK
May 08 16:02:14 a7b6c21 healthdog[1009]: [2018-05-08T16:02:14.558Z] Waiting for connectivity...
May 08 16:02:24 a7b6c21 healthdog[1009]: [2018-05-08T16:02:24.776Z] Internet Connectivity: OK
May 08 17:19:51 a7b6c21 healthdog[1009]: [2018-05-08T17:19:51.624Z] Waiting for connectivity...
May 08 17:20:01 a7b6c21 healthdog[1009]: [2018-05-08T17:20:01.788Z] Internet Connectivity: OK
May 08 23:46:09 a7b6c21 healthdog[1009]: [2018-05-08T23:46:09.028Z] Waiting for connectivity...
May 08 23:46:19 a7b6c21 healthdog[1009]: [2018-05-08T23:46:19.186Z] Internet Connectivity: OK
May 09 01:41:20 a7b6c21 healthdog[1009]: [2018-05-09T01:41:20.269Z] Waiting for connectivity...
May 09 01:41:30 a7b6c21 healthdog[1009]: [2018-05-09T01:41:30.555Z] Internet Connectivity: OK
May 09 07:26:18 a7b6c21 healthdog[1009]: [2018-05-09T07:26:18.106Z] Waiting for connectivity...
May 09 07:26:28 a7b6c21 healthdog[1009]: [2018-05-09T07:26:28.271Z] Internet Connectivity: OK
May 09 12:20:25 a7b6c21 systemd[1]: Stopping Resin supervisor...
May 09 12:20:36 a7b6c21 balena[1144]: resin_supervisor
May 09 12:20:36 a7b6c21 systemd[1]: resin-supervisor.service: Main process exited, code=exited, status=137/n/a
May 09 12:20:36 a7b6c21 systemd[1]: Stopped Resin supervisor.
May 09 12:20:36 a7b6c21 systemd[1]: resin-supervisor.service: Unit entered failed state.
May 09 12:20:36 a7b6c21 systemd[1]: resin-supervisor.service: Failed with result 'exit-code'.
May 09 12:20:36 a7b6c21 systemd[1]: Starting Resin supervisor...
May 09 12:20:36 a7b6c21 balena[1191]: resin_supervisor
May 09 12:20:36 a7b6c21 systemd[1]: Started Resin supervisor.
May 09 12:20:42 a7b6c21 healthdog[1199]: [2018-05-09T12:20:42.963Z] Event: Supervisor start {}
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.017Z] Starting pubnub logger
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.276Z] Connectivity check enabled: true
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.286Z] Starting periodic check for IP addresses
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.300Z] Reporting initial state, supervisor version and API info
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.305Z] Starting API server
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.343Z] Ensuring device is provisioned
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.360Z] Applying target state
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.381Z] VPN status path exists.
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.459Z] Starting current state report
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.471Z] Starting target state poll
May 09 12:20:43 a7b6c21 healthdog[1199]: [2018-05-09T12:20:43.569Z] Internet Connectivity: OK
May 09 12:20:44 a7b6c21 healthdog[1199]: [2018-05-09T12:20:44.133Z] Finished applying target state
May 09 12:20:44 a7b6c21 healthdog[1199]: [2018-05-09T12:20:44.135Z] Apply success!
May 09 12:20:45 a7b6c21 healthdog[1199]: [2018-05-09T12:20:45.896Z] Applying target state
May 09 12:20:46 a7b6c21 healthdog[1199]: [2018-05-09T12:20:46.173Z] Finished applying target state
May 09 12:20:46 a7b6c21 healthdog[1199]: [2018-05-09T12:20:46.176Z] Apply success!
May 09 12:20:52 a7b6c21 systemd[1]: Stopping Resin supervisor...
May 09 12:21:03 a7b6c21 balena[1364]: resin_supervisor
May 09 12:21:03 a7b6c21 systemd[1]: Stopped Resin supervisor.
May 09 12:21:03 a7b6c21 systemd[1]: Starting Resin supervisor...
May 09 12:21:03 a7b6c21 balena[1394]: resin_supervisor
May 09 12:21:03 a7b6c21 systemd[1]: Started Resin supervisor.
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.144Z] Event: Supervisor start {}
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.194Z] Starting pubnub logger
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.464Z] Connectivity check enabled: true
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.473Z] Starting periodic check for IP addresses
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.489Z] Reporting initial state, supervisor version and API info
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.493Z] Starting API server
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.536Z] Ensuring device is provisioned
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.553Z] Applying target state
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.586Z] VPN status path exists.
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.664Z] Starting current state report
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.678Z] Starting target state poll
May 09 12:21:10 a7b6c21 healthdog[1401]: [2018-05-09T12:21:10.771Z] Internet Connectivity: OK
May 09 12:21:11 a7b6c21 healthdog[1401]: [2018-05-09T12:21:11.363Z] Finished applying target state
May 09 12:21:11 a7b6c21 healthdog[1401]: [2018-05-09T12:21:11.365Z] Apply success!
May 09 12:21:11 a7b6c21 healthdog[1401]: [2018-05-09T12:21:11.950Z] Applying target state
May 09 12:21:12 a7b6c21 healthdog[1401]: [2018-05-09T12:21:12.287Z] Finished applying target state
May 09 12:21:12 a7b6c21 healthdog[1401]: [2018-05-09T12:21:12.288Z] Apply success!
May 09 12:24:53 a7b6c21 systemd[1]: Stopping Resin supervisor...
May 09 12:25:04 a7b6c21 balena[1801]: resin_supervisor
May 09 12:25:04 a7b6c21 systemd[1]: resin-supervisor.service: Main process exited, code=exited, status=137/n/a
May 09 12:25:04 a7b6c21 systemd[1]: Stopped Resin supervisor.
May 09 12:25:04 a7b6c21 systemd[1]: resin-supervisor.service: Unit entered failed state.
May 09 12:25:04 a7b6c21 systemd[1]: resin-supervisor.service: Failed with result 'exit-code'.
May 09 12:25:04 a7b6c21 systemd[1]: Starting Resin supervisor...
May 09 12:25:04 a7b6c21 balena[1830]: resin_supervisor
May 09 12:25:04 a7b6c21 systemd[1]: Started Resin supervisor.
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.433Z] Event: Supervisor start {}
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.482Z] Starting pubnub logger
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.740Z] Connectivity check enabled: true
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.749Z] Starting periodic check for IP addresses
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.768Z] Reporting initial state, supervisor version and API info
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.773Z] Starting API server
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.814Z] Ensuring device is provisioned
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.827Z] Applying target state
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.846Z] VPN status path exists.
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.923Z] Starting current state report
May 09 12:25:11 a7b6c21 healthdog[1839]: [2018-05-09T12:25:11.938Z] Starting target state poll
May 09 12:25:12 a7b6c21 healthdog[1839]: [2018-05-09T12:25:12.607Z] Finished applying target state
May 09 12:25:12 a7b6c21 healthdog[1839]: [2018-05-09T12:25:12.609Z] Apply success!
May 09 12:25:13 a7b6c21 healthdog[1839]: [2018-05-09T12:25:13.005Z] Internet Connectivity: OK
May 09 12:25:14 a7b6c21 healthdog[1839]: [2018-05-09T12:25:14.351Z] Applying target state
May 09 12:25:14 a7b6c21 healthdog[1839]: [2018-05-09T12:25:14.688Z] Finished applying target state
May 09 12:25:14 a7b6c21 healthdog[1839]: [2018-05-09T12:25:14.689Z] Apply success! 

root@a7b6c21:~# journalctl -u openvpn-resin
-- Logs begin at Sat 2018-05-05 08:10:02 UTC, end at Wed 2018-05-09 12:30:26 UTC. --
-- No entries --
root@a7b6c21:~#

Ok, it appears that the device is able to report its initial state. Can you post the output of dmesg perhaps we can find more debugging information there.

hi @lucianbuzzo
here is the outpout of dmesg :

https://pastebin.com/rtwVip0b

Thanks

surprisingly, the device went online for almost 16 hours and then goes to offline again!

Hello @m.nabil

Could you please paste the openvpn-resin logs here?

Hi @zvin

I ran the following command :

root@a7b6c21:~# journalctl -a -u openvpn-resin
-- Logs begin at Sat 2018-05-12 09:44:47 UTC, end at Sun 2018-05-13 14:34:29 UTC. --
-- No entries --