What's going on with RealVNC

Having issues with your DietPi installation or found a bug? Post it here.
Infiltraitor
Posts: 10
Joined: Fri Jul 19, 2019 3:01 pm

What's going on with RealVNC

Post by Infiltraitor »

Hello guys,

My DietPi setup finally got corrupted because of unsafe power outage. Keeps on staying on Emergency Mode. I tried to Press CTRL+D to resume but it never starts. I reformatted to start fresh, with all the needed services to start again. The problem is I can no longer install Real VNC on this setup. It tries to install and its on the list of optimized softwares.

As far as I can remember, when you install a service it will completely notify you if it's has been installed successfully. This time when I install Real VNC, it will reach the final part when it tries to finish the install but crashes the terminal. Not knowing if its done or not because the terminal has already force exited without my intervention.

Restarted the Pi, and still the icon for the real VNC beside the clock is not present and looking in the list of services showing that the VNC server has "failed". Restarting the services will still end up it failing.

I gave up on it for reinstalling over and over again. Is there an ongoing issue with RealVNC with DietPi? :cry: I have been using it up until yesterday when I tried to reinstall DietPi.

Edit: Im using an RPI B+ using the latest DietPi Image.
cloudn8ive
Posts: 6
Joined: Wed Oct 20, 2021 5:12 am

Re: What's going on with RealVNC

Post by cloudn8ive »

Try:

Code: Select all

systemctl status vncserver.service
See if the service is failing and if so, what error(s) it's reporting.

I had an issue with RealVNC on one of my Pis where it was reporting a You must specify a password for VNC authentication error. Until I set a password, the service was continually failing, even with service restarts, reboots of the system, etc.

If you have the same error, I can walk you through what I did to resolve it.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: What's going on with RealVNC

Post by Joulinar »

If I understood correctly installation is already failing. Try to connect via SSH and run dietpi-software.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Infiltraitor
Posts: 10
Joined: Fri Jul 19, 2019 3:01 pm

Re: What's going on with RealVNC

Post by Infiltraitor »

cloudn8ive wrote: Fri Oct 29, 2021 7:30 pm Try:

Code: Select all

systemctl status vncserver.service
See if the service is failing and if so, what error(s) it's reporting.

I had an issue with RealVNC on one of my Pis where it was reporting a You must specify a password for VNC authentication error. Until I set a password, the service was continually failing, even with service restarts, reboots of the system, etc.

If you have the same error, I can walk you through what I did to resolve it.
Thank you, I will try to do it via SSH. I forgot I used to SSH my way installing softwares. I'll update you it it worked.

edit: It didn't work, I tried to install via SSH. What procedure did you take to resolve yours?
Last edited by Infiltraitor on Sat Oct 30, 2021 3:35 am, edited 1 time in total.
Infiltraitor
Posts: 10
Joined: Fri Jul 19, 2019 3:01 pm

Re: What's going on with RealVNC

Post by Infiltraitor »

Joulinar wrote: Fri Oct 29, 2021 7:45 pm If I understood correctly installation is already failing. Try to connect via SSH and run dietpi-software.
Joulinar, I was hoping it would work, but it didn't. This time a was able to see the end of the installation and it says:
[ INFO ] DietPi-Software | Starting installed services, not controlled by DietPi-Services
[ OK ] DietPi-Software | systemctl start vncserver
And still it shows failed in the list of services
cloudn8ive
Posts: 6
Joined: Wed Oct 20, 2021 5:12 am

Re: What's going on with RealVNC

Post by cloudn8ive »

Infiltraitor wrote: Sat Oct 30, 2021 2:58 am Thank you, I will try to do it via SSH. I forgot I used to SSH my way installing softwares. I'll update you it it worked.

edit: It didn't work, I tried to install via SSH. What procedure did you take to resolve yours?
I suggested the status command to discover what specific error(s) are being produced by your vncserver service.

Be sure to check what error(s) you have before you attempt to fix anything. On the chance you also have a password error, I'll walk you through what I did for mine. YMMV

The command:
systemctl status vncserver.service

...will produce something like the following:

Code: Select all

    ● vncserver.service - VNC Server (DietPi)
        Loaded: loaded (/etc/systemd/system/vncserver.service; enabled; vendor preset: enabled)
        Active: failed (Result: exit-code) since Fri 2021-10-29 08:22:32 PDT; 23s ago
        Process: 234484 ExecStart=/usr/local/bin/vncserver start (code=exited, status=1/FAILURE)
    Main PID: 234484 (code=exited, status=1/FAILURE)
            CPU: 36ms

    Oct 29 08:22:32 DietPi vncserver[234484]: registrations and/or pending trademark applications in the European Union,
    Oct 29 08:22:32 DietPi vncserver[234484]: United States of America and other jurisdictions.
    Oct 29 08:22:32 DietPi vncserver[234484]: Protected by UK patent 2481870; US patent 8760366; EU patent 2652951.
    Oct 29 08:22:32 DietPi vncserver[234484]: See https://www.realvnc.com for information on VNC.
    Oct 29 08:22:32 DietPi vncserver[234484]: For third party acknowledgements see:
    Oct 29 08:22:32 DietPi vncserver[234484]: https://www.realvnc.com/docs/6/foss.html
    Oct 29 08:22:32 DietPi vncserver[234484]: OS: Debian GNU/Linux 11, Linux 5.10.63, aarch64
    Oct 29 08:22:32 DietPi vncserver[234484]: You must specify a password for VNC authentication.
    Oct 29 08:22:32 DietPi systemd[1]: vncserver.service: Main process exited, code=exited, status=1/FAILURE
    Oct 29 08:22:32 DietPi systemd[1]: vncserver.service: Failed with result 'exit-code'.
