Cayenne screen says OFFLINE

Problem: Can someone tell me whats going on?
The Cayenne package initially works, that is I can see the Mem, processor, & Storage metrics indicating some value other then 0 & it indicates that the Raspberry Pi3 is online, and everything is working at first, but then after stopping and restarting the raspberry Pi3 the Cayenne interface says “Offline”, and then I can’t control the Raspberry PI3 after that, but the Raspberry pi does have access to the internet, and I can ssh to it.

Notes:
-If I reinstall the Cayenne application it again initially works, but then after rebooting it no longer works as before.

Setup:
-Raspberry Pi 3 model B

  • 5v, 3Amp power supply
    -Cayenne web dashboard application installed
    -OS installed:
    pi@raspberrypi:/etc/myDevices $ uname -a
    Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
    pi@raspberrypi:/etc/myDevices $ cat /etc/os-release
    PRETTY_NAME=“Raspbian GNU/Linux 8 (jessie)”
    NAME=“Raspbian GNU/Linux”
    -I have installed Cayenne
    -I have installed python
    -I looked in the /var/logs directory and grep’ed for any errors here:
  1. kern.log:Nov 21 06:44:09 raspberrypi pulseaudio[945]: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method “GetProperties” with signature “” on interface “org.bluez.Manager” doesn’t exist

  2. myDevices.log:2017-11-29 18:01:30 - myDevices - ERROR - SendMessage fail
    myDevices.log:2017-11-29 18:03:32 - myDevices - ERROR - ReadMessage error
    myDevices.log:AttributeError: ‘NoneType’ object has no attribute ‘recv’

  3. syslog:Nov 21 06:44:03 raspberrypi lightdm[563]: ** (lightdm:563): WARNING **: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files.

  4. user.log.1:Nov 17 22:04:38 raspberrypi org.gtk.Private.GoaVolumeMonitor[857]: g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.

  5. webiopi:2017-11-09 04:39:29 - WebIOPi - ERROR - Device detector: [Errno 2] No such file or directory: ‘/sys/bus/w1/devices/w1_bus_master1/w1_master_slaves’
    This file above does exist:
    Check:
    pi@raspberrypi:/sys/devices/w1_bus_master1 $ ls -la /sys/devices/w1_bus_master1/w1_master_slaves
    -r–r–r-- 1 root root 4096 Nov 29 18:39 /sys/devices/w1_bus_master1/w1_master_slaves
    pi@raspberrypi:/sys/devices/w1_bus_master1 $ more w1_master_slaves
    00-4a0000000000
    00-ca0000000000

  6. Xorg.0.log: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.

More info/output from Ricks Raspberry Pi:
pi@raspberrypi:~ $ arp -a
? (192.168.1.254) at a4:ba:76:41:8c:0a [ether] on wlan0
pi@raspberrypi:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 4.4G 24G 16% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 104M 360M 23% /dev/shm
tmpfs 463M 6.4M 457M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 42M 21M 21M 50% /boot
tmpfs 93M 0 93M 0% /run/user/0
tmpfs 93M 0 93M 0% /run/user/1000
pi@raspberrypi:~ $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether b8:27:eb:96:00:a9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::a6b6:6b1c:b6a2:af0d/64 scope link tentative
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:c3:55:fc brd ff:ff:ff:ff:ff:ff
inet 192.168.1.72/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fda4:ba76:418c:a00:1c56:cc16:c97b:656e/64 scope global noprefixroute dynamic
valid_lft 6832sec preferred_lft 3232sec
inet6 fe80::a975:75a7:4967:a3f2/64 scope link
valid_lft forever preferred_lft forever
pi@raspberrypi:~ $ ping cloud.mydevices.com
PING cloud.mydevices.com (54.173.248.213) 56(84) bytes of data.
^C
cloud.mydevices.com ping statistics —
15 packets transmitted, 0 received, 100% packet loss, time 14004ms
$ telnet cloud.mydevices.com 8181
Trying 54.173.248.213…
Connected to cloud.mydevices.com.
Escape character is ‘^]’.
^]

telnet> quit
Connection closed.
pi@raspberrypi:~ $ which nslookup
pi@raspberrypi:~ $ which dig
pi@raspberrypi:~ $ which ping
/bin/ping
pi@raspberrypi:~ $ ping google.com
PING google.com (216.58.216.46) 56(84) bytes of data.
64 bytes from lax02s22-in-f46.1e100.net (216.58.216.46): icmp_seq=1 ttl=57 time=26.5 ms
64 bytes from lax02s22-in-f46.1e100.net (216.58.216.46): icmp_seq=2 ttl=57 time=30.2 ms
64 bytes from lax02s22-in-f46.1e100.net (216.58.216.46): icmp_seq=3 ttl=57 time=23.7 ms
^C
google.com ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 23.760/26.850/30.222/2.648 ms
pi@raspberrypi:~ $ sudo netstat -natp | grep -i established
Active Internet connections (servers and established)
tcp 0 0 192.168.1.72:37084 199.96.57.6:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:50210 107.23.65.136:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:58470 34.199.178.126:8181 ESTABLISHED 1134/python3
tcp 0 0 192.168.1.72:40474 107.23.65.136:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:51670 216.58.193.206:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:50062 107.23.65.136:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:34468 64.71.168.200:80 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:41930 34.214.166.89:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 127.0.0.1:34981 127.0.0.1:51362 ESTABLISHED 1020/vncserverui
tcp 0 0 192.168.1.72:43552 216.58.216.46:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:52384 216.58.193.212:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:50206 107.23.65.136:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:33662 64.71.168.200:80 ESTABLISHED 1612/libpepflashpla
tcp 0 0 127.0.0.1:51362 127.0.0.1:34981 ESTABLISHED 617/vncserver-x11-c
tcp 0 0 192.168.1.72:57518 52.45.215.199:443 ESTABLISHED 1612/libpepflashpla
tcp 0 0 192.168.1.72:54740 54.148.242.35:443 ESTABLISHED 1612/libpepflashpla
pi@raspberrypi:~ $ which telnet
/usr/bin/telnet
$ telnet cloud.mydevices.com 8181
Trying 54.173.248.213…
Connected to cloud.mydevices.com.
Escape character is ‘^]’.
^]

telnet> quit
Connection closed.
pi@raspberrypi:~ $ sudo service myDevices status
● myDevices.service - myDevices service
Loaded: loaded (/etc/systemd/system/myDevices.service; enabled)
Active: active (running) since Wed 2017-11-29 19:02:01 UTC; 22min ago
Main PID: 1134 (python3)
CGroup: /system.slice/myDevices.service
‣ 1134 /usr/bin/python3 -m myDevices -P /var/run/myDevices.pid

Nov 29 19:02:01 raspberrypi systemd[1]: Started myDevices service.
Nov 29 19:02:01 raspberrypi systemd[1134]: pam_exec(login:session): conversation failed
Nov 29 19:02:01 raspberrypi systemd[1134]: pam_unix(login:session): session opened for user root by (uid=0)
pi@raspberrypi:~ $ sudo service webiopi status
● webiopi.service - LSB: WebIOPi initscript
Loaded: loaded (/etc/init.d/webiopi)
Active: active (running) since Wed 2017-11-29 19:01:50 UTC; 23min ago
Process: 541 ExecStart=/etc/init.d/webiopi start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/webiopi.service
└─566 /usr/bin/python3 -m webiopi -l /var/log/webiopi -c /etc/webiopi/config

