Skip to main content

 none
The SQLAGENT$InstanceName service on ServerName started and then stopped. RRS feed

  • Question

  • SQL Server 2012 on OS 2012

    The port number of Analysis Services was changed to the same number as the SQL Server Engine and SQL Server Agent.  This was done by someone else and not me.  What happened was that the SQL Server Engine and Agent stopped.  I altered the port number for the SQL Server Engine and I got it working.  But I cannot start SQL Server Agent.  When I look at the log I get the following:

    2014-09-25 15:37:37 - ? [100] Microsoft SQLServerAgent version 11.0.3431.0 (X64 unicode retail build) : Process ID 5172
    2014-09-25 15:37:37 - ? [495] The SQL Server Agent startup service account is NT Service\SQLAgent$InstanceNameHere.
    2014-09-25 15:37:37 - ! [150] SQL Server does not accept the connection (error: 64). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
    2014-09-25 15:37:37 - ! [000] Unable to connect to server 'ServerNameHere\InstanceNameHere'; SQLServerAgent cannot start
    2014-09-25 15:37:37 - ! [298] SQLServer Error: 26, Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server. [SQLSTATE 08001]
    2014-09-25 15:37:37 - ! [298] SQLServer Error: 64, TCP Provider: The specified network name is no longer available. [SQLSTATE 08001]
    2014-09-25 15:37:37 - ! [298] SQLServer Error: 26, Client unable to establish connection [SQLSTATE 08001]
    2014-09-25 15:37:37 - ! [298] SQLServer Error: 64, Client unable to establish connection due to prelogin failure [SQLSTATE 08001]
    2014-09-25 15:37:37 - ! [382] Logon to server 'ServerNameHere\InstanceNameHere' failed (DisableAgentXPs)
    2014-09-25 15:37:37 - ? [098] SQLServerAgent terminated (normally)

    I have looked at various solutions and they don't seem to fix it.  Can anyone point me in the right direction?


    lcerni

    Thursday, September 25, 2014 2:44 PM

Answers

  • After exhausting all suggestions here and on the web, I decided to run the repair.  And that has fixed my issue.

    lcerni

    • Marked as answer by lcerni Monday, October 6, 2014 1:21 PM
    Monday, October 6, 2014 1:21 PM