Notice the third line from the bottom in the example above. It states: 'You must specify a password'. So in my example, I needed to provide that password in order for the service to start.

I set the password with the following command:
vncpasswd -virtual

Then I provided a password and verified it at the prompts:

Code: Select all

    Setting "Password" VNC parameter for Virtual Mode server
    Password:
    Verify:
    Successfully set "Password" VNC parameter in /root/.vnc/config.d/Xvnc
    Successfully set "Password" VNC parameter in
    /root/.vnc/config.d/vncserver-x11-virtual
Then I restarted the vncserver service:
systemctl restart vncserver

When I checked the status of the service, it showed that it started successfully:

Code: Select all

    root@DietPi:~/.vnc# systemctl status vncserver
    ● vncserver.service - VNC Server (DietPi)
        Loaded: loaded (/etc/systemd/system/vncserver.service; enabled; vendor preset: enabled)
        Active: active (exited) since Fri 2021-10-29 09:34:12 PDT; 2s ago
        Process: 235170 ExecStart=/usr/local/bin/vncserver start (code=exited, status=0/SUCCESS)
    Main PID: 235170 (code=exited, status=0/SUCCESS)
            CPU: 34ms

    Oct 29 09:34:12 DietPi systemd[1]: Started VNC Server (DietPi).
    Oct 29 09:34:12 DietPi systemd[235170]: pam_unix(login:session): session opened for user root(uid=0) by (uid=0)
    Oct 29 09:34:13 DietPi vncserver[235170]: [  OK  ] RealVNC detected
    Oct 29 09:34:13 DietPi vncserver[235170]: [ INFO ] Starting virtual desktop at display :1 in 1280x720x16
From there, I was able to connect with RealVNC again after I corrected one additional issue; for some reason, the port had changed from :5900 to :5901. I just specified the new port in RealVNC. VNC has worked normally since.
Infiltraitor
Posts: 10
Joined: Fri Jul 19, 2019 3:01 pm

Re: What's going on with RealVNC

Post by Infiltraitor »

@cloudn8ive

Thank you, that's a lot for me to take but I'll try that.

As of the moment I realized I don't need a desktop environment. All I need to deploy is a Pi-hole, and CUPS for printing. I never did use the desktop due to it being laggy as I got an older RPI.

The only good advantage that I got when RealVNC works again is the remote access via cloud. This way I can access the Pi without me doing Port forwarding under CGNAT.

I will get back to this thread once I needed it the most. For now I will try your guide to make sure it will work when I need it, if not I'll stay with a headless setup for now.

Edit: I'm wondering, after you set it up correctly (fixed it), did the icon for RealVNC showed up beside the system clock? I was wondering, because its may way of setting it up.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: What's going on with RealVNC

Post by Joulinar »

ok I'm lost. Are you able to connect to your system using RealVNC locally inside your local network?

If you don't need a real desktop, better to think on a VPN solution like WireGuard. This is more resource effective and you could access your system from any client.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Infiltraitor
Posts: 10
Joined: Fri Jul 19, 2019 3:01 pm

Re: What's going on with RealVNC

Post by Infiltraitor »

Joulinar wrote: Sat Oct 30, 2021 11:20 am ok I'm lost. Are you able to connect to your system using RealVNC locally inside your local network?

If you don't need a real desktop, better to think on a VPN solution like WireGuard. This is more resource effective and you could access your system from any client.
It was before I reformat it yesterday. I did the same procedure installing DietPi as normally you would, it's just that this time RealVNC installs but the VNC server status from DietPi Services shows it failed. Then the RealVNC server icon is no longer available on the taskbar near the system clock as it would.

I was considering RealVNC because of the RealVNC Connect feature to access my Pi server remotely via cloud.

Although a was able to install the other VNC service called TigerVNC. It shows Active VNC Server under Dietpi Services. The problem is I know how to access any settings for the VNC server and I cant remote to it. It says something like "Not Listening".

And to answer your question, yes I was able to access my Pi via VNC locally as well. But not not after I reformat, because it fails.
Last edited by Infiltraitor on Sat Oct 30, 2021 12:34 pm, edited 1 time in total.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: What's going on with RealVNC

Post by Joulinar »

pls share following

Code: Select all

systemctl status vncserver
journalctl -u vncserver
ss -tulpn | grep LISTEN
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply