Bug Filed on 01-07-2016: Pi Lost Connection Yesterday


#1

1. What OS? (Wheezy or Jessie)


Jessie

2. What class/size SD card? (ex. class 10 16gb)


8GB

3. What Model Pi? (A+, A, B+, B, Pi2)


Pi2

4. Please describe the bug / issue. Attaching any relevant screenshots would be very helpful! Thanks in advance.

As of yesterday my Pi is showing off line and I can’t seem to get it to reconnect. Tried a sudo services myDevices/webiopi restart and a full reboot. I seem to remember that the website had an update around the same time, possibly related?


Cayenne Product Update with New Feature and Bug Fixes
#2

Hello,

Please run some steps in order to help us debug:

  • provide the output of:
    ps axu | grep python
  • provide logs from /var/log/
    The name of the logs start with myDevices.
  • provide file content from
    cat /etc/myDevices/AppSettings.ini
    cat /etc/myDevices/Network.ini
  • if the processes (webiopi and myDevices) run we may need to enabled debug on the pi

A simple fix is to run the setup again with the same command.

cd /home/pi
sudo sh rpi_XXXX.sh -v

where rpi_XXXX.sh is your installer name.

Or you can remove the pi from your account and re-add it.


#3

pi@raspberrypi:~ ps axu | grep python root 1139 0.0 1.4 45288 13332 ? Sl 02:15 0:53 /usr/bin/python3 -m webiopi -l /var/log/webiopi -c /etc/webiopi/config pi 3186 0.0 0.1 4260 1844 pts/0 S+ 23:34 0:00 grep --color=auto python pi@raspberrypi:~ cat /etc/myDevices/AppSettings.ini
[Agent]
invitecode = tmgrtxifth
initialized = true
version = 1.0.0.17281
environment = live
updateprogress = https://cayenne.mydevices.com/js/angular/raspberrypi/md_install_progress
id = V03-EFE98C38-3537-3078-3431-1574-9D74-E99
Id = V03-EFE98C38-3537-3078-3431-B827-EBE9-8C38

pi@raspberrypi:~ cat /etc/myDevices/Network.ini [CONFIG] SARSServer=reg.mydevices.com ServerAddress=cloud.mydevices.com RemoteDesktopServerAddress=rds.vcom.com ServerPort=8181 pi@raspberrypi:~


#4

Ok so looks like myDevices process is not running.
If you use command:
myDevices -d

Does it return error or appear online.

  • if it returns error than please write the output here
  • if appears online means that the service entry is broken and we need to fix this problem

#5

V03-EFE98C38-3537-3078-3431-B827-EBE9-8C38
2016-01-08 00:52:04 - myDevices - ERROR - [Errno 13] Permission denied: '/var/log/myDevices.log’
Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/myDevices-0.1.17355-py3.4.egg/myDevices/main.py”, line 81, in
main(sys.argv)
File “/usr/local/lib/python3.4/dist-packages/myDevices-0.1.17355-py3.4.egg/myDevices/main.py”, line 69, in main
logToFile(logfile)
File “/usr/local/lib/python3.4/dist-packages/myDevices-0.1.17355-py3.4.egg/myDevices/utils/logger.py”, line 44, in logToFile
handler = TimedRotatingFileHandler(filename, when=“H”, interval=1, backupCount=12)
File “/usr/lib/python3.4/logging/handlers.py”, line 202, in init
BaseRotatingHandler.init(self, filename, ‘a’, encoding, delay)
File “/usr/lib/python3.4/logging/handlers.py”, line 57, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File “/usr/lib/python3.4/logging/init.py”, line 1006, in init
StreamHandler.init(self, self._open())
File “/usr/lib/python3.4/logging/init.py”, line 1030, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: ‘/var/log/myDevices.log’


#6

Sorry about the delay.
There must be a:
sudo myDevices -d


#7

Thanks for the reply. I’m out of town until the 13th but I will give that a try when I get home.


#8

