Menu

#34 Doesn't starting as system service

closed-fixed
nobody
None
5
2014-09-15
2011-12-03
No

Hello.

cntlm v.0.92 is really great! Now I can just say 'git clone https://...' and it will works.

But about my problem.
I installed cntlm-0.92-1.i386.rpm on Fedora 15.
Cntlm service doesn't start after system was loaded.

[root@lix ~]# chkconfig | grep cntlm
cntlmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@lix ~]# ps -A | grep cntlm
[root@lix ~]# service cntlmd status
Checking for CNTLM Authentication Proxy: cntlmd.service - LSB: start/stop the cntlm proxy
Loaded: loaded (/etc/rc.d/init.d/cntlmd)
Active: active (exited) since Sat, 03 Dec 2011 09:50:56 +0600; 4min 37s ago
Process: 1121 ExecStart=/etc/rc.d/init.d/cntlmd start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/cntlmd.service
[root@lix ~]# service cntlmd start
Starting cntlmd (via systemctl): [ OK ]
[root@lix ~]# ps -A | grep cntlm
[root@lix ~]# service cntlmd status
Checking for CNTLM Authentication Proxy: cntlmd.service - LSB: start/stop the cntlm proxy
Loaded: loaded (/etc/rc.d/init.d/cntlmd)
Active: active (exited) since Sat, 03 Dec 2011 09:50:56 +0600; 5min ago
Process: 1121 ExecStart=/etc/rc.d/init.d/cntlmd start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/cntlmd.service
[root@lix ~]# cat /var/log/messages | grep cntlm | tail -n 40
Dec 3 09:41:25 lix cntlm: Starting cntlm version 0.92 for LITTLE endian
Dec 3 09:41:25 lix cntlm: Proxy listening on 0.0.0.0:3128
Dec 3 09:41:25 lix cntlm: Cannot bind port 8010: Address already in use!
Dec 3 09:41:25 lix cntlm: New ACL rule: allow 192.168.1.117/32
Dec 3 09:41:25 lix cntlm: Workstation name used: lix
Dec 3 09:41:25 lix cntlm: Using following NTLM hashes: NTLMv2(0) NT(1) LM(1)
Dec 3 09:41:25 lix cntlm[2955]: Daemon ready
Dec 3 09:41:46 lix cntlm: Starting cntlm version 0.92 for LITTLE endian
Dec 3 09:41:46 lix cntlm: Cannot bind port 3128: Address already in use!
Dec 3 09:41:46 lix cntlm: Cannot bind port 8010: Address already in use!
Dec 3 09:41:46 lix cntlm: New ACL rule: allow 192.168.1.117/32
Dec 3 09:41:46 lix cntlm: No proxy service ports were successfully opened.
Dec 3 09:42:03 lix cntlm[2955]: Using proxy 192.168.0.5:3128
Dec 3 09:43:46 lix cntlm: Starting cntlm version 0.92 for LITTLE endian
Dec 3 09:43:46 lix cntlm: Proxy listening on 0.0.0.0:3128
Dec 3 09:43:46 lix cntlm: SOCKS5 proxy listening on 0.0.0.0:8010
Dec 3 09:43:46 lix cntlm: New ACL rule: allow 192.168.1.117/32
Dec 3 09:43:46 lix cntlm: Workstation name used: lix
Dec 3 09:43:46 lix cntlm: SOCKS5 proxy will NOT require any authentication
Dec 3 09:43:46 lix cntlm: Using following NTLM hashes: NTLMv2(0) NT(1) LM(1)
Dec 3 09:43:46 lix cntlm[1237]: Daemon ready
Dec 3 09:43:46 lix cntlm[1237]: Changing uid:gid to 492:485 - Success
Dec 3 09:43:46 lix cntlm[1237]: Error creating a new PID file
Dec 3 09:49:34 lix cntlm: Starting cntlm version 0.92 for LITTLE endian
Dec 3 09:49:34 lix cntlm: Proxy listening on 0.0.0.0:3128
Dec 3 09:49:34 lix cntlm: Cannot bind port 8010: Address already in use!
Dec 3 09:49:34 lix cntlm: New ACL rule: allow 192.168.1.117/32
Dec 3 09:49:34 lix cntlm: Workstation name used: lix
Dec 3 09:49:34 lix cntlm: Using following NTLM hashes: NTLMv2(0) NT(1) LM(1)
Dec 3 09:49:34 lix cntlm[2298]: Daemon ready
Dec 3 09:50:56 lix cntlm: Starting cntlm version 0.92 for LITTLE endian
Dec 3 09:50:56 lix cntlm: Proxy listening on 0.0.0.0:3128
Dec 3 09:50:56 lix cntlm: SOCKS5 proxy listening on 0.0.0.0:8010
Dec 3 09:50:56 lix cntlm: New ACL rule: allow 192.168.1.117/32
Dec 3 09:50:56 lix cntlm: Workstation name used: lix
Dec 3 09:50:56 lix cntlm: SOCKS5 proxy will NOT require any authentication
Dec 3 09:50:56 lix cntlm: Using following NTLM hashes: NTLMv2(0) NT(1) LM(1)
Dec 3 09:50:56 lix cntlm[1138]: Daemon ready
Dec 3 09:50:56 lix cntlm[1138]: Changing uid:gid to 492:485 - Success
Dec 3 09:50:56 lix cntlm[1138]: Error creating a new PID file

