Troubleshooting

What's wrong and how to fix it :)

If you run into a really weird issue that doesn't seem right, this is the place to start.

Here you'll find solutions for common problems, where to find the log files, what to look for in those log files.


Dataplicity logs

If something goes wrong, your first clues will be in the Dataplicity agent logs.

There are two log files that usually matter most. The first is the installation log, which is relevant if you have an issue running the curl installation script: You can view this log file using the following command:

less /var/log/dpinstall.log

The second log file is the Dataplicity Agent runtime logfile.

If the installation appears fine, but you can't connect to your device, or if Dataplicity is behaving strangely on your device, here's where to look:

less /var/log/dataplicity.log

Dataplicity status

If the log files are quiet, it may be that Dataplicity Agent isn't running. To find out if the agent is running you can query the supervisor process:

sudo supervisorctl status tuxtunnel

To restart the Dataplicity Agent on your device:

sudo supervisorctl restart tuxtunnel

#1 - SSL Certificate Errors

Symptom: Can happen during the installation of Dataplicity:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

Solution:

sudo apt-get install gnutls-bin ca-certificates -y 

gnutls-cli --print-cert dataplicity.com </dev/null| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/dataplicitycert.crt

echo | openssl s_client -connect dataplicity.com:443 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/dataplicitycert.crt

sudo cp /tmp/dataplicitycert.crt /etc/ssl/dataplicitycert.crt

sudo update-ca-certificates

Another possibility where SSL certificate errors could be seen would be inside the Dataplicity runtime logs, after the installer installed the Dataplicity agent.

Dataplicity uses SSL which is sensitive to the accuracy of your system clock. Raspberry Pi does not remember the time after a reboot, but when connected to the internet will use NTP to get an accurate time. If this has not worked, try "sudo rm /etc/fake-hwclock.date" and "sudo service ntp restart" and reboot the Raspberry Pi. The latter by itself might be enough if you're not on Raspberry Pi device.


#2 - Dataplicity doesn't work after a reboot

The Reason for it could be that /var/log directory is mounted as tmpfs.

Solution:
Put command mkdir -p /var/log/supervisor/ into
/etc/bashrc for raspbian and ubuntu and debian. other OS might differ, but the main point is to ensure /var/log/supervisor directory exists before the dataplicity agent is started.


#3 - Logs contain: Input/Output errors.

It may be that you're trying to run dataplicity on a read only file system. The agent requires read/write access to certain parts of the filesystem to operate, and you may need to make adjustments to your system to permit this.

Another possibility is that your SD card may be full. In such case you will need to clear some space or migrate to a larger SD card.


#4 - Logs contain: ImportError: 'module' object has no attribute 'main'.

Installation is corrupt. Delete the directory /home/dataplicity/.pex and rerun the curl installation script to fix this.


#5 - Dataplicity status returns: ImportError: No module named packaging.version

Solution:

sudo su root

apt-get purge -y python-pip

wget https://bootstrap.pypa.io/get-pip.py

python ./get-pip.py

apt-get install python-pip

#6 - Dataplicity is slow on a Raspberry Pi

Disabling IPv6 support on the Raspberry Pi OS will solve this problem


#7 - Apache2 files under /var/www/html are not showing up on wormhole

sudo chmod -R 777 /var/www

#8 - Keyboard is not visible when accessing the web terminal on a mobile device through a browser.

This is standard web browser behaviour. For the best experience on mobile, try our native Android, iOS, Windows 10 apps.


#9 - Trouble installing Dataplicity on a read only file system

Make the following directories Read-Write for dataplicity to install: /etc/supervisor , /opt/ , and for dataplicity to run: /var/log/

It also might be worth adding the following line to /etc/fstab:

tmpfs /var/log/supervisor tmpfs nodev,nosuid 0 0