Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VNC failed to start properly after reboot #1284

Closed
xhu224 opened this issue Jul 1, 2021 · 6 comments
Closed

VNC failed to start properly after reboot #1284

xhu224 opened this issue Jul 1, 2021 · 6 comments

Comments

@xhu224
Copy link

xhu224 commented Jul 1, 2021

We installed TigerVNC on the server, and found out that the service failed to start after reboot.
It turned out that it needed to find .vnc information in the NFS mounted file systems.
However, during the rebooting process, vnc server started before any of nfs file systems is mounted.
What modifications need to make to vncserver@.service or vnc starter script to ensure that vncservice starts after all nfs file systems are properly mounted.
Any one has a idea to fix the problem is very much appreciated!!

@bphinz
Copy link
Contributor

bphinz commented Jul 1, 2021

Try adding "remote-fs.target" to the "After=..." line in the vcnserver@.service file and that should do the trick.

@xhu224
Copy link
Author

xhu224 commented Jul 1, 2021

Thanks for your suggestion! I have tested this before but failed simply because I tested on a server that did not have remote-fs.target in active state. Should have tested on the server with active remote-fs.target in the first place.

@CendioOssman
Copy link
Member

This seems to have been resolved so I'll go ahead and close this issue.

@rockybulwinkle
Copy link

rockybulwinkle commented Nov 12, 2021

This fix is not working for me. I'm running AlmaLinux 8.4 with SELinux enabled, NFSv4.1 home directories, and vncserver 1.11. I've pulled in the new SELinux configs for 1.12 and confirm it can start if I manually start it after boot.

However if I reboot, vncserver does not come up automatically. Here is my systemd unit:

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target remote-fs.target

[Service]
Type=forking
ExecStart=/usr/libexec/vncsession-start %i
PIDFile=/run/vncsession-%i.pid
SELinuxContext=system_u:system_r:vnc_session_t:s0

[Install]
WantedBy=multi-user.target

@rockybulwinkle
Copy link

A (possibly) important detail I missed: the home directories are automounted by autofs. The automounts are defined in an IPA server.

@rockybulwinkle
Copy link

Adding "autofs.service" to the "After" directive seems to have fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants