Error while start myDevices service


#1

When i try to start myDevices service i get error:

Jan 21 03:52:16 raspberrypi systemd[2480]: pam_exec(login:session): conversation failed
Jan 21 03:52:16 raspberrypi systemd[2480]: pam_unix(login:session): session opened for user root by (uid=0)

But if i start it like that:
sudo myDevices -d
all wark and i can check at site any info about rpi.
There /AppSettings.ini:

[Agent]
InviteCode = oospknh0dh
Initialized = true
Version = 1.0.0.20741
Environment = live
UpdateProgress = https://cayenne.mydevices.com/js/angular/raspberrypi/md_install_progress
Id = V03-A93C5DBE-xxxx-3078-3431-xxxx-EB3C-xxxx

There os:

PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

When i install i try web and android. Model Pi - 3
If dont do anything install just stuck on rebooting pi


#2

Hi @vladsudakov5, welcome to the Cayenne Community.

I’m not sure if I’m totally following the issue, you shouldn’t have to run any commands to start our service manually on your Pi.

If you log into the web dashboard at https://cayenne.mydevices.com/cayenne/login are you able to see the Pi you installed on as online?


#3

Yes, the service should automatically start on boot. If you want to manually start and stop the service it does require root level permissions. I’m not sure why it would not work on boot, but if you run the installer script again that may repair anything that was not installed correctly the first time. Make sure you run the installer as root (sudo).


#4

I try about 5 reinstall caynne from android and just in terminal, but anyway i have this problem. I too try install without delete and with delete script.
I can run with screen for 24/7, but i think it bad method.
screen sudo myDevices


#5

If you install from the terminal, do you see the Pi as online in your dashboard? You shouldn’t have to do anything fancy to get us running, at least not on a default Raspbian Jessie install.

What does your output from systemctl list-unit-files | grep enabled look like?


#6

If i just install and dont do anything its wait when pi reboot.

autologin@.service enabled
avahi-daemon.service enabled
bluetooth.service enabled
cron.service enabled
dbus-org.bluez.service enabled
dbus-org.freedesktop.Avahi.service enabled
dhcpcd.service enabled
display-manager.service enabled
dnsmasq.service enabled
fake-hwclock.service enabled
hciuart.service enabled
hwclock-save.service enabled
lightdm.service enabled
myDevices.service enabled
nginx.service enabled
rpi-display-backlight.service enabled
rsyslog.service enabled
ssh.service enabled
sshswitch.service enabled
syslog.service enabled
transmission-daemon.service enabled
avahi-daemon.socket enabled
remote-fs.target enabled


#7

Ok, that looks correct, and if you run
sudo service --status-all

I would expect it to show webiopi but not mydevices. That’s how it is on my test Pis and they are all connected to Cayenne OK.

I want to make sure I’m fully understanding the issue. Ignoring this service business for a moment, if you log into your account at https://cayenne.mydevices.com/cayenne/login do you see the Pi in question as online. (i.e Black in the left sidebar and with a ‘last data packet’ time in the last minute or so?)


#8

[ - ] alsa-utils
[ + ] avahi-daemon
[ + ] bluetooth
[ - ] bootlogs
[ - ] bootmisc.sh
[ - ] checkfs.sh
[ - ] checkroot-bootclean.sh
[ - ] checkroot.sh
[ + ] console-setup
[ + ] cron
[ + ] dbus
[ + ] dhcpcd
[ + ] dnsmasq
[ + ] dphys-swapfile
[ + ] fake-hwclock
[ + ] hostapd
[ - ] hostname.sh
[ - ] hwclock.sh
[ - ] isc-dhcp-server
[ + ] kbd
[ + ] keyboard-setup
[ - ] killprocs
[ + ] kmod
[ + ] lightdm
[ + ] minissdpd
[ - ] motd
[ - ] mountall-bootclean.sh
[ - ] mountall.sh
[ - ] mountdevsubfs.sh
[ - ] mountkernfs.sh
[ - ] mountnfs-bootclean.sh
[ - ] mountnfs.sh
[ + ] networking
[ - ] nfs-common
[ + ] nginx
[ + ] nmbd
[ + ] ntp
[ - ] plymouth
[ - ] plymouth-log
[ + ] procps
[ + ] raspi-config
[ + ] rc.local
[ - ] rmnologin
[ - ] rpcbind
[ - ] rsync
[ + ] rsyslog
[ + ] samba
[ + ] samba-ad-dc
[ - ] screen-cleanup
[ - ] sendsigs
[ + ] shellinabox
[ + ] smbd
[ + ] ssh
[ - ] sudo
[ + ] transmission-daemon
[ + ] triggerhappy
[ + ] udev
[ + ] udev-finish
[ - ] umountfs
[ - ] umountnfs.sh
[ - ] umountroot
[ + ] urandom
[ + ] webiopi
[ - ] x11-common

sudo service myDevices status
● myDevices.service - myDevices service
   Loaded: loaded (/etc/systemd/system/myDevices.service; enabled)
   Active: failed (Result: start-limit) since Fri 2017-02-03 16:31:03 UTC; 51s ago
  Process: 4885 ExecStart=/usr/bin/python3 -m myDevices -P /var/run/myDevices.pid (code=exited, status=1/FAILURE)
 Main PID: 4885 (code=exited, status=1/FAILURE)

Feb 03 16:31:03 raspberrypi systemd[1]: Unit myDevices.service entered failed state.
Feb 03 16:31:03 raspberrypi systemd[1]: myDevices.service holdoff time over, scheduling restart.
Feb 03 16:31:03 raspberrypi systemd[1]: Stopping myDevices service...
Feb 03 16:31:03 raspberrypi systemd[1]: Starting myDevices service...
Feb 03 16:31:03 raspberrypi systemd[1]: myDevices.service start request repeated too quickly, refusing to start.
Feb 03 16:31:03 raspberrypi systemd[1]: Failed to start myDevices service.
Feb 03 16:31:03 raspberrypi systemd[1]: Unit myDevices.service entered failed state.

Pi is offline, always.
I can run it if i run “sudo myDevices -d”, but service dont run


#9

Thanks for the detailed info. Perhaps it could be some conflict with other running or installed software on the Pi? I can see items like samba/nginx/transmission there that aren’t default packages in a Jessie install. It may be a worthwhile troubleshooting step to disable some of these and see if the behavior for the myDevices service changes, or if you have a 2nd SD card, to see if you have better behavior with a fresh install of Jessie.

This isn’t to say that we shouldn’t play nicely with that other (very common) software, but it may help narrow down a conflict or an assumption we made in development that’s broken in the case of your particular system.