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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-05-2017, 01:45 AM
|
#1
|
Member
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 85
Rep:
|
VNC not working with CentOS7
Hello,
I have a CentOS 7 minimal installation, on which I wish to install GNOME desktop & start a VNC session.
I followed this post to install GNOME desktop & start a VNC session.
When I try to connect to the machine using vnc viewer, it always times out & gives an error message -
Code:
Timed out waiting for response from the remote computer
Any idea how do I proceed further?
Thanks
Bhushan Pathak
|
|
|
06-05-2017, 02:20 AM
|
#2
|
LQ Guru
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
|
Perhaps you have selinux or iptables enabled on either/both the source and destination systems, and that is interfering with the connection?
|
|
|
06-08-2017, 02:01 AM
|
#3
|
Member
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 85
Original Poster
Rep:
|
I have updated the firewalld service to open the ports for VNC service. Still the issue persists. Is there any log which I can check for errors?
|
|
|
06-08-2017, 06:00 AM
|
#4
|
Member
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 525
Rep:
|
Hi,
I had similar problem with a Fedora 25 instance.
I put SE Linux in permissive mode to get VNC access.
I will later investigate why SE Linus is interfering with it.
Do and try again.
|
|
|
06-09-2017, 01:34 AM
|
#5
|
Member
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 85
Original Poster
Rep:
|
Stopped the firewall & disabled selinux, still the issue persists
Code:
[hadoop@master ~]$ getenforce
Disabled
[hadoop@master ~]$ ps -ef | grep vnc
hadoop 1984 1 0 12:00 ? 00:00:00 /usr/bin/Xvnc :4 -desktop master.hadoopcluster.com:4 (hadoop) -auth /home/hadoop/.Xauthority -geometry 1024x768 -rfbwait 30000 -rfbauth /home/hadoop/.vnc/passwd -rfbport 5904 -fp catalogue:/etc/X11/fontpath.d -pn
hadoop 2383 1 0 12:00 ? 00:00:00 /usr/bin/vncconfig -iconic
hadoop 3172 2723 0 12:01 pts/0 00:00:00 grep --color=auto vnc
[hadoop@master ~]$ sudo /bin/systemctl stop firewalld
[hadoop@master ~]$ sudo /bin/systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2017-06-09 12:02:01 IST; 7s ago
Docs: man:firewalld(1)
Process: 621 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 621 (code=exited, status=0/SUCCESS)
Jun 09 12:00:45 master.hadoopcluster.com systemd[1]: Starting firewalld - dynamic firewall daemon...
Jun 09 12:00:47 master.hadoopcluster.com systemd[1]: Started firewalld - dynamic firewall daemon.
Jun 09 12:02:00 master.hadoopcluster.com systemd[1]: Stopping firewalld - dynamic firewall daemon...
Jun 09 12:02:01 master.hadoopcluster.com systemd[1]: Stopped firewalld - dynamic firewall daemon.
[hadoop@master ~]$ sudo systemctl start vncserver@:4.service
[hadoop@master ~]$ sudo systemctl status vncserver@:4.service
● vncserver@:4.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:4.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2017-06-09 12:00:58 IST; 1min 23s ago
Process: 1239 ExecStart=/usr/sbin/runuser -l hadoop -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
Process: 1042 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Main PID: 1984 (Xvnc)
CGroup: /system.slice/system-vncserver.slice/vncserver@:4.service
‣ 1984 /usr/bin/Xvnc :4 -desktop master.hadoopcluster.com:4 (hadoop) -auth /home/hadoop/.Xauthority -geometry 1024x768 -rfbwait 3...
Jun 09 12:00:54 master.hadoopcluster.com systemd[1]: Starting Remote desktop service (VNC)...
Jun 09 12:00:58 master.hadoopcluster.com systemd[1]: Started Remote desktop service (VNC).
|
|
|
06-09-2017, 01:38 AM
|
#6
|
Member
Registered: Nov 2013
Location: Pune, India
Distribution: CentOS
Posts: 85
Original Poster
Rep:
|
The vnc server service file[/etc/systemd/system/vncserver@:4.service] config is -
Code:
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[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 hadoop -c "/usr/bin/vncserver %i"
PIDFile=/home/hadoop/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target
Anything I need to change?
|
|
|
All times are GMT -5. The time now is 07:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|