I start cntlm with 'cntlm -c /etc/cntlm.conf'. It works fine.

Discussion

  • David Kubicek

    David Kubicek - 2011-12-03
    • status: open --> pending
     
  • David Kubicek

    David Kubicek - 2011-12-03

    There's like 5 starts... First one successful, the next ones failing, because the first one is already holding ports open.

    Can you get me the /etc/init.d/cntlmd script before 0.92 upgrade and the one using now? Did the 0.92 install a new start/stop script or is the old one active? Some distros will not overwrite init.d script, because they take them for configuration files and don't replace them when new version doesn't match the existing version.

    Try uninstalling, installing the old distro version from your distro, saving /etc/init.d/cntlmd, installing 0.92 and restoring /etc/init.d/cntlmd from the old version. If that helps, send me a copy of the working init script so I can check what customizations are required for your distribution. Also send me the name/version of your distribution. It should be in a file called /etc/*release* or something.

     
  • Ivan Romanov

    Ivan Romanov - 2011-12-03
    • status: pending --> open
     
  • Ivan Romanov

    Ivan Romanov - 2011-12-03

    I will provide you an extra information in Monday.

     
  • Ivan Romanov

    Ivan Romanov - 2011-12-06

    Now I use /etc/sysconfig/cntlmd.d and /etc/rc.d/init.d/cntlmd from cntlm-0.35.1-9.fc15.i686.

    # cat /var/log/messages | grep cntlm
    Dec 6 10:15:38 lix cntlm: Starting cntlm version 0.92 for LITTLE endian
    Dec 6 10:15:38 lix cntlm: Proxy listening on 0.0.0.0:3128
    Dec 6 10:15:38 lix cntlm: New ACL rule: allow 192.168.1.117/32
    Dec 6 10:15:38 lix cntlm: Workstation name used: lix
    Dec 6 10:15:38 lix cntlm: Using following NTLM hashes: NTLMv2(0) NT(1) LM(1)
    Dec 6 10:15:38 lix cntlm[1083]: Daemon ready
    Dec 6 10:15:38 lix cntlm[1083]: Changing uid:gid to 492:485 - Success
    Dec 6 10:15:38 lix cntlm[1083]: Error creating a new PID file
    # service cntlmd status
    Usage: status [-p pidfile] {program}
    cntlmd.service - SYSV: Cntlm is meant to be given your proxy address and becomming
    Loaded: loaded (/etc/rc.d/init.d/cntlmd)
    Active: active (exited) since Tue, 06 Dec 2011 10:15:38 +0600; 1min 51s ago
    Process: 1078 ExecStart=/etc/rc.d/init.d/cntlmd start (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/cntlmd.service

     
  • Ivan Romanov

    Ivan Romanov - 2011-12-06

    I did that you sad. But it didn't help me.

     
  • Ivan Romanov

    Ivan Romanov - 2011-12-06

    I observed this problem. A problem place is /var/run/cntlm directory.
    When I am doing 'service cntlmd start' it run '/usr/sbin/cntlm -c /etc/cntlm.conf -U cntlm -P /var/run/cntlm/cntlmd.pid'
    But really cntlm can't create /var/run/cntlm/cntlmd.pid because it hasn't access to /var/run/cntlm/.

     
  • Ivan Romanov

    Ivan Romanov - 2011-12-06

    Hm ... I removed your package, then I installed Fedora v.035 package and replaced /usr/sbin/cntlmd with the same file but from your package. ... Now all work fine.

     
  • Ivan Romanov

    Ivan Romanov - 2011-12-06

    I rebuilt Fedora package with cntlm-0.92.tar.bz2. Package works nice!

     
  • David Kubicek

    David Kubicek - 2011-12-10

    Great.

     
  • David Kubicek

    David Kubicek - 2011-12-10
    • status: open --> closed-fixed
     

Log in to post a comment.