Local computer started and then stopped windows service

Ошибка запуска службы SNMP

На одном из северов корпоративной сети обнаружились проблемы с запуском службы SNMP. При попытке запуска SNMP появлялась следующая ошибка:

“The SNMP Service service on Local Computer started and then stopped”

И в журнале системы появлялось событие с Event ID 7036.

Кроме того, при попытке переустановить или установить службу SNMP при помощи мастера RemoveWindowsComponents, появлялась следующее предупреждение:

“One or more services for the Simple Network Management Protocol component took more than their allotted time to start. The installation will continue but services will not be available until they have started completely”

В том случае, если нажать кнопку Continue, установка продолжится и закончится, однако при попытке запуска сервиса SNMP, ошибка сохранится.

Как оказалось, причина такого поведения службы SNMP, заключается в том, что некое приложение или служба уже использует порт, который обычно использует служба SNMP. Стандартный порт службы SNMP — UDP 161. Для определения того, какая же служба использует этот порт, я выполнил следующие действия:

1) Ищем ID процесса, слушающего на 161 порту UDP

Откроем командную строку и наберем: “Netstat –ano (я уже описывал как при помощи netstat определить порт, используемый приложением)

В результате выполнения команды ищем идентификатор (ID) процесса, слушающего 161 UDP порт (строка UDP 0.0.0.0:161). Именно этот процесс мешает нормальному запуску службы SNMP.

2) С помощью диспетчера задач определяем исполняемый файл интересующего нас процесса

Откройте “Windows Task Manager”, в меню “View” выберите пункт “Select Columns” (выбрать столбцы), и отметьте галочкой “PID (Process Identifier)”.

Теперь в диспетчере задач напротив каждого процесса указан его PID.

Осталось просто отсортировать процессы по PID, щелкнув по заголовку колонки “PID”, и найти процесс, PID которого мы определили с помощью команды netstat — ano”.

В результате мы должны получить имя исполняемого exe-файла, использующего 161 порт UDP, который обычно используется процессов SNMP.EXE. Именно этот процесс мешает запуску службы SNMP.

3) При помощи Tasklist найдем службу и остановим ее

Достаточно часто различные приложения выполняются в виде служб, поэтому рассмотрим ситуацию, в которой бы запуску службы SNMP мешала бы другая служба, которая основана на исполняемом файле, найденном во втором шаге.

В командной строке наберите: Tasklist /svc. В результате вы увидите список всех служб и ассоциированных с ними исполняемых файлов. Команда “tasklist /svc” выводит примерно следующее:

После того, как вы определили имя службы, то при помощи оснастки Services.msc”, вы можете остановить ее. А затем можно вручную запустить службу SNMP Service.

Естественно, не забудьте разобраться, что за службу вы остановили, откуда она взялась и для чего нужна!

Приведенная методика может использоваться для определения портов, используемых той или иной службой Windows, или приложением.

The Windows Defender Service on Local Computer started and then stopped.

When attempting to start defender in services.msc I get this message: The Windows Defender Serviceservice on Local Computer started and then stopped. Some services stop automatically if they are not in use by services or programs.

This started after today’s update 8/7/2015.

I was able to start Windows Defender Network Inspection Service but it says startup type is Manual. That doesn’t seem right.

Replies (6) 

Thank you for being part of Windows 10 family.

Sorry to know that you are facing issues with Windows 10.

Читайте также:  Как освободить место после обновления windows

In order to help you better, please provide the information:

Have you installed any third party security software on the Computer?

If so, then i would suggest you to disable or uninstall the third party security software and check if the issues persist.

Disable Anti virus:

NOTE: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you shouldn’t disable your antivirus software. If you have to temporarily disable it to install other software, you should re-enable it as soon as you’re done. If you’re connected to the Internet or a network while your antivirus software is disabled, your computer is vulnerable to attacks.

Refer to the below methods and check if it helps.

Method 1: I suggest you to perform the system maintenance troubleshooter. It will resolve the common system problems.
1. Tap on Windows Key and click on search bar.
2. Type “Troubleshooting” without the quotes and click on Troubleshooting.
3. Then click on System and Security.
4. Click on System Maintenance.
5. Click on Next and follow the prompts to run the troubleshooter.

If the issue still persist, refer to the below method.

Method 2 : I suggest you to perform a System File Checker of the Computer and check if it helps.

1. Press Windows Key.

2. Then type “CMD ” without the quotes and right click on it.

3. Select Run as Administrator .

4. Then type” sfc /scannow ” without the quotes and hit on Enter Key .

If the issues still persist, refer to the below methods.

Reply with the information, so that we can help you better.
Hope it helps. Contact us if you need any further assistance, we will be glad to help.

The netlogon service on local computer started and then stopped. Some services stop automatically if they have no work to do

Replies (4) 

Thank you for posting your query on Microsoft Community. We are glad to assist you.

I would suggest you to try following the suggestions given below and check, if this helps you to fix the problem.

Method 1:

You may try checking if the problem persists in Safe Mode.

Step 1: Safe Mode with Networking

Boot the computer in Safe mode with Networking and check if the issue persists. Follow these steps to start the computer in safe mode.

Click the link and follow the steps “Start your computer in safe mode

If the problem does not exist in safe mode, try to perform a clean boot and check.

Step 2: Perform Clean Boot.

Putting your system in Clean Boot state helps in identifying if any third party applications or startup items are causing the issue.

Refer: How to perform a clean boot in Windows
http://support.microsoft.com/kb/929135

Note: After troubleshooting, refer to this section «How to reset the computer to start normally after clean boot troubleshooting»

Method 2: System File Checker.

You may run the system file checker tool and check if it helps. SFC scan will scan for the corrupted system files on the computer. You may refer to the following article in order to use System File Checker tool appropriately.

Use the System File Checker tool to repair missing or corrupted system files.

Do get back and let us know the status of the issue, we will be glad to help you further. We, at Microsoft strive towards excellence.

Local computer started and then stopped windows service

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I have a windows service and it was working fine, and today I tried to stop it and unlike the usual stop process, this one took a longer time. The next time I want to start the windows service, it raise an error that the service started and then stopped, it also said that service with no job stops automatically. When I checked the event log, there is no event about my service. My service worked well yesterday, in fact, it worked as usual just before I tried to stop it . but then I don’t know why the error appeared, I don’t think I did any changes to the database..

Читайте также:  Windows word 2010 кряк

Any solutions ? or if someone can share his/her own problem similar to this

What my windows service do: read a log file, write to log file, then access database, then execute a stored procedure in 2 hours interval..

Edit: I even tried to restart my computer after the problem keep happening when i try to start the service, but it doesn’t solve the problem.. now I cant start my service. One way I found to solve this problem is by re-installing the service. However, I need a better solution because I don’t want to keep re-installing the service if this problem appeared.

ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

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

Introduction:

Here I will explain how to solve the Service on local computer started and then stopped, some services stop automatically if there are not in use by other services or programs

In previous article I explained clearly how to create windows service and how to run windows service in scheduled intervals and how to install windows service in system. In my system I tried to install windows service completion writing the code but at that time I was unable to install windows service I got error like this

If you enjoyed this post, please support the blog below. It’s FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

40 comments :

@mis solutions
Please don’t post spam comments

@Priyanshu
Please don’t post spam comments

can you please help me whhy i am gettign this error

Windows could not start the Documentservice on local computer
Error 1053: the service didnot respond to the start or control request in a timely fashion

here Documentservice is my window service name

can you please help me whhy i am gettign this error

Windows could not start the Documentservice on local computer
Error 1053: the service didnot respond to the start or control request in a timely fashion

here Documentservice is my window service name

Guys no need of looking into logs and all
just put VIA protocol disabled from configuration manager. And try with restarting those services..

more details at
www.parigh.com

please check the properties of service

I have done the same thing but its not working still the same error when i check the appl log file it shows the below error

Service cannot be started. System.Configuration.ConfigurationErrorsException: The binding at system.serviceModel/bindings/netTcpBinding does not have a configured binding named ‘TCPBindingBasicExample.WCFServiceHost.MyServiceBehaviour’. This is an invalid value for bindingConfiguration. (E:\My-VS-Project\TCPBindingBasicExample\WCFServiceHost\bin\Debug\WCFServiceHost.exe.Config line 44)
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at Sys.

