These are some common issues that can occur while using the alwaysAI platform. If your issue is not covered here, reach out to us on our Discord support channel. Many of these issues can be resolved by updating the alwaysAI installation on your system, and moving to the latest edgeIQ version. Here are the release notes for the latest version.
I’m struggling to get my Raspberry Pi configured. Can you help?¶
Yes! Simply download our modified Raspberry Pi OS image for the Raspberry Pi 3B+ (and later), which includes everything you need to start using alwaysAI.
I can’t install the alwaysAI Desktop App. What can I do?¶
If you’re using Linux, please install alwaysAI CLI using npm. For Windows and Mac installation issues, checking the installation log can be a good start. Logs are located here:
C:\Users\username\.alwaysai\logs. In order to enable hidden files, go to the File Explorer, View → Options → Change search and View options → Advanced Settings → Show hidden files.
~/.alwaysai/logs. In order to enable hidden files, open the Finder window and press the following three keys at once:
cmd + shift + ..
Some users abroad may experience network issues resulting in corrupted download or a timeout due to poor connection while downloading files from our servers. If that’s the case, please try again later or on a faster network.
If you’re using a VPN or certain firewall settings, the download might be blocked. If that’s the case, please try again on a different network.
Ensure your OS is supported! alwaysAI Desktop is supported on Windows 10, we don’t support Windows 7 officially. For macOS, alwaysAI Desktop is supported on Catalina, Big Sur,and Monterey. Please keep in mind that macOS Mojave is not supported.
App prints “This is a stub of an alwaysAI application”¶
$ aai app start This is a stub of an alwaysAI application
This happens when you run an empty alwaysAI application. When you run
aai app configure in a directory without an alwaysAI app, it creates this empty application to get you started. However, this can also happen when you run the
aai commands in an unexpected directory.
App still doesn’t work! What do I do now?¶
If you’re continuing running into issues with an aai app, we recommend that you try and do a clean install of the app in order to ensure you’re using the most up to date code. You can do that by re-installing the app with
aai app install --clean.
CameraFailedToStart: Failed to open video capture for 1 using backend 0. Stream not open.¶
$ aai app start Loaded model: alwaysai/mobilenet_ssd Engine: Engine.DNN Accelerator: Accelerator.GPU Labels: ['background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor'] OpenCV: out device of bound (0-0): 1 OpenCV: camera failed to properly initialize! elapsed time: 0.00 approx. FPS: 0.00 Program Ending Traceback (most recent call last): File "app.py", line 56, in <module> main() File "app.py", line 17, in main with edgeiq.WebcamVideoStream(cam=1) as video_stream, \ File "<frozen edgeiq.edge_tools>", line 187, in __enter__ File "<frozen edgeiq.edge_tools>", line 98, in start edgeiq.edge_tools.CameraFailedToStart: Failed to open video capture for 1 using backend 0. Stream not open.
edgeiq.WebcamVideoStream(cam=1) will cause a camera error when wrong index is used for the stream.
Check to make sure your camera is plugged in correctly. Common errors during installation of CSI cameras include plugging the strip in backwards and plugging the camera into the wrong port. For example on the Raspberry Pi 4 the port labeled DISPLAY and CAMERA look identical and often get confused.
Check whether you’re using the correct index for your camera. Maybe you should have used
CameraFailedToStart: Failed to open video capture for http://yourvideostream/video. Stream not open.¶
$ aai app start Loaded model: alwaysai/mobilenet_ssd Engine: Engine.DNN Accelerator: Accelerator.GPU Labels: ['background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor'] [tcp @ 0x7ffa2ed3b400] Failed to resolve hostname teststream: nodename nor servname provided, or not known elapsed time: 0.00 approx. FPS: 0.00 Program Ending Traceback (most recent call last): File "app.py", line 56, in <module> main() File "app.py", line 17, in main with edgeiq.IPVideoStream("http://teststream/video") as video_stream, \ File "<frozen edgeiq.edge_tools>", line 187, in __enter__ File "<frozen edgeiq.edge_tools>", line 98, in start edgeiq.edge_tools.CameraFailedToStart: Failed to open video capture for http://teststream/video using backend 1900. Stream not open.
edgeiq.IPVideoStream("http://teststream/video") will cause a camera error when the URL to the stream is not a direct url to the video file from the camera. Different cameras will have different setups, and a different format of the url might be needed.
Check to make sure that the stream from your camera is up and running.
Make sure the url to your stream is correct. There might be a file extension such as teststream/video.mp4 that needs to be included, or a prefix such as mycamera.teststream/video. You can find the correct url for your webcam stream in the instruction manual of your webcam.
OSError: [Errno 98] Address already in use¶
The Streamer can’t bind to it’s default port due to another connection occupying the port.
This is most often caused by another alwaysAI app that has been left running, and the simplest solution is to reboot the target device. It could also be caused by a connection to the same port on your development machine. Rebooting your development machine may also help.
OSError: [Errno 48] Address already in use¶
$ aai app start Loaded model: alwaysai/human_pose Engine: Engine.DNN Accelerator: Accelerator.GPU [INFO] Streamer started at http://localhost:5000 Traceback (most recent call last): File "<frozen edgeiq.streamer>", line 556, in run File "<frozen edgeiq.streamer>", line 551, in _run_server File "/Users/olafzielinski/.alwaysai/python/lib/python3.7/site-packages/flask_socketio/__init__.py", line 586, in run run_server() File "/Users/olafzielinski/.alwaysai/python/lib/python3.7/site-packages/flask_socketio/__init__.py", line 565, in run_server addresses) File "/Users/olafzielinski/.alwaysai/python/lib/python3.7/site-packages/eventlet/convenience.py", line 78, in listen sock.bind(addr) OSError: [Errno 48] Address already in use
On macOS Monterey and higher, port 5000 is occupied by an AirPlay Receiver feature, that is enabled by default in the system.
In order to fix this issue, please disable the Airplay Receiver feature in System Preferences → Sharing → Airplay Receiver to free the port 5000 for your application use.
aai app install: ssh: Could not resolve hostname pi@raspberrypi: Name or service not known¶
$ aai app install ✔ Target configuration not found. Do you want to create it now? … yes ✔ What is the destination? › Remote device ✔ Found Dockerfile ✔ Please enter the hostname (with optional user name) to connect to your device via ssh (e.g. "firstname.lastname@example.org"): … pi@raspberrypi ⚠ Connect by SSH Process exited with non-zero status code 255 $ ssh -i /home/eric/.ssh/alwaysai.id_rsa -o BatchMode=yes -o StrictHostKeyChecking=no pi@raspberrypi echo ssh: Could not resolve hostname pi@raspberrypi: Name or service not known Cannot connect to your device. Please check the address and try again. ? Please enter the hostname (with optional user name) to connect to your device via ssh (e.g. "email@example.com"):
Causes and Fixes¶
There are many reasons your device might not be findable by the CLI. The simplest reason is that the hostname or IP address could be wrong. Double check that it is entered correctly. Our Raspberry Pi OS image comes with mDNS installed so you could try adding “.local” to your hostname (e.g. firstname.lastname@example.org).
Another possibility is that the device is not connected to the same network as your development computer. Our Raspberry Pi OS image starts WiFi-Connect when the device can’t connect to a network, which makes it easy to connect your device to the WiFi network of your choice.
Permission denied to read from ‘/home/pi/alwaysai/realtime_object_detector/core’¶
“$ docker build --quiet . error checking context: ‘no permission to read from ‘/home/pi/alwaysai/realtime_object_detector/core’’.”
There is a file in the target app directory that can’t be loaded by docker, likely due to a permissions issue. This is often due to using
To get the Docker build to succeed, you’ll need to delete the core file on the target device. Run
aai app install --clean to remove the file. To prevent core dumps, close your app using the “stop” button on the Streamer, or any other method of cleanly exiting your app.
RuntimeError: Model alwaysai/mobilenet_ssd not installed!¶
A model used in your app.py is not installed using the CLI. It may not be added as an app dependency, or simply not installed on the device.
First, check your app config using
aai app models show. If there aren’t any models added to your app, the output will look like this:
$ aai app models show Models: None
To add a model, go to the alwaysAI Model Catalog, pick out your model, and follow the instructions to add the model to your app.
If the model is added your config might look like this:
$ aai app models show Models: alwaysai/mobilenet_ssd@4
This means that you added a model using the CLI, but you haven’t run
aai app install after to install the model to the target device or development host.
Stuck on “Copy application to target”¶
This issue most commonly occurs when using the alwaysAI CLI on Windows.
This issue will happen if there are multiple entries for your target device in the known_hosts file, indicated by these logs:
Warning: the ECDSA host key for 'alwaysai' differs from the key for the IP address '192.168.1.10' Offending key for IP in C:/Users/alwaysai/.ssh/known_hosts:2 Matching host key in C:/Users/alwaysai/.ssh/known_hosts:5
To fix this issue, delete the offending key in the known_hosts file and run
aai app deploy again.
ZlibErrror: zlib: unexpected end of file¶
$ aai app install ✖ Install model alwaysai/mobilenet_ssd ZlibError: zlib: unexpected end of file at Unzip.write (C:snapshot/cli-release/node_modules/minizlib/index.js:154:22) at Unzip.flush (C:/snapshot/cli-release/node_modules/minizlib/index.js:105:10) at Unzip.end (C:/snapshot/cli-release/node_modules/minizlib/index.js:111:10) at Unpack.end (C:/snapshot/cli-release/node_modules/tar/lib/parse.js:476:21) at ReadStream.onend (internal/streams/readable.js:684:10) at Object.onceWrapper (events.js:482:28) at ReadStream.emit (events.js:388:22) at ReadStream.emit (domain.js:470:12) at endReadableNT (internal/streams/readable.js:1336:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) code: 'Z_BUF_ERROR', errno: -5, recovarable: false, cwd: 'C:\\Users\\usr\\urs\\project\\models\\alwaysai\\mobilenet_ssd.xxxxx.tmp', tarCode: 'TAR_ABORT'
In certain cases, the model file can get corrupted when being downloaded from our server.
In order to fix this issue, please delete the corrupted cached model from the alwaysAI directory by running
aai model prune <modelname>, for instance
aai model prune alwaysai/mobilenet_ssd. You can also learn more about the prune command by typing
aai model prune --help.
Docker: failed to start daemon¶
If you get an error when installing
dockerd in the foreground to get the full error message:
$ sudo dockerd
There is a simple workaround if your error message looks like this:
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING (exit status 4)
Debian Buster has changed how IP tables are managed from Debian Stretch, causing a mismatch when docker tries to work with the IP tables.
You can resolve this issue by setting the OS to use the legacy IP tables management:
$ sudo update-alternatives --set iptables /usr/sbin/iptables-legacy $ sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy $ sudo service docker start
My alwaysAI dashboard or website is stuck on a spinning wheel. What is wrong?¶
If you’re using a VPN, it’s possible that one or more of our domains/IPs are being blocked by it. Please try disabling your VPN and try again.
Permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock¶
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
The current user doesn’t have rights to run the Docker daemon.
Add the current user to the
sudo usermod -aG docker $USER