LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-10-2019, 10:20 AM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,921

Rep: Reputation: 158Reputation: 158
TigerVNC decided to start itself


I believe this issue started after upgrading to CentOS 7.7. At least it became obvious at that point. I have 3 "servers" - actually just server boxes filled with hard drives for archive storage. Cheaper than a NAS They run CentOS and are headless. I access them with ssh and call up a VNC session if necessary using this script
Code:
#!/bin/bash
vncserver -kill :1
vncserver :1 -geometry 1600x900 -depth 16
This has worked well for years. After the upgrade to 7.7 I experienced this when the script tried to kill any old session
Code:
[ken@taylor22 ~]$ vncserver -kill :1

Can't find file /home/ken/.vnc/taylor22:1.pid
You'll have to kill the Xvnc process manually

[ken@taylor22 ~]$ vncserver -list

TigerVNC server sessions:

X DISPLAY #	PROCESS ID
Notice that I cannot find the offending session. After some investigation I found this clue
Code:
[ken@taylor22 ~]$ systemctl status vncserver@:1
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: failed (Result: resources) since Thu 2019-10-10 10:52:22 EDT; 8min ago
  Process: 1283 ExecStart=/usr/sbin/runuser -l ken -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
  Process: 1274 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)

Oct 10 10:52:19 taylor22 systemd[1]: Starting Remote desktop service (VNC)...
Oct 10 10:52:22 taylor22 systemd[1]: New main PID 1389 does not belong to service, and PID file is not owned by root. Refusing.
Oct 10 10:52:22 taylor22 systemd[1]: New main PID 1389 does not belong to service, and PID file is not owned by root. Refusing.
Oct 10 10:52:22 taylor22 systemd[1]: Failed to start Remote desktop service (VNC).
Oct 10 10:52:22 taylor22 systemd[1]: Unit vncserver@:1.service entered failed state.
Oct 10 10:52:22 taylor22 systemd[1]: vncserver@:1.service failed.
I disabled the offending service. Now, when I bring up a server, connect with ssh and run my script I find a VNC session running as :1 as expected.

The question is... Where broken service come from? I have upgraded these servers continuously from CentOS 7.3 or 7.4 and never seen a phantom VNC session running. Any ideas?

TIA,

Ken
 
Old 10-11-2019, 01:23 PM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,103

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
in such cases I suggest to reinstall the OS, because something left uncontrolled from the previous versions. But I'm not really sure, I cannot tell you what was that.
But anyway a clean install may help (if possible).
 
Old 10-11-2019, 01:51 PM   #3
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,921

Original Poster
Rep: Reputation: 158Reputation: 158
Thanks pan64,

I COULD do a new install and clone it to the 3 server boxes. However, as everything else (what little else I am asking them to serve) seems to be working fine and I managed to kill the unwanted VNC session... I think I will leave well enough alone. Until I have to upgrade to CentOS 8

Ken
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to start a vnc server for the actual display (scraping) with TigerVNC LXer Syndicated Linux News 0 10-18-2018 12:03 PM
Decided to start migrating, a few questions though bluemobile Linux - Newbie 15 08-13-2015 06:09 AM
KDE 4.5.5 decided to start random freezing up, sigh! BashTin Slackware 8 08-30-2012 04:37 PM
TigerVNC Start Before Logon tdisalvo Linux - Newbie 2 05-15-2012 09:32 AM
[SOLVED] Computer turns off by itself, then boots by itself to a blank screen Lyle Linux - Hardware 8 07-25-2010 07:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration