Closed philmurp closed 2 years ago
Hi @philmurp, I haven't tried to run on a VM yet. But you can try to access the setup page using the IP address directly:
http://<ip_of_vm>/setup
If the VM is accessible within the local network, this approach should work.
Not working with that, I am using same IP as I do with SSH (with success) and I get the "Site Cant Be Reached" "Connection was Reset"
Not sure how I can access from SSH but not for this purpose. Is there any code I can run to test it was properly installed?
Hi @philmurp, can you use the following commands to check if the CAIT webapp and CURT backend is running properly in the VM?
sudo journalctl -u cait_webapp.service
sudo journalctl -u curt_containers.service
It is possible that these services are not running in the VM, and that could explain why you cannot access the web app.
Thanks, looks like it isnt running as per image. Guess it didnt totally install correctly.
Right, the services aren't starting. If you could copy and paste the error message here (the red lines), I may be able to help check what packages are missing in your image.
Repasted image:
Ah, bash is missing. The CEP's installation script uses bash to execute commands, you can install bash before running the installation script:
sudo apt-get install bash -y
I double checked, and ran your install code; says bash is already the newest version (5.0-4). Rebooted and same error.
is there a way to check the file, online it says it could be from incorrect shebang pattern? https://stackoverflow.com/questions/16987961/bin-bash-no-such-file-or-directory
Can you type this and check where is bash located:
which bash
Result is: /bin/bash
I set the default of Auto Login = Login as user 'pi' / not sure if that matters
I see, the problem is that the services use /usr/bin/bash to launch the startup scripts. In your image, bash is located at /bin/bash instead. This is a bit different from a standard Raspberry Pi OS installation. You will need to edit these files in order to run CEP in your image:
sudo nano /etc/systemd/system/cait_webapp.service
sudo nano /etc/systemd/system/cait_webapp.service
In both files, find the line starts with ExecStart=
and change /usr/bin/bash
To /bin/bash
. After that save and close the files. Restart the image and it should run.
Thanks for all the help! Saw service started but some other issues;
First image for CAIT line Second image for CURT line
This error is caused by a missing Python package, it should be installed through pip during the setup process. I think there were some errors during the installation process, it would be great if you can try to install again and capture the errors during the process.
I try to re-run install script: First off I get this warning:
I am running despite this warning; will update once it completes
Sure, ignoring this warning is safe in this case as the docker command was initially installed through this script. This line installs the Python packages that you were missing before, so if there are any errors happen, they should be related to pip. Please let me know if you observe any pip errors during the setup process.
This time I am able to access initial setup screen, but not fully loading and some performance issues. I will try later today without anything else open. But at this point it may be my computer power/emulator issue
Glad to know it's getting closer. For sure there can be some uncertainties when using an emulator to run the software. Please free feel to let me know if you need more help in debugging this approach.
Will do, if I could just find a Raspberry Pi to buy I would have done that, but they have been out of stock for a while now. Any chance OrangePi, BananaPi type boards work with this software as alternate?
Right, the chip shortage issue really affects a lot of things. I haven't tested with any of the Pi-alternative boards. However, from a technical perspective, since CEP is designed for running in a 32-bit Debian-based OS on a 64-bit Arm processor, with some efforts, it is very probable that it will run on those boards. But I cannot estimate the scope of work to do that, you will need to make sure the correct packages and dependencies of CEP are working well on those boards. If you want to go down this path, I am happy to offer some advice and help when you encounter issues.
It seems to be working ok so far; but when using OAK D camera plugged in it says no OAK D device detected even though I can see it in my emulator window.
Do I need to download the DepthAI packages first? I thought they were included in this install but maybe not.
No, you shouldn't need to manually install the DepthAI packages. All of the dependencies are installed into the corresponding Docker containers. Where did it say no OAK-D device is detected? Did it say that on the setup page, or on the programming page?
It showed up during setup (although I couldnt run a preview but I think that is because of my slow connection); then during programming I am getting the pop-up error when I try and setup something with OAK-D.
My emulated Pi gets results when I run lsusb and since I detected it during setup I think its an initialization issue not detection issue.
I see, all of the DepthAI related packages are installed in the vision Docker container, and that may not be running properly. Within your VM, please run the following command and post the output messages here:
sudo journalctl -u curt_containers.service -f
Attached here:
Thanks for the log @philmurp. But it only shows the log of the homeassistant Docker container, did you see any logs that start with the name curt_vision?
Nothing yet, I tried to leave the window open and re-run the cortic interface but still nothing starting with curt_vision. Maybe its not even starting?
Is it possible it has to do with my bash location? I did change the files like you mentioned above to get rid of /usr
This is what I get with setup: I can see the camera, but it never finishes "Retrieving Device Information" or shows me a preview:
Right, I think the Docker containers are not running at all. We will need to see what happened when the containers were starting. To do that, you will need to open two terminals in the VM, in one of the terminals (let's call it the log terminal) enter sudo journalctl -u curt_containers.service -f
and leave it printing the logs. In another terminal, you can enter sudo systemctl restart curt_containers.service
. The log terminal should now show the Docker containers are being stopped and restarted. Please capture that log and post it here.
The logs of the containers look ok so far, were there any messages that look like "Connected to broker..." and "Subscribing to topic..."? These messages indicate whether the MQTT broker was started successfully and if the different modules could connect to it.
There is a "Fatal Python error: (pygame parachute) Segmentation Fault next to "curt_voice_1"
Also later on "error during setup of component zeroconf" next to" homeassistant.setup"
but then further down curt_vision_1 says "vision connected to broker with result code 0" and vision subscribed to cait/conf and cait/task
I think there are multiple problems here:
Both of these problems will need quiet a bit of effort to investigate. It may be better for you to wait until an actual Raspberry Pi 4B board is available, then run CEP on the actual hardware. If you really want to get it working in the VM, I suggest you to focus on getting the OAK-D device working first. It may have something to do with USB passthrough and permission settings related to the VM software you are using.
Thanks for all the help, I will poke around VMWare settings a bit more.
I do have a Jetson Nano board; but it is 64 bit and runs on JetPack OS, so not sure how it will work. Might be worth a shot, not sure if you have heard anyone try this on that board.
You are welcome @philmurp. If you want to try on the Jetson Nano. I recommend you to wait for a day or two as I am currently updating CEP to support the 64-bit Raspberry Pi OS.
Hi @philmurp, I have tested that even the current version of CEP will work on 64bit Raspberry Pi OS. As long as the Docker containers can be run on the 64-bit OS you have, CEP should work. However, I suggest you to use the dev branch when you try setting it up. To check out the dev branch, please perform the following steps:
git clone https://github.com/cortictechnology/cep.git
cd cep
git checkout dev
Thanks, ok just tried it on the Jetson Nano.
I got errors in the install, then once done I ran the code above to check if service was running (after updating the bash location) and got the extra two errors .
Hi @philmurp, the errors in the last picture are due to an incomplete setup process. You will need to fix the errors that happened in the setup and make sure the setup can finish properly. From the setup errors, I think you can look into 2 things:
Thanks I was able to install NPM and pip3; still getting the attached error. It seems like online maybe the pip3 still isnt updated enough?
Still looking for some answers but thought I would post in case you recognize solution:
Made some updates to pip3 and seems like that error is gone, I am currently processing the setup, one error so far as below.
From initial searches it looks like this is from pip setuptools being higher than 58, so trying to see if I can install setuptools to an older version. Do you think this is a showstopper that needs to be fixed?
Hi @philmurp, I found this problem in stackoverflow, maybe you can try the solution in it.
Thanks I was able to install at version 57.5.0; currently downloading.
Fingers crossed no errors yet, I will report back.
So I was able to install with no errors; but when running the service, I still get below image.
Hi @philmurp, this indicates that the environment variable in this line is not being set correctly during the setup process. The setup process set this variable for the root user in this line. You may want to make sure that this variable is set properly in /root/.bashrc
. If it is set, then you will need to make sure the CAIT_WEB_PATH
variable is really pointing to the correct path (<root_of_cep>/src/cait/cortic_webapp/
).
Pic below: 1) Seems like this portion was added several times, should I make only one copy of each vairable (and one of the PYTHONPATHS is bigger than the others
2) should I remove /home/phil and just go straight to cep/src/cait/cortic_webapp/ because that is how I navigate from command line to get to this file
I did those updates, same error. But when I navigate via command window I can find those files along the path specified.
It seems you have run the setup script multiple times. I would suggest starting the setup from scratch on a newly flashed OS again in the following order:
If you just want a quick try, then yes, you should just keep one copy of each variable.
And you should keep /home/phil
as this is the part of the full path to the <root_of_cep>
.
Still having same issue; could it be this "E:" that comes up; it isnt in red color so I usually glanced over it.
Since its not Raspberry Pi I wouldnt expect my Jetson would have those headers; if you think that might be an issue I can see what options there are to install those specific headers.
The error is due to this line. On a Raspberry Pi OS, this is needed to make sure the ReSpeaker driver can be properly installed in a later stage. If you don't have the intention to use the speech-related features of CEP. you can comment out this line in the setup script and perform the setup again.
Still getting the missing file error; but the path is correct in bash file. Looking online I saw some posts about how permissions on the file location might be causing an issue.
I am still trying to figure out exactly what to fix on my example; but thought I would share if you think this might be a good path to follow for potential fix.
https://stackoverflow.com/questions/70668977/uwsgi-failed-to-open-python-file-root-wsgi-py-django
I am using VMWare Workstation since I dont have a Pi 4 and they are very hard to come by right now. I am running latest Pi OS; was able to download the CEP packages with success and Desktop rebooted.
I am able to SSH into the Pi so I believe that confirms we are on the same LAN and able to access the Pi. However, every time I run:
http://<raspberry_pi_hostname>.local/setup
I get an error "Connection was Reset". Tried on Chrome and Edge browsers. Any idea why I cant access the setup site, do I need to run any commands on the Pi desktop to trigger it to act like server?
Thanks!