LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-28-2016, 01:29 PM   #1
iceman81
Member
 
Registered: Jan 2013
Location: New Jersey
Distribution: CentOS, Arch
Posts: 181

Rep: Reputation: Disabled
Centos 7 VNC-server issue


hello all, im trying to set up a vnc server on my centos 7 server virtual machine(hosted on a Win7 Desktop). Network connection is established and i can ssh into that VM from my fedora laptop.

i am following a guide @ https://www.howtoforge.com/vnc-serve...on-on-centos-7

i followed this exactly, with 2 users, using both @:1 and @:2

ssh in so i can copy the output into this forum

/etc/systemd/system/vncserver@:1.service
Code:
 
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/sbin/runuser -l ant -c "/usr/bin/vncserver %i"
PIDFile=/home/ant/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
trying to start service

Code:
[ab@localhost system]$ systemctl start vncserver@:1.service
Job for vncserver@:1.service failed because the control process exited with error code. See "systemctl status vncserver@:1.service" and "journalctl -xe" for details.
checking status

Code:
[ab@localhost ~]$ systemctl status vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2016-03-28 14:23:31 EDT; 3min 22s ago
  Process: 18718 ExecStart=/usr/sbin/runuser -l ant -c /usr/bin/vncserver %i (code=exited, status=2)
  Process: 18713 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
on a side note, i have rebooted and also added firewall-cmd rules and did a systemctl daemon-reload as well.

can anyone tell me what i am doing wrong here?

Last edited by iceman81; 03-28-2016 at 06:24 PM.
 
Old 03-28-2016, 04:17 PM   #2
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
As a guess, make sure your firewall on centos is open for ports 5901 and 5902
 
Old 03-28-2016, 05:26 PM   #3
iceman81
Member
 
Registered: Jan 2013
Location: New Jersey
Distribution: CentOS, Arch
Posts: 181

Original Poster
Rep: Reputation: Disabled
Centos 7 VNC-server issue

would that prevent the server from launching? i attached a pic of the firewall gui, appears to be set.


i also ran

Code:
firewall-cmd --permanent --zone=public --add-service vnc-server
firewall-cmd --reload
Attached Thumbnails
Click image for larger version

Name:	screengrab.png
Views:	281
Size:	67.1 KB
ID:	21283  
 
Old 03-28-2016, 06:37 PM   #4
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Like I said, only guessing about the firewall, but somewhere in my flaky memory banks I seem to recall vnc not starting if it's port is closed. That was pre-firewalld though.

Searching google for your error message turned up this, perhaps this person's solution would apply: https://www.centos.org/forums/viewto...p?f=48&t=47713
 
1 members found this post helpful.
Old 03-28-2016, 06:46 PM   #5
iceman81
Member
 
Registered: Jan 2013
Location: New Jersey
Distribution: CentOS, Arch
Posts: 181

Original Poster
Rep: Reputation: Disabled
thanks, i found that page too, still going through it. thanks for the help, i really appreciate it

now i am getting a new error. changed VM ram from 1024 to 2048 because i thought that was the resource it was referring to as system monitor showed me pinned at like 98% usage and it was running super slow.

Code:
[ab@localhost ~]$ systemctl status vncserver@:2.service
● vncserver@:2.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:2.service; enabled; vendor preset: disabled)
   Active: failed (Result: resources) since Mon 2016-03-28 20:22:57 EDT; 1h 46min ago
  Process: 6002 ExecStart=/usr/sbin/runuser -l ab -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
  Process: 5999 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)

Last edited by iceman81; 03-28-2016 at 09:11 PM. Reason: update
 
  


Reply



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
VNC Server on CentOS - Viewer on XP pdelassus Linux - Software 12 05-28-2011 04:45 AM
Issue with vnc server "tightVNC: VNC server closed connection", due to Screensaver frenchn00b General 1 07-30-2009 06:55 AM
setting up vnc server on centos 5 sandeepthug Linux - Newbie 2 01-14-2009 03:49 AM
VNC Server Issue Jason_25 Linux - Newbie 5 04-27-2003 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:52 AM.

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
Open Source Consulting | Domain Registration