this solution doesn’t work for me. Any one with other solution.

Service cannot be started. System.Web.HttpException: The transport failed to connect to the server.
—> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.

— End of inner exception stack trace —
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Type type, Object obj, String methodName, Object[] args)
at System.Web.Mail.SmtpMail.LateB.

Читайте также:  Bcmbtbus bluetooth драйвер windows 10

super 🙂 it worked.

Not working for me,it is still showing same message

not working for me as well.

First way worked perfectly. Thank you!

Thanks Suresh. helpful !!

Still am getting these error i have done those two steps
The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs

This not work for me.

i check 2 way but not work . some message display .

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

how to solve plz help me.

Neither solution worked for me. 0/2

sorry to say sir both methods don’t worked . plz suggest the solution to this error

I have written a email code in windows service.
Without email code it is working very well but when I am using email code then it is showing the same error. I have already tried both above solution but still there is problem. Please help me. below is the code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.IO;
using System.Timers;
using System.Net;
using System.Net.Mail;
using System.Data.SqlClient;
namespace WinEmailService
<
public partial class EmailScheduleService : ServiceBase
<
Timer timer = new Timer();
public EmailScheduleService()
<
InitializeComponent();
>

protected override void OnStart(string[] args)
<
//add this line to text file during start of service
TraceService(«start service»);

//handle Elapsed event
timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);

//This statement is used to set interval to 1 minute (= 60,000 milliseconds)

//enabling the timer
timer.Enabled = true;
>

protected override void OnStop()
<
timer.Enabled = false;
TraceService(«stopping service»);
>
private void OnElapsedTime(object source, ElapsedEventArgs e)
<
TraceService(«Another email send at » + DateTime.Now);
>
private void TraceService(string content)
<
//set up a filestream
FileStream fs = new FileStream(@»d:\EmailSendTest.txt», FileMode.OpenOrCreate, FileAccess.Write);

//set up a streamwriter for adding text
StreamWriter sw = new StreamWriter(fs);

//find the end of the underlying filestream
sw.BaseStream.Seek(0, SeekOrigin.End);

//add the text
sw.WriteLine(content);
//add the text to the underlying filestream

sw.Flush();
//close the writer
sw.Close();

SmtpClient m = new SmtpClient(«smtp.rediffmailpro.com»);
m.Port = 587;
m.UseDefaultCredentials = true;
MailAddress To = new MailAddress(«impraveen26@gmail.com»);
MailAddress From = new MailAddress(«abc@gmail.com»);
MailMessage mm = new MailMessage(From, To);
mm.Subject = «Automatic mail— Testing ——«;
mm.IsBodyHtml = true;
mm.Body = «Testing. «;
m.Credentials = new System.Net.NetworkCredential(«abc@gmail.com», «password»);
m.DeliveryMethod = SmtpDeliveryMethod.Network;
m.Send(mm);

I also have the same prob, can some one please help me out?

nice post sir ur post is very helpfull for me every time

have a same problem and cannot fix it

I have got same problem and used your solution for it. But it is not solve. please help me asap.
Thank you.

It’s not working. (

I tried both options still facing the same issue. even i am logged in with administrator account.

I have tried both ways but not working showing same error with reason in log event
The installation if sql server agent is disable the edition of sql server that installed this service does not support sql agent

windows 7 users ->Right Click on «MyComputer» ->Manage->System Tools -> Windows Logs ->Application
if you have any error in window service will show there
double click on error will get exact problem.

Check port number in IIS whether it is already consumed by other service or not. If yes then Stop that and then try to start your service.

while installation the folder paths should not have blank spaces , it works perfectly.

This is possibly shown when system do not have enough memory hence you need to alter the Xmx and Xms parameters. This is also possible if system do not have enough space in the hard disk. This can also happen if the service needs to be started from administrator privilege hence you need to give logon of the particular user

Not working for me,it is still showing same Message

Оцените статью