Saturday, February 5, 2011

The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs

Recently i have created a Windows service,then i have installed on my windows7 machine.
When i tried start the service i got the follwing error.
The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs.”
I gone through the problem i have tried so many ways to get out of the problem finally i got the solution as follows.
1)      Click Run Command from start buttin
2)      Enter Services.msc then click OK,you will get all the services in your computer.
3)      Select your service and right click on the service and select Properties
4)      Goto Logon Properties à select  Local System Account then click OK
Now try to start you service you will success.

C# 2008 Programmer's Reference (Wrox Programmer to Programmer)

58 comments:

  1. Thanks Boss ........... Nice solution ... Its working for me ......... and I was searching this from one week..

    Thanks again .....
    Akhil

    ReplyDelete
  2. I followed these steps but doesn’t seems to be solving my problem. I have a 32bit and 64bit xp supported setup file for imagelan, and am willing to install on win7 as there are no other versions available, the setup for 32bit completes successfully and lists down the service, but am getting this same error even after following these steps.

    ReplyDelete
  3. May be you doesn't have proper rights for the database/file that service depends,and Check
    if you have enough disk space where the service is installed and also try to clear Event Logs

    Look at this URL to clear Event Logs

    http://technet.microsoft.com/en-us/library/cc722318.aspx

    ReplyDelete
  4. Hi,

    I have this similar issue as well, tried your solution but doesn't solve.

    My service is actually a java apps that listening to a local port and initialized session pool.

    i tried manually start the service but it stopped immediately.

    cleared and checked the event log and system log, nothing shows on event log. System log shows the service start and service stopped.

    regards,
    Dennis

    ReplyDelete
  5. i tried the solution but i could not solve my problem....can u pls suggest any more ways to solve this

    ReplyDelete
  6. Had similar problem. Starting with eventlog is good point as in my case it was invalid setting in app.config and it was displayed in eventlog in oppposite that nonsence error I got when trying start service.

    ReplyDelete
  7. Worked with me as well.. Thanks a lot!!

    ReplyDelete
  8. I have the same error!! Can somebody help us?

    ReplyDelete
  9. I had a same problem,to avoid the error like
    "The xyz service on local computer started and then stopped. some service stops automatically if they have no work to do, for example performance log and alert service"
    I have removed the changes made in app.config file,
    Worked for me.
    Thanks

    ReplyDelete
  10. For me the same issue came because of a wrong setting in my app.config file. I changed the setting and the issue resolved

    ReplyDelete
  11. i installed my service with a local account on windows server 2008 and it is giving me this error message. do you know any way to help me out?? please my address is t3x.ltsr@gmail.com

    ReplyDelete
  12. Hi,
    Where is the app.config file and what i need to edit in that...kindly guide i also facing the same issue...while starting SQLSERVER AGENT and MSSQLSERVER.....Pls guide me...

    ReplyDelete
  13. THANKS IT Working, It is Great Solution

    ReplyDelete
  14. Awesome dude, it works!!!!

    ReplyDelete
  15. Hi,
    I am trying to configure a weblogic admin server as windows service and i get the same problem. i have tried to set it up as you have mentioned . but it doesnt work. any idea?

    any kind of points will be great help.

    ReplyDelete
    Replies
    1. Hi same issue for me , I can start the Admin server from command line as:
      beasvc -debug "beasvc base_domain_AdminServer"
      but can't do it from services console , have I to restart server ?

      Delete
    2. Hi Please send me if you find a solution for this.

      Delete
  16. In sql server configuration
    Disable VIA protocol...
    This will also solve your prob easily than looking into logs

    www.parigh.com

    ReplyDelete
  17. If it does't work any idea,please update your computer.
    -------------------------------------------------------------
    For Example:
    Update for Windows Server 2003 x64 Edition
    http://www.microsoft.com/downloads/details.aspx?FamilyId=C174BA3C-8C6E-4798-B9F9-27276028F274
    -------------------------------------------------------------

    ReplyDelete
  18. for me it is not work :( my service is "postrgessql 9.1"

    ReplyDelete
  19. I tried with your solution but it is not working

    ReplyDelete
  20. Nice work but it is not working in oracle lstnr service

    www.forgegeek.com

    ReplyDelete
  21. As many people have said, a simple error from a bad web.config parameter can cause this error. Check your web.config!

    ReplyDelete
  22. Either that or you ca just close the service list windows, reopen it and try again! It works...

    Also, if problems still persist, chekc your event log, it will point the error for you!!

    ReplyDelete
  23. This is not working for me.. Can someone suggest alternative approach?

    ReplyDelete
  24. I tried to check "Local system account" and it worked but after that some days, this issue raised again. Someone help me please!

    ReplyDelete
  25. Sorry Boss..Above solun not working for me..
    Please suggest me another solun.thx in Adv..!@!

    ReplyDelete
  26. For specific to "Performance Logs and Alerts" service follow the below steps.
    1) got to run prompt, open "perfmon"
    2) goto counter logs
    3) start system overview.

    This is will start your performance logs and alerts.
    This resolved me issue. thanks

    ReplyDelete
  27. Thanks a lot, it works for me.

    ReplyDelete
  28. first of all you need to know the cause of problem, so check log file then proceed to solution. These problems are mostly due to incorrect values in services.config files.

    ReplyDelete
  29. Event logs helps a lot for getting the reason.
    i faced log4net dll version mismatch.

    ReplyDelete
  30. When I stopped my antivirus from scanning, IT WORKED.
    So simple.
    The service not working was VMware DHCP Service.

    ReplyDelete
  31. Wonderful blog & good post.Its really helpful for me, awaiting for more new post. IT Support Orange County

    ReplyDelete
  32. Inbound Technical Support call | Call at: +91 981-142-0083 | inbound calls for tech support | tech support inbound calls A great online marketing company for tech support inbound calls, Inbound Technical Support call by osiel web

    ReplyDelete
  33. by default it is in local system account.... but its not working

    ReplyDelete
  34. I have same issue comes to execute the service Jar file using windows service.

    ReplyDelete
  35. Thanks Boss it works for me too

    ReplyDelete
  36. This comment has been removed by a blog administrator.

    ReplyDelete
  37. Thanks, it worked for me. But could you please let me know why it wasn't working and now it works with this solution?

    ReplyDelete
    Replies
    1. Hey basically when you install any service it would seek proper permissions to start the service so it will fail if authentication fails with the current user. so when you give local account it will take from windows

      you can try by giving proper account details and try it will work for sure.

      Delete
  38. Solution shared by you doesn't work for all the applications.
    When the application recommends to configure the account, how can we go with Local System account..

    This is not the correct solution to go with..


    Please provide me resolution steps to resolve this issue.

    ReplyDelete
    Replies
    1. hey Sireesh if that is the case you can provide proper account details and save and try start the service it would work fine,it worked for me in same case.

      Delete
  39. hi, i am getting the same error but the solution which you provided is not working for me :(

    ReplyDelete
    Replies
    1. if that is the case you can provide proper account details and save and try start the service it would work fine,it worked for me in same case

      Delete
  40. tried all points given above but no solution please guide if possible

    ReplyDelete
    Replies
    1. if that is the case you can provide proper account details and save and try start the service it would work fine,it worked for me in same case

      Delete
  41. Tried all given solutions but , no results please help asap

    ReplyDelete
  42. worked with me thanks

    ReplyDelete
  43. Replies
    1. If that is the case select this account radio button and provide proper account details and save and try start the service it would work fine.

      if not Please un-install and install the service with administration privileges.

      Thanks

      Delete