4 Replies Latest reply: Jul 2, 2014 11:03 AM by user10437903 RSS

    VNCServer - Xvnc dead but subsys locked

    user10437903

      Environment:

      Oracle Linux Server release 6.5

      Linux version 2.6.39-400.215.3.el6uek.x86_64 (mockbuild@ca-build44.us.oracle.com) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Fri Jun 20 00:37:05 PDT 2014

       

      I attempted to configure vncserver.  First I ran 11gr2 pre-install package from Oracle.  Later, we decided to go with 12c so I ran 12cR1 pre-install package.  I performed a yum update.  I configured the vncserver with the procedure below.  I get the following error message, "Xvnc dead but subsys locked." when # service vncserver status.  It starts working but fails within seconds.  The normal sys admin is on vacation and I am fairly limited in linux troubleshooting.

       

      # rpm -qa |grep vnc

      tigervnc-1.1.0-8.el6_5.x86_64

      tigervnc-server-1.1.0-8.el6_5.x86_64

       

      * create groups *

       

       

      # /usr/sbin/useradd -u 600 -d /home/grid -g oinstall -G asmadmin,asmdba,asmoper,dba -m -s /bin/bash grid

      # /usr/sbin/useradd -u 700 -d /home/oracle -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba -m -s /bin/bash oracle

       

      # passwd grid

      # passwd oracle

       

      # su grid

      # vncpasswd

       

      # su oracle

      # vncpasswd

       

      Make the following changes and additions to /etc/sysconfig/vncservers:

       

      # vi /etc/sysconfig/vncservers

       

      # The VNCSERVERS variable is a list of display:user pairs.

      #

      # Uncomment the lines below to start a VNC server on display :2

      # as my 'myusername' (adjust this to your own).  You will also

      # need to set a VNC password; run 'man vncpasswd' to see how

      # to do that.

      #

      # DO NOT RUN THIS SERVICE if your local area network is

      # untrusted!  For a secure way of using VNC, see this URL:

      # http://kbase.redhat.com/faq/docs/DOC-7028

       

      # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

       

      # Use "-localhost" to prevent remote VNC clients connecting except when

      # doing so through a secure tunnel.  See the "-via" option in the

      # `man vncviewer' manual page.

       

      # VNCSERVERS="2:myusername"

      # VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"

       

      VNCSERVERS="2:grid 3:oracle"

      VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp"

      VNCSERVERARGS[3]="-geometry 1024x768 -nolisten tcp"

       

       

       

      # service vncserver start

      # service vncserver stop

      # chkconfig vncserver on

       

      # service vncserver status

      Xvnc (pid 19361 19292) is running...

      # service vncserver status

      Xvnc dead but subsys locked

        • 1. Re: VNCServer - Xvnc dead but subsys locked
          Dude!

          The error message means that you have a Xvnc.pid file in /var/run directory that was not removed probably because the Xvnc process aborted. You can remove the file and start the vncserver again. I suggest to disable the firewall and SELinux prior to starting the vncserver again to see if this makes any difference.

           

          service iptables stop

          vi /etc/selinux/config

          • 2. Re: VNCServer - Xvnc dead but subsys locked
            user10437903

            There is no file called Xvnc.pid in /var/run.

            Firewall is disabled.

            SELinux is disabled.

            I have tried to chkconfig vncserver off and reboot.

            • 3. Re: VNCServer - Xvnc dead but subsys locked
              Dude!

              Can you try the following:

               

              rm -rf /var/lock/subsys/Xvnc

              service vncserver restart

              service vncserver status

               

              If Xvnc crashes after connecting, what output do you have in logfile in the .vnc directory of the user.

              • 4. Re: VNCServer - Xvnc dead but subsys locked
                user10437903

                I am not using the client to connect yet.  The service displays a failure.  I checked one of the users that should be started when the service vncserver start command is executed and I show the following error message in /home/<user>/.vnc/<fqhn>:2.log:

                 

                vncconfig: unable to open display "<fqhn>:2"

                xrdb: Connection refused

                xrdb: Can't open display '<fqhn>:2'

                xmodmap:  unable to open display '<fqhn>:2'

                mkdtemp: private socket dir: Permission denied

                 

                 

                Fatal server error:

                Could not create lock file in /tmp/.tX2-lock

                 

                Note: Substituted Fully Qualified Host Name (fqhn) and user in <>.


                It seems that I needed to change the permissions on my /tmp directory.


                drwxrwxr-x.   6 root root      4096 Jul  2 08:18 tmp


                chmod 1777

                 

                drwxrwxrwt. 22 root root 4096 Jul  2 09:01 /tmp


                It seems to be working now.  Thank you for your help.