locked
Unexpected loss of access SQL Server from Node JS app RRS feed

  • Question

  • I have a simple web app that queries <g class="gr_ gr_58 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="58" id="58">bunch</g> of SQL Servers to fetch data regarding a part number. For establishing connectivity between my app and the SQL Server, I am using <g class="gr_ gr_145 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="145" id="145">mssql</g>/msnodesqlv8 modules for this. I was able to fetch the data until recently (yesterday). Suddenly I see the below error in my console. I am able to connect to the same SQL Server without any issue from <g class="gr_ gr_482 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="482" id="482">SSMS</g>. Any idea why this is happening? 

        at base.ConnectionPool._poolCreate.base.Promise.msnodesql.open (d:\OEM\OPK\node_modules\mssql\lib\msnodesqlv8.js:174:17)
        at Immediate.<anonymous> (d:\OEM\OPK\node_modules\msnodesqlv8\lib\ConnectionWrapper.js:336:11)
        at runCallback (timers.js:672:20)
        at tryOnImmediate (timers.js:645:5)
        at processImmediate [as _immediateCallback] (timers.js:617:5)
      code: -2146893044,
      originalError: 
       { Error: [Microsoft][SQL Server Native Client 11.0]SQL Server Network Interfaces: The logon attempt failed
       
           at Error (native) sqlstate: 'HY000', code: -2146893044 },
      name: 'ConnectionError' }



    Karun R

    Tuesday, September 12, 2017 6:24 PM

Answers

  • Thanks for the reply. I never got to see the actual reason of this error. The app was working fine after I rebooted my dev machine. 

    Karun R

    • Marked as answer by karun_r Thursday, September 21, 2017 2:59 PM
    Friday, September 15, 2017 4:14 PM

All replies

  • Hi karun_r,

     

    This is an error message returned from SQL Server, could you please get the original error message from SQL Server error log which stores in the C:\Program Files\Microsoft SQL Server\MSSQL**.instancename\MSSQL\Log.

     

    According to your description, you have tested it with SSMS and web application, does them existing on the same machine? Based on the error message -2146893044 (0x8009030c), it is a 'SSPI handshake failed' error. Please refer to this article for troubleshooting: https://blogs.msdn.microsoft.com/docast/2016/02/11/common-sspi-handshake-failed-errors-and-troubleshooting/

     

    Best Regards,

    Teige

     


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Wednesday, September 13, 2017 5:48 AM
  • Thanks for the reply. I never got to see the actual reason of this error. The app was working fine after I rebooted my dev machine. 

    Karun R

    • Marked as answer by karun_r Thursday, September 21, 2017 2:59 PM
    Friday, September 15, 2017 4:14 PM
  • Hi karun_r,

    It's pleasant that you have solved this problem, could you please mark your own reply as Answered?

    Best Regards,

    Teige


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Thursday, September 21, 2017 6:01 AM