All replies

  • Are you sure SQL Server is working fine?

    2014-09-25 15:37:37 - ! [150] SQL Server does not accept the connection (error: 64). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.

    It seems like SQL Server is not ready to accept connections at the point SQL Agent was starting.

    COnfirm that SQL is up and running and msdb database is online. Make sure that SQL Agent service account has enough permissions on SQL Server.


    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

    Thursday, September 25, 2014 3:44 PM
  • When I logon to the server\instance directly, I can query the msdb database.  However, when I log onto the instance remotely, I get the following error message:

    Cannot conntect to ServerNameHere\InstanceNameHere.
    A connection was successfully established with the server, but then an error occurred during the login process.  (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)

    I have through the Firewall made sure that the ports are open.

    So when on the server directly the instance is up and running.


    lcerni

    Thursday, September 25, 2014 4:10 PM
  • Check if browser service is running

    Check if TCP/IP, Named Pipes providers are enabled in Configuration Manager.

    Check if the remote connection works when you force tcp/np protocols. follow this blog for this

    http://blogs.msdn.com/b/chaitanya_medikonduri/archive/2011/03/09/sql-server-connectivity-issues-troubleshooting-tips.aspx

    Check if you have any alias defined in Configuraiton Manager try to remove them if there are.

    Did you confirm if SQL Agent service account is added as a login in SQL Server and has sysadmin rights?


    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

    Thursday, September 25, 2014 9:58 PM
  • Enable Agent XPs (exec sp_configure 'Agent XPs',1;reconfigure with override;) and try starting Agent from the services applet.

    Satish Kartan www.sqlfood.com

    Thursday, September 25, 2014 10:39 PM
  • Hi,

    Try to start SQL Agent through SQL Server Configuration Manager, also make sure you have used valid user credentials for SQL Segent Services (right click on SQL Server Agent -> Properties) .

    If still gives error then analyse the application errors in Windows eventviewer.


    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 | My Blog | My Page

    Friday, September 26, 2014 5:13 AM
  • So far I have verified the following:

    Yes, Browser Service is running.
    Yes, TCP/IP is enabled.  By default Named Pipes is disabled.  There are 7 other named instances on this VM and Named Pipes is disables as well on them and they are working fine.
    No alias.
    Yes, SQL Agent service account is added as a login in SQL Server and has sysadmin rights.

    I tried "Enable Agent XPs (exec sp_configure 'Agent XPs',1;reconfigure with override;) and try starting Agent from the services applet."  I get the message "The SQL Server Agent service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.".

    To make sure I have used valid user credentials for SQL Segent Services (right click on SQL Server Agent -> Properties), I am not sure what to look at.  The Gerneral, Advanced, Alert System, Job System, Connection, or History page?  I have verified that I am pointing to the correct Error Log file.  I have compared with the other instances on this VM and they all look the same.


    lcerni

    Friday, September 26, 2014 2:08 PM
  • Hi,

    To check SQL Agent account details.

    Right click on SQL Server Agent, properties Log On


    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 | My Blog | My Page

    Friday, September 26, 2014 2:21 PM
  • When I do the above, I get the following:

    Then I hit the Start button:


    lcerni

    Friday, September 26, 2014 2:58 PM
  • check your event log, you might get some clue there.

    Also try to re-enter the password just to confirm that your password is not changed.


    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 | My Blog | My Page


    Friday, September 26, 2014 4:19 PM
  • If the service account password is not the problem, try the following workaround to increase ServicesPipeTimeout value to 60 seconds in the registry as mentioned in the following article: http://support.microsoft.com/kb/922918/en-us. Also, you need to reboot for this setting to be effective.

    Satish Kartan www.sqlfood.com

    Monday, September 29, 2014 3:28 AM
  • After exhausting all suggestions here and on the web, I decided to run the repair.  And that has fixed my issue.

    lcerni

    • Marked as answer by lcerni Monday, October 6, 2014 1:21 PM
    Monday, October 6, 2014 1:21 PM
  • Hi All,

    I have a backup software , whose services are stuck on starting. 

    SQL server service is running, but unable to connect to the Instance using SSMS. Error Message: SSL Provider: Local security Authority cannot be contacted

    Notice below log entries in SQLagent.OUT file

    2019-10-08 17:13:09 - ? [100] Microsoft SQLServerAgent version 12.0.5000.0 (x86 unicode retail build) : Process ID 6296
    2019-10-08 17:13:09 - ? [495] The SQL Server Agent startup service account is Domain\Hostname$.
    2019-10-08 17:13:09 - ! [150] SQL Server does not accept the connection (error: 772). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
    2019-10-08 17:13:09 - ! [000] Unable to connect to server 'Hostname\Instancename'; SQLServerAgent cannot start
    2019-10-08 17:13:09 - ! [298] SQLServer Error: 772, SSL Provider: The Local Security Authority cannot be contacted [SQLSTATE 08001] 
    2019-10-08 17:13:09 - ! [298] SQLServer Error: 772, Client unable to establish connection [SQLSTATE 08001] 
    2019-10-08 17:13:09 - ! [382] Logon to server 'Hostname\Instancename' failed (DisableAgentXPs)
    2019-10-08 17:35:39 - ? [098] SQLServerAgent terminated (normally)

    As per your response, i see that repair has fixed the issue. May I please if you are referring to repair of SQLserver agent ?

    Do you have any other suggestions to fix this issue ?

    BTW, we are using SQL 2014 Express SP2.

    Thanks,

    Pruthd




    Monday, October 14, 2019 3:57 AM
  • SQL server service is running, but unable to connect to the Instance using SSMS. Error Message: SSL Provider: Local security Authority cannot be contacted

    Notice below log entries in SQLagent.OUT file

    2019-10-08 17:13:09 - ? [100] Microsoft SQLServerAgent version 12.0.5000.0 (x86 unicode retail build) : Process ID 6296
    2019-10-08 17:13:09 - ? [495] The SQL Server Agent startup service account is Domain\Hostname$.
    2019-10-08 17:13:09 - ! [150] SQL Server does not accept the connection (error: 772). Waiting for Sql Server to allow connections. Operation attempted was: Verify Connection On Start.
    2019-10-08 17:13:09 - ! [000] Unable to connect to server 'Hostname\Instancename'; SQLServerAgent cannot start
    2019-10-08 17:13:09 - ! [298] SQLServer Error: 772, SSL Provider: The Local Security Authority cannot be contacted [SQLSTATE 08001] 
    2019-10-08 17:13:09 - ! [298] SQLServer Error: 772, Client unable to establish connection [SQLSTATE 08001] 
    2019-10-08 17:13:09 - ! [382] Logon to server 'Hostname\Instancename' failed (DisableAgentXPs)
    2019-10-08 17:35:39 - ? [098] SQLServerAgent terminated (normally)



    As per your response, i see that repair has fixed the issue. May I please if you are referring to repair of SQLserver agent ?

    Do you have any other suggestions to fix this issue ?

    BTW, we are using SQL 2014 Express SP2.

    I have no idea what you are talking about, but generally it is a bad idea to piggyback on an old thread. If you want help, start a new thread, describing your problem from start to end.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Monday, October 14, 2019 9:30 PM