VNC Access not working with Portainer Weston-vivante container

Hi,

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 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.

Versions:
|Hostname|apalis-imx8-06959030|
|OS Information|linux aarch64 TorizonCore 5.4.0+build.10 (dunfell)|
|Kernel Version|5.4.129-5.4.0+git.cb88cc157bfb|

|container.name|weston-vivante|
|container.version|2.5.1-20210920|

Thanks!

Greetings @alexxs,

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.

Best Regards,
Jeremias

I’ve made sure the only containers running are Portainer and my manually started weston-vivante.

Can you tell me what network settings I should have? By default it was set to ‘host’, but that didn’t show any IP for that specific container.

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.

Best Regards,
Jeremias

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.

Thanks again!

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.

Best Regards,
Jeremias

I tried two things:

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”.

  1. 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.

Best Regards,
Jeremias

When I ran it from the command line I manually checked that only the Portainer container was active. Will try it again and report back