Nov 29 19:01:50 raspberrypi systemd[1]: Starting LSB: WebIOPi initscript…
Nov 29 19:01:50 raspberrypi systemd[1]: Started LSB: WebIOPi initscript.
pi@raspberrypi:~ $ ps axu | grep python
root 566 3.3 1.4 36040 13688 ? Sl 19:01 0:49 /usr/bin/python3 -m webiopi -l /var/log/webiopi -c /etc/webiopi/config
root 1134 14.8 2.2 138084 21732 ? Ssl 19:02 3:32 /usr/bin/python3 -m myDevices -P /var/run/myDevices.pid
pi 5602 0.0 0.2 4280 2020 pts/0 S+ 19:26 0:00 grep --color=auto python
pi@raspberrypi:~ $ cat /etc/myDevices/Network.ini
[CONFIG]
CayenneApi=https://api.mydevices.com
ServerAddress=cloud.mydevices.com
ServerPort=8181
pi@raspberrypi:~ $ sudo tail -n 50 /var/log/myDevices.log
2017-11-29 19:24:19 - myDevices - INFO - History CalculateAverages increment: 47
2017-11-29 19:24:19 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {‘a12b9a0f4ee53d2fb60542447dde52a49d1c5389’: 46, ‘d4d858ffde48264d728d1698381031fa1da034ee’: 46, ‘068702351c9d2ff6fe80b55483ee995d9d3d127b’: 46, ‘07fb628cedbff2baa2f0880a934fd5421c2244e6’: 46}}
2017-11-29 19:24:19 - myDevices - INFO - Save History Averages
2017-11-29 19:24:19 - myDevices - INFO - Memory usage : 45 size: 21724
2017-11-29 19:24:19 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=177.69, ru_stime=19.27, ru_maxrss=21724, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=420145, ru_majflt=6, ru_nswap=0, ru_inblock=4680, ru_oublock=5416, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=89565, ru_nivcsw=31933)
2017-11-29 19:24:19 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-11-29 19:24:19 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-11-29 19:24:28 - myDevices - INFO - SendHistoryData previously SendFailed items:
2017-11-29 19:24:49 - myDevices - INFO - History CalculateAverages increment: 48
2017-11-29 19:24:49 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {‘a12b9a0f4ee53d2fb60542447dde52a49d1c5389’: 47, ‘d4d858ffde48264d728d1698381031fa1da034ee’: 47, ‘068702351c9d2ff6fe80b55483ee995d9d3d127b’: 47, ‘07fb628cedbff2baa2f0880a934fd5421c2244e6’: 47}}
2017-11-29 19:24:49 - myDevices - INFO - Save History Averages
2017-11-29 19:24:49 - myDevices - INFO - Memory usage : 46 size: 21724
2017-11-29 19:24:49 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=181.93, ru_stime=19.67, ru_maxrss=21724, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=431046, ru_majflt=6, ru_nswap=0, ru_inblock=4680, ru_oublock=5512, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=91727, ru_nivcsw=32766)
2017-11-29 19:24:49 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-11-29 19:24:50 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-11-29 19:25:19 - myDevices - INFO - History CalculateAverages increment: 49
2017-11-29 19:25:19 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {‘a12b9a0f4ee53d2fb60542447dde52a49d1c5389’: 48, ‘d4d858ffde48264d728d1698381031fa1da034ee’: 48, ‘068702351c9d2ff6fe80b55483ee995d9d3d127b’: 48, ‘07fb628cedbff2baa2f0880a934fd5421c2244e6’: 48}}
2017-11-29 19:25:19 - myDevices - INFO - Save History Averages
2017-11-29 19:25:20 - myDevices - INFO - Memory usage : 47 size: 21732
2017-11-29 19:25:20 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=186.02, ru_stime=20.11, ru_maxrss=21732, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=441653, ru_majflt=6, ru_nswap=0, ru_inblock=4680, ru_oublock=5608, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=93809, ru_nivcsw=33340)
2017-11-29 19:25:20 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-11-29 19:25:20 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-11-29 19:25:28 - myDevices - INFO - SendHistoryData previously SendFailed items:
2017-11-29 19:25:46 - myDevices - INFO - Checking for updates…
2017-11-29 19:25:49 - myDevices - INFO - Checking update version
2017-11-29 19:25:49 - myDevices - INFO - https://updates.mydevices.com/raspberry/update /etc/myDevices/updates/update
2017-11-29 19:25:49 - myDevices - INFO - Updater retrieve update success
2017-11-29 19:25:49 - myDevices - INFO - History CalculateAverages increment: 50
2017-11-29 19:25:49 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {‘a12b9a0f4ee53d2fb60542447dde52a49d1c5389’: 49, ‘d4d858ffde48264d728d1698381031fa1da034ee’: 49, ‘068702351c9d2ff6fe80b55483ee995d9d3d127b’: 49, ‘07fb628cedbff2baa2f0880a934fd5421c2244e6’: 49}}
2017-11-29 19:25:49 - myDevices - INFO - Save History Averages
2017-11-29 19:25:49 - myDevices - INFO - Memory usage : 48 size: 21732
2017-11-29 19:25:49 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=190.08, ru_stime=20.58, ru_maxrss=21732, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=452876, ru_majflt=6, ru_nswap=0, ru_inblock=4680, ru_oublock=5712, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=96228, ru_nivcsw=34068)
2017-11-29 19:25:49 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-11-29 19:25:50 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-11-29 19:25:51 - myDevices - INFO - No new version detected. Closing update…
2017-11-29 19:26:19 - myDevices - INFO - History CalculateAverages increment: 51
2017-11-29 19:26:19 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {‘a12b9a0f4ee53d2fb60542447dde52a49d1c5389’: 50, ‘d4d858ffde48264d728d1698381031fa1da034ee’: 50, ‘068702351c9d2ff6fe80b55483ee995d9d3d127b’: 50, ‘07fb628cedbff2baa2f0880a934fd5421c2244e6’: 50}}
2017-11-29 19:26:19 - myDevices - INFO - Save History Averages
2017-11-29 19:26:19 - myDevices - INFO - Memory usage : 49 size: 21736
2017-11-29 19:26:19 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=193.95, ru_stime=20.99, ru_maxrss=21736, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=462565, ru_majflt=6, ru_nswap=0, ru_inblock=4680, ru_oublock=5808, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=98259, ru_nivcsw=34545)
2017-11-29 19:26:19 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-11-29 19:26:19 - myDevices - INFO - PacketTypes.PT_UTILIZATION
2017-11-29 19:26:28 - myDevices - INFO - SendHistoryData previously SendFailed items:
2017-11-29 19:26:49 - myDevices - INFO - History CalculateAverages increment: 52
2017-11-29 19:26:49 - myDevices - INFO - Calculate sensor info averages: {‘SensorsInfo’: {‘a12b9a0f4ee53d2fb60542447dde52a49d1c5389’: 51, ‘d4d858ffde48264d728d1698381031fa1da034ee’: 51, ‘068702351c9d2ff6fe80b55483ee995d9d3d127b’: 51, ‘07fb628cedbff2baa2f0880a934fd5421c2244e6’: 51}}
2017-11-29 19:26:49 - myDevices - INFO - Save History Averages
2017-11-29 19:26:49 - myDevices - INFO - Memory usage : 50 size: 21736
2017-11-29 19:26:49 - myDevices - INFO - Resouce usage info: resource.struct_rusage(ru_utime=198.2, ru_stime=21.38, ru_maxrss=21736, ru_ixrss=0, ru_idrss=0, ru_isrss=0, ru_minflt=472732, ru_majflt=6, ru_nswap=0, ru_inblock=4680, ru_oublock=5904, ru_msgsnd=0, ru_msgrcv=0, ru_nsignals=0, ru_nvcsw=100288, ru_nivcsw=35020)
2017-11-29 19:26:49 - myDevices - INFO - PacketTypes.PT_SYSTEM_INFO
2017-11-29 19:26:50 - myDevices - INFO - PacketTypes.PT_UTILIZATION
pi@raspberrypi:~ $ telnet cloud.mydevices.com 8181
Trying 54.173.248.213…
Connected to cloud.mydevices.com.
Escape character is ‘^]’.
^]

