Results 1 to 7 of 7

Thread: Metasploit service - `remove_stale_pid_file': log/thin.pid already exists

  1. #1
    Join Date
    2013-Jun
    Posts
    16

    Angry Metasploit service - `remove_stale_pid_file': log/thin.pid already exists

    Hello,
    OK now I'm really loosing my mind because of the Metasploit service, I had the error with it before I couldn't fix it so I had to format my PC and have a fresh Kali OS, after installation I had to apt-get update && apt-get dist-upgrade -y update successfull, of course the metasploit service was running like a charm, anyway I installed Google Chrome and made it run as root, than installed PlayOnLinux and runed it as a normal user by adding it adduser youcef, after trying to reboot my PC in rebooting an error was showing so i had it in mind it was metasploit service after booting in again into my OS desktop I started the terminal and
    Code:
    root@Yusuf:~# service postgresql status 
    Running clusters: 9.1/main 
    root@Yusuf:~# service metasploit status 
    [ ok ] Metasploit rpc server is running.
    [FAIL] Metasploit web server is not running ... failed!
    [FAIL] Metasploit worker is not running ... failed!
    root@Yusuf:~# service metasploit stop 
    [ ok ] Stopping Metasploit worker: worker.
    [FAIL] Stopping Metasploit web server: thin failed!
    [ ok ] Stopping Metasploit rpc server: prosvc.
    root@Yusuf:~# service metasploit start 
    [ ok ] Starting Metasploit rpc server: prosvc.
    [....] Starting Metasploit web server: thin/opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/daemonizing.rb:173:in `remove_stale_pid_file': log/thin.pid already exists, seems like it's already running (process ID: 0). Stop the process or delete log/thin.pid. (Thin::PidFileExist)
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/daemonizing.rb:43:in `daemonize'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:61:in `start'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
    	from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:32:in `load'
    	from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:32:in `start_thin'
    	from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:46:in `<main>'

    seriously?? only after 3 days of a fresh Kali installation I get the metasploit error????
    Last edited by g0tmi1k; 2013-12-06 at 08:52. Reason: Meaning full title.

  2. #2
    Join Date
    2013-Mar
    Posts
    85
    Have you tried talking to the metasploit developers on their support IRC channel ? What do they say causes this issue ?

  3. #3
    Join Date
    2013-Mar
    Location
    milano
    Posts
    301
    Quote Originally Posted by Youcef View Post
    Hello,
    OK now I'm really loosing my mind because of the Metasploit service, I had the error with it before I couldn't fix it so I had to format my PC and have a fresh Kali OS, after installation I had to apt-get update && apt-get dist-upgrade -y update successfull, of course the metasploit service was running like a charm, anyway I installed Google Chrome and made it run as root, than installed PlayOnLinux and runed it as a normal user by adding it adduser youcef, after trying to reboot my PC in rebooting an error was showing so i had it in mind it was metasploit service after booting in again into my OS desktop I started the terminal and
    Code:
    root@Yusuf:~# service postgresql status 
    Running clusters: 9.1/main 
    root@Yusuf:~# service metasploit status 
    [ ok ] Metasploit rpc server is running.
    [FAIL] Metasploit web server is not running ... failed!
    [FAIL] Metasploit worker is not running ... failed!
    root@Yusuf:~# service metasploit stop 
    [ ok ] Stopping Metasploit worker: worker.
    [FAIL] Stopping Metasploit web server: thin failed!
    [ ok ] Stopping Metasploit rpc server: prosvc.
    root@Yusuf:~# service metasploit start 
    [ ok ] Starting Metasploit rpc server: prosvc.
    [....] Starting Metasploit web server: thin/opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/daemonizing.rb:173:in `remove_stale_pid_file': log/thin.pid already exists, seems like it's already running (process ID: 0). Stop the process or delete log/thin.pid. (Thin::PidFileExist)
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/daemonizing.rb:43:in `daemonize'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:61:in `start'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
    	from /opt/metasploit/apps/pro/ui/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
    	from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:32:in `load'
    	from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:32:in `start_thin'
    	from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:46:in `<main>'

    seriously?? only after 3 days of a fresh Kali installation I get the metasploit error????
    hi
    sorry my stupid question :is your "problem" perhaps linked to an attempted to removal metasploit?
    https://forums.kali.org/showthread.p...asploit-issues

  4. #4
    Join Date
    2013-Jun
    Posts
    16
    Quote Originally Posted by zimmaro View Post
    hi
    sorry my stupid question :is your "problem" perhaps linked to an attempted to removal metasploit?
    https://forums.kali.org/showthread.p...asploit-issues
    yes i've already asked the question but i had another problem but that was before formatting my Kali partiton and reinstalling it again

  5. #5
    Whats the output of:
    Code:
    cat /etc/apt/sources.list


    I believe the issue is due to the fact the service wasn't closed down 'nicely' and it didn't remove the old PID file.
    [....]`remove_stale_pid_file': log/thin.pid already exists, seems like it's already running (process ID: 0). Stop the process or delete log/thin.pid. (Thin::PidFileExist)
    If you're 100% sure the service isn't running, try deleting that thin.pid file.
    Code:
    /opt/metasploit/apps/pro/ui/log/thin.pid
    Last edited by g0tmi1k; 2013-12-06 at 08:58.

  6. #6
    Join Date
    2013-Jun
    Posts
    16
    Quote Originally Posted by g0tmi1k View Post
    Whats the output of:
    Code:
    cat /etc/apt/sources.list


    I believe the issue is due to the fact the service wasn't closed down 'nicely' and it didn't remove the old PID file.

    If you're 100% sure the service isn't running, try deleting that thin.pid file.
    Code:
    /opt/metasploit/apps/pro/ui/log/thin.pid
    well here's the report when cat /etc/apt/sources.list
    Code:
    # 
    
    # deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL Binary 20130905-08:50]/ kali contrib main non-free
    
    #deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot i386 LIVE/INSTALL Binary 20130905-08:50]/ kali contrib main non-free
    
    deb http://http.kali.org/kali kali main non-free contrib
    deb-src http://http.kali.org/kali kali main non-free contrib
    
    ## Security updates
    # Line commented out by installer because it failed to verify:
    #deb http://security.kali.org/kali-security kali/updates main contrib non-free
    and yes the service wasn't closed nicely cause i had a power issues at my town they were working on so i lost that day power about 3 or 4 times anyway the metasploit service and postgresql service starts on Kali's startup , command update-rc.d postgresql enable && update-rc.d metasploit enable and for the thin.pid yes it wasn't deleted now after deleting it the metasploit starts without any problems, Thank you very much

  7. #7
    Quote Originally Posted by Youcef View Post
    and yes the service wasn't closed nicely cause i had a power issues at my town they were working on so i lost that day power about 3 or 4 times anyway the metasploit service and postgresql service starts on Kali's startup , command update-rc.d postgresql enable && update-rc.d metasploit enable and for the thin.pid yes it wasn't deleted now after deleting it the metasploit starts without any problems, Thank you very much
    That would explain why it happeend
    Glad to hear you have it working now.

Similar Threads

  1. Metasploit: unrecognized service
    By someshwarceh in forum General Archive
    Replies: 2
    Last Post: 2014-02-22, 00:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •