Welcome to the Linux Foundation Forum!

Lab 5.8 unable to start vncserver@42

rajakshahzad
rajakshahzad Posts: 4
edited December 2017 in LFS211 Class Forum

Created file as directed but stuck with below error. 

Error.

[rks@localhost ~]$ systemctl start vncserver@42

Job for vncserver@42.service failed because the control process exited with error code. See "systemctl status vncserver@42.service" and "journalctl -xe" for details.

 

The bellow are journalctl -x ...

-- Unit vncserver@42.service has begun starting up.

Dec 21 17:52:42 localhost.localdomain systemd[20321]: Failed at step USER spawning /usr/bin/vncserver: No such process

-- Subject: Process /usr/bin/vncserver could not be executed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 

-- The process /usr/bin/vncserver could not be executed and failed.

-- 

-- The error number returned by this process is 3.

Dec 21 17:52:42 localhost.localdomain systemd[20324]: Failed at step USER spawning /usr/bin/vncserver: No such process

-- Subject: Process /usr/bin/vncserver could not be executed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 

-- The process /usr/bin/vncserver could not be executed and failed.

-- 

-- The error number returned by this process is 3.

Dec 21 17:52:42 localhost.localdomain systemd[1]: vncserver@42.service: control process exited, code=exited status=217

Dec 21 17:52:42 localhost.localdomain systemd[1]: Failed to start Remote desktop service (VNC) on port :42.

-- Subject: Unit vncserver@42.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 

-- Unit vncserver@42.service has failed.

-- 

-- The result is failed.

Dec 21 17:52:42 localhost.localdomain systemd[1]: Unit vncserver@42.service entered failed state.

Dec 21 17:52:42 localhost.localdomain systemd[1]: vncserver@42.service failed.

Dec 21 17:52:42 localhost.localdomain polkitd[714]: Unregistered Authentication Agent for unix-process:20293:3947458 (system bus name :1.733, object p

Comments

  • lee42x
    lee42x Posts: 380
    edited December 2017

    Thank you for letting us know there is possibly an issue.

    Please double check the systemctl command was exicuted as root not a regular user.  

    If that does not help can you please post your "/etc/systemd/system/vncserver@.service" file. 

    Thanks !

  • rajakshahzad
    rajakshahzad Posts: 4
    edited December 2017

    [Unit]

    Description=Remote desktop service (VNC) on port :%I

    After=syslog.target network.target

    [Service]

    Type=forking

    User=student

    ExecStartPre=-/usr/bin/vncserver -kill :%i

    ExecStart=/usr/bin/vncserver :%i -localhost

    PIDFile=/home/lee/.vnc/%H:%i.pid

    ExecStop=-/usr/bin/vncserver -kill :%i

    [Install]

    WantedBy=multi-user.target

  • lee42x
    lee42x Posts: 380
    edited December 2017

    Hi,  Well this seems to be all fine.  

    Can you please let me know the version/distro you are using?

    Are you using one of the Linux Foundation images?

    Please let me know the version of vncserver and systemd you are using.

    Thanks   

  • Hi,  The CentOs image was downloaded from CentOs web. 

    [rks@localhost ~]$ cat /etc/centos-release

    CentOS Linux release 7.4.1708 (Core) 

    [rks@localhost ~]$ cat /proc/version

    Linux version 3.10.0-693.5.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Fri Oct 20 20:32:50 UTC 2017

     

    [rks@localhost ~]$ rpm -qa | grep tigervnc-server

    tigervnc-server-minimal-1.8.0-1.el7.x86_64

    tigervnc-server-1.8.0-2.el7_4.x86_64

     

  • lee42x
    lee42x Posts: 380
    edited December 2017

    Hi, I retested it on a clean installation and duplicated your issue. It is a typo in the example file. The PID specification has the wrong user name in it.

    Incorrect:

    PIDFile=/home/lee/.vnc/%H:%i.pid  

    Correct:

    PIDFile=/home/student/.vnc/%H:%i.pid

    Thank you for pointing this out, it will be corrected in the next version. 

     

Categories

Upcoming Training