telnet> quit
Connection closed.
pi@raspberrypi:~ $

How do I paste a screen shot from scrot here?

I fixed this problem myself : (

What didn’t work:
-Removing and then re-installing my raspberrypi device in Cayenne (still showed offline after a reboot).
-Upgrading Jessie 4.4 to 4.9
-I ran through the check list and found the only possible problem was in the webiopi log: “systemd PAM_exec conversation failed”

What did work: Upgrading the raspbian operating system from jessie to stretch.
See doc on upgrading on this sight named: “Upgrading from Jessie to Stretch”

Hope this helps someone,
R.R.

2 Likes

great that you were able to solve the problem :slightly_smiling_face:

Hi @mr.rickrose,

I’m glad that you figured this out. @shramik_salgaonkar and I are here if anything else comes up :slight_smile:

~Benny

Hi Bestes,

Strangely Cayenne was working from the browser directly on the RaspberryPi-3, but then on my Android cell phone
were I loaded Cayenne for Android I added this RaspberryPi device, and was able to control the RaspberryPi-3 GPIO pins from the cell ph now, however control was again lost from Cayenne on the browser running directly on the RaspberryPi showing “Offline” again. Since I need to use the browser interface to setup other devices this is a problem. Can you think of any way to bring control back to Cayenne web application again?

Thank you,
Rick R.

Hi Shramiksalgaonkar,

Strangely Cayenne was working from the browser directly on the RaspberryPi-3, but then on my Android cell phone were I loaded Cayenne for Android I added this RaspberryPi device, and was able to control the RaspberryPi-3 GPIO pins from the cell ph now, however control was again lost from Cayenne on the browser running directly on the RaspberryPi showing “Offline” again. Since I need to use the browser interface to setup other devices this is a problem. Can you think of any way to bring control back to Cayenne web application again? Perhaps Cayenne cannot run from two separate places, that is Cayenne cannot run at the same time from my cell ph, and on the RaspberryPi browser at the same time? If that is the case then should I remove it from my cell phone to gain browser access/control back?

Thank you,
Rick R.

cayenne can run simultaneously on smartphone and on web. but it should be single device. i think you have added two separate devices on a one raspberry pi.
can you post a screenshot of the web dashboard.

2017-12-10-025335_8x39_scrot <–See only one device and it says Offline.
I only see the one Raspberry Pi device in the Cayenne interface.
I did have multiple Raspberry Pi’s defined for my one Raspberry Pi I have been I deleted the other duplicate RaspberryPi devices, but that did not fix my problem. I deleted all devices and then reinstalled locally and it works, but as when I add the device on my cell ph then it stops working over the web… There are no duplicates so whan else could it be?