pi@raspberrypi:~ $ sudo myDevices -d
V03-EFE98C38-3537-3078-3431-B827-EBE9-8C38
2016-01-15 00:43:55 - myDevices - INFO - Connecting to: cloud.mydevices.com:8181
[Fri Jan 15 00:43:55 2016] [debug] phase.c(121) axis2_handler_t *request_uri_based_dispatcher added to the index 0 of the phase Transport
[Fri Jan 15 00:43:55 2016] [debug] phase.c(121) axis2_handler_t *addressing_based_dispatcher added to the index 1 of the phase Transport
[Fri Jan 15 00:43:55 2016] [debug] phase.c(121) axis2_handler_t *rest_dispatcher added to the index 0 of the phase Dispatch
[Fri Jan 15 00:43:55 2016] [debug] phase.c(121) axis2_handler_t *soap_message_body_based_dispatcher added to the index 1 of the phase Dispatch
[Fri Jan 15 00:43:55 2016] [debug] phase.c(121) axis2_handler_t *soap_action_based_dispatcher added to the index 2 of the phase Dispatch
[Fri Jan 15 00:43:55 2016] [debug] phase.c(121) axis2_handler_t *dispatch_post_conditions_evaluator added to the index 0 of the phase PostDispatch
[Fri Jan 15 00:43:55 2016] [debug] phase.c(121) axis2_handler_t *context_handler added to the index 1 of the phase PostDispatch
[Fri Jan 15 00:43:55 2016] [debug] conf_builder.c(234) No custom dispatching order found. Continue with the default dispatching order
[Fri Jan 15 00:43:55 2016] [debug] conf_builder.c(379) Module addressing found in axis2.xml
[Fri Jan 15 00:43:55 2016] [debug] class_loader.c(140) /etc/myDevices/libs/axis2/lib/libaxis2_http_sender.so shared lib loaded successfully
[Fri Jan 15 00:43:55 2016] [debug] class_loader.c(140) /etc/myDevices/libs/axis2/lib/libaxis2_http_sender.so shared lib loaded successfully
[Fri Jan 15 00:43:55 2016] [debug] class_loader.c(140) /etc/myDevices/libs/axis2/lib/libaxis2_http_receiver.so shared lib loaded successfully
[Fri Jan 15 00:43:55 2016] [debug] class_loader.c(140) /etc/myDevices/libs/axis2/lib/libaxis2_http_receiver.so shared lib loaded successfully
[Fri Jan 15 00:43:55 2016] [info] No files in the path /etc/myDevices/libs/axis2/services.
[Fri Jan 15 00:43:55 2016] [debug] dep_engine.c(1283) axis2_dep_engine_load_module_dll: DLL path is : /etc/myDevices/libs/axis2/modules/addressing/libaxis2_mod_addr.so
[Fri Jan 15 00:43:55 2016] [debug] class_loader.c(140) /etc/myDevices/libs/axis2/modules/addressing/libaxis2_mod_addr.so shared lib loaded successfully
[Fri Jan 15 00:43:55 2016] [debug] dep_engine.c(1283) axis2_dep_engine_load_module_dll: DLL path is : /etc/myDevices/libs/axis2/modules/logging/libaxis2_mod_log.so
[Fri Jan 15 00:43:55 2016] [debug] class_loader.c(140) /etc/myDevices/libs/axis2/modules/logging/libaxis2_mod_log.so shared lib loaded successfully
[Fri Jan 15 00:43:55 2016] [debug] phase_holder.c(139) Add handler AddressingInHandler to phase Transport
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(139) Service name is : ANONYMOUS_SERVICE
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(2058) Trying to add this handler AddressingInHandler to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(2058) Trying to add this handler AddressingInHandler to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(2058) Trying to add this handler AddressingInHandler to system pre defined phases , but those handlers are already added to global chain which run irrespective of the service
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_resolver.c(723) Module name is:addressing
[Fri Jan 15 00:43:55 2016] [debug] phase_holder.c(139) Add handler AddressingOutHandler to phase MessageOut
2016-01-15 00:43:55 - myDevices - ERROR - While reading from ‘/etc/myDevices/AppSettings.ini’ [line 8]: option ‘id’ in section ‘Agent’ already exists
Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/myDevices-0.1.17355-py3.4.egg/myDevices/main.py”, line 81, in
main(sys.argv)
File “/usr/local/lib/python3.4/dist-packages/myDevices-0.1.17355-py3.4.egg/myDevices/main.py”, line 77, in main
client = CloudServerClient(HOST, PORT)
File “/usr/local/lib/python3.4/dist-packages/myDevices-0.1.17355-py3.4.egg/myDevices/cloud/client.py”, line 266, in init
self.config.readfp(fp)
File “/usr/lib/python3.4/configparser.py”, line 736, in readfp
self.read_file(fp, source=filename)
File “/usr/lib/python3.4/configparser.py”, line 691, in read_file
self._read(f, source)
File “/usr/lib/python3.4/configparser.py”, line 1070, in _read
fpname, lineno)
configparser.DuplicateOptionError: While reading from ‘/etc/myDevices/AppSettings.ini’ [line 8]: option ‘id’ in section ‘Agent’ already exists
Exception ignored in: <bound method CloudServerClient.del of <myDevices.cloud.client.CloudServerClient object at 0x763927d0>>
Traceback (most recent call last):
File “/usr/local/lib/python3.4/dist-packages/myDevices-0.1.17355-py3.4.egg/myDevices/cloud/client.py”, line 279, in del
self.updater.stop()
AttributeError: ‘CloudServerClient’ object has no attribute ‘updater’


#9

Just wanted to check back to see if you have any suggestions? I want to get this issue fixed so you know the problem but I also have a couple things I want to try which I can’t in offline mode.


#10

Hello,

So looks like your agent version had some bugs that are fixed in new versions.
One of the bug is the agent update issue. With that the agent will not update by itself.
You just need to:
sudo rm /etc/myDevices/AppSettings.ini
Run the setup that you first have on that Pi.
If you don’t have the setup anymore just remove the AppSettings.ini download new setup and
rename it to rpi_tmgrtxifth.sh
Run:
sudo sh rpi_tmgrtxifth.sh -v

This will fix your issue.


#11

I tried all the fixes you suggested and it did not work. There were 2 issue I saw during reinstall. There is a LONG pause at 80% where it appears to have froze…maybe add some output here as to what is happening for the normal install (without -v)? Then again at 98% (when it said “Configuring os and agent”) there is another pause that actually seems to have locked up. I allowed 10 minutes for the script to finish once it hit 98% and I had to use Ctrl+C 3 times (waited about 2 minutes after each Ctrl+C) before it finally finished. In the end my Pi is still offline.


#12

I tried sudo myDevices -d again and I’m getting a lot of errors now https://www.dropbox.com/s/i4get4m6fca10ck/error.txt?dl=0

Might I also suggest that you allow .txt files for upload here?

Edit:
I should add that the program never errors out like it did before, it keeps looping but never making a successful connection.


Cayenne Product Update with New Feature and Bug Fixes
#13

There can be an issue with the registration of the account/PI.

Please try to remove the pi from the account and re-add as new PI/controller. Running new setup will be required.
This way will register again.

If this will not work we can do a remote session to your pi.


#14

That seems to have done the trick


#15

Hey Adam,

Glad we finally resolved this…sorry it took so long and that you had to remove the pi from the account.

Anyway, resolved this ticket :slightly_smiling:
-B