Skip to content
jhaack edited this page Apr 6, 2016 · 26 revisions

Frequently Asked Questions

The purpose of this page is to share issues other developers have run into either with the platform or the specifics of their deployment. It is meant to supplement the issue tracking in github.


This is a list of some of the hardware/OS combinations VOLTTRON has been deployed on. Using one of these combinations is not a requirement.

  • Banana Pi Pro – Debian, Ubuntu, Arch Linux
  • Banana Pi M2 – Debian, Ubuntu, Arch Linux
  • Banana Pi M3 – Debian, Ubuntu, Arch Linux
  • Raspberry Pi 2 – Debian, Ubuntu, Arch Linux, Fedora
  • Raspberry Pi 3 – Debian, Ubuntu, Arch Linux, Fedora
  • Intel MinnowBoard (Max, Turbot) - Debian, Ubuntu, Arch Linux, Fedora
  • BeagleBone Black – Debian, Ubuntu, Arch Linux, Angstrom
  • BeagleBone – Debian, Ubuntu
  • BeagleBoard XM – Ubuntu, Debian
  • Intel Comput Stick – Ubuntu, Arch Linux
  • Odroid XU4 – Debian, Ubuntu, Arch Linux
  • Odroid C1+ – Debian, Ubuntu, Arch Linux
  • Panda Board – Debian, Ubuntu, Arch Linux
  • Radxa Rock – Ubuntu

If you are seeing errors in the log similar to: ValueError: invalid literal for int() with base 10: '27+00' then you have run into this error which is caused by: https://bugs.python.org/issue19065

The built in Python library dbapi2.py has issues parsing timestamps with timezones in them. In fact, it can store timestamps that it will be unable to parse as they come back out. This is especially a problem in Python 2.7.3 where a timestamp containing microseconds and a timezone will fail to parse. This is fixed in newer versions of Python. This problem is documented in issue #91.

Another issue (#174) occurs if the timestamp does not contain microseconds. This is in the next line of code in dbapi2 and is not fixed in newer versions of Python. VOLTTRON has implemented a workaround in version 3.0.1 to make sure all datetimes have a timestamp. While less than ideal, this has the smallest impact on the rest of the framework. Anyone working off the original 3.0 or beta releases should update immediately to get this fix.

We agree! This is why we created shortcut scripts. Under volttron/scripts are a collection of scripts we have used to make life easier. For instance, scripts/core/make-listener provides an example script for modification. Copy this file to the root of the project and edit the lines for agent source, config file, and tag name. Then running this script will: stop the tagged agent, disable autostart, remove it, build, install, enable (if set), and start it. Having this in one command greatly reduces the development cycle for an agent.

The following error message (or similar) is generated when I run the python2.7 bootstrap.py command to install VOLTTRON on a BeagleBone Black

Searching for BACpypes>=0.10,<0.11
Reading https://pypi.python.org/simple/BACpypes/
Download error on https://pypi.python.org/simple/BACpypes/: [Errno 1] _ssl.c:504:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some
packages may not be found!
Couldn't find index page for 'BACpypes' (maybe misspelled?)

Note: This error will be generated for every package that tries to be installed from pypi.python.org/simple. BACpypes was just the first one it encountered. The full error message is attached if that is more helpful.

Solution

It is very possible that the SSL certificate is failing because the hardware clock on your BeagleBone is not set to the current time. You may check this by typing date in a terminal. If the correct time and date do not appear, there are two methods to update it to the current time. The first (easiest) requires you to perform a command every time the BeagleBone Black is powered on. The second (more difficult) is a one-time fix.

  1. Enter the command below in a terminal as a root user. (Note: This requires a network connection and might not work on networks with restrictive policies.)
root@beaglebone:~# ntpdate -b -s -u pool.ntp.org

If you are still having trouble, consult Derek Molloy's instructions.

or

  1. Follow Derek Molloy's instructions to make the BeagleBone Black update its clock automatically when it is powered on.

The problem is twofold: Angstrom only includes optimized .pyo bytecode files and not standard .pyc files in its Python package and virtualenv doesn't properly detect this issue. The former can be fixed following the solution below. A patch has been submitted to the virtualenv team which, once released, will prevent the issue in the first place.

Solution 1

Use the version of virtualenv included with the distribution to initialize the environment and then run bootstrap:

volttron@beaglebone:~/volttron$ virtualenv-2.7 env
New python executable in env/bin/python2
Also creating executable in env/bin/python
Installing setuptools, pip...done.
volttron@beaglebone:~/volttron$ env/bin/python bootstrap.py
...

Solution 1 will likely not work. :-(

Solution 2

Run the following commands as root (or use sudo) in a terminal to generate a site.pyc file and remove the .pyo file:

root@beaglebone:~# python -N -m py_compile /usr/lib/python2.7/site.py
root@beaglebone:~# rm /usr/lib/python2.7/site.pyo

Then remove the env directory in the volttron project and run bootstrap.py.

On Angstrom Linux, and any distribution based on OpenEmbedded, a sitecustomize.py script is included in the Python 2.7 distribution which imports readline regardless of python being run interactively. This causes escape characters to be written to stdout and interferes with virtualenv's executable check.

An error like this will be seen in the bootstrap.py output if this issue affects your distribution:

New python executable in env/bin/python
ERROR: The executable env/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/user/volttron/\x1b[?1034h/home/user/volttron/testenv' (should be u'/home/user/volttron/testenv')
ERROR: virtualenv is not compatible with this system or executable

You can verify the issue affects you by running the following command and verify the escape characters print:

volttron@beaglebone:~$ python -c 'pass' | python -c 'print repr(__import__("sys").stdin.read())'
'\x1b[?1034h'

If the command prints the empty string '', then the solutions below will likely not help.

Solution 1

Modify /usr/lib/python2.7/sitecustomize.py so that it doesn't import readline during sitecustomize execution, which executes too early in the Python initialization process to determine if Python is running interactively. Try this script as a replacement for sitecustomize.py

Solution 2

Rename or move /usr/lib/python2.7/sitecustomize.py while bootstrapping and then put it back afterward.

Pandas requires a lot of memory to build. If bootstrap.py is failing while building/installing pandas, it is likely due to insufficient memory on the system.

Solution

If there is sufficient disk space, create and enable a swap partition or file. Do not make the swap file permanent if using flash storage as it will decrease the life of the flash device. Here are the steps to follow:

root@beaglebone:~# fallocate -l 500M /swapfile
root@beaglebone:~# chmod 600 /swapfile
root@beaglebone:~# mkswap /swapfile
...
root@beaglebone:~# swapon /swapfile

Now there should be sufficient memory to build pandas. Run bootstrap.py again to complete the build. Afterward, reboot the system and remove /swapfile to reclaim disk space.

Yes. See Speeding Up VOLTTRON Builds.

No. Absolutely not. Please, do not, under any circumstances, run bootstrap.py with elevated privileges. There is no need and it may break your Python install. Later versions of the bootstrap, volttron, and volttron-ctl scripts have logic to prevent running them as root.

Only use root privileges for apt-get and other system-level programs that actually require it.

Wiki Home

Quick Start Guide

Getting VOLTTRON

VOLTTRON Community

VOLTTRON Core Services

Historians

Drivers

Instance Management

Applications
  • ...
Examples
Developers
HOWTOS

VOLTTRON Versions and Features

Transactional Network Platform Overview

Platform Services

Volttron Restricted

Information Exchange Standards

FAQ

Project Home

Clone this wiki locally