Just getting started with Torizon and having some issues getting VNC and RDP to work. I’ve started my Weston container using the command in this tutorial Remote Access the TorizonCore GUI Using VNC or RDP | Toradex Developer Center and I can see it running in Portainer. However, when trying to connect with either RDP or TightVNC, I’m getting the following error:
TightVNC: “No connection could be made because the target machine actively refused it”
A “ps -e” run on the host doesn’t show any vnc-related process.
The VNC container seems to work on my side and I’m using TightVNC as well.
Can you try stopping all other running containers first then running the VNC container. Portainer also uses a Weston container and this may conflict with the Weston container running VNC.
Host would be the correct setting as shown in the article. This shares the host network stack with the container. In other words the IP of the container should be the same as the IP of the host device. Are you able to ssh too your device via it’s IP address?
If yes then the only issue I can think of is some weird network configuration or other issue that’s preventing the VNC connection.
What might help is to get the logs from the VNC container while you’re trying to connect to it. This may give some helpful error messages or such.
In the end I managed to get VNC working with a custom container started from Visual Studio Code. It seems like the problem is only with the container built from the Portainer UI.
Glad you were able to get VNC working, however part of your reply left me a bit confused. Specifically this part:
the problem is only with the container built from the Portainer UI
What do you mean “built” with the Portainer UI? Portainer is just a UI for managing containers starting/stopping. Not for building.
How were you starting the VNC container? In the VNC article that you referenced the docker run command is to be ran on the command line of the Torizon device.
What do you mean “built” with the Portainer UI? Portainer is just a UI for managing containers starting/stopping. Not for building.
I might have the terminology wrong, but essentially I went into Portainer, App Templates and selected one of the templates there. I then struggled a bit to change the environment variables to add 'ENABLE_VNP" and “ENABLE_RDP”.
The second way I tried it was simply with the docker run command in a terminal on the Torizon device. Same problem.
Hmm I’ve never tried it the 1st way. But the 2nd method via the command line should definitely work. The only way it wouldn’t work is if you had other containers that interfered with the VNC container. This is why I recommend to stop all other running containers before running the VNC container.
The reason it worked from VSCode is because our extension stops all other containers before running the containers defined in the project.