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.
aai app deploy: ssh: Could not resolve hostname pi@raspberrypi: Name or service not known¶
$ aai app deploy ✔ 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. "email@example.com"): … 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. "firstname.lastname@example.org"):
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. email@example.com).
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.
no permission 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. running
aai app exec rm -rf core --superuser may work, but you might need to SSH directly onto the device and manually delete 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 deployed to the device.
First, check your app config using
aai app show. If there aren’t any models added to your app, the output will look like this:
$ aai app show Models: None Scripts: start => "python app.py" Target: docker container on this host
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 show Models: alwaysai/mobilenet_ssd@4 Scripts: start => "python app.py" Target: docker container on this host
This means that you added to model using the CLI, but you haven’t run
aai app deploy after to deploy the model to the target device, or
aai app install for MacOS or Windows native.
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.
Switch between running locally and remotely on MacOS and Windows¶
On MacOS and Windows, there are two options for running your app: running natively with
$ aai app install $ aai app start
And running on a remote device with
$ aai app deploy $ aai app start
Once you deploy to a remote device using
aai app deploy, you’ll need to use
aai app configure to switch back to running the local installation by selecting the “Your local computer” option.
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.
Got 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
Can not init USB device: NC_ERROR in function ‘initPlugin’¶
E: [ncAPI] ncDeviceOpen:672 Failed to find suitable device, rc: X_LINK_DEVICE_NOT_FOUND cv2.error: OpenCV(4.1.1-openvino) /opencv-build/build/opencv-4.1.1-openvino/modules/dnn/src/op_inf_engine.cpp:477: error: (-215:Assertion failed) Failed to initialize Inference Engine backend: Can not init USB device: NC_ERROR in function 'initPlugin'
This error occurs when your app is set up to use the DNN_OPENVINO engine and a MYRIAD device can’t be found. This could happen if an NCS device is not plugged in.
In most cases, the fix is to just plug in or unplug and replug your NCS device. In other cases this could be due to USB driver issues and would require further debugging.
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.