Skip to content

Fail to connect using an all-purpose cluster when it's running #87

Closed

Description

@minh2uang

Hi folks,
I'm having trouble connecting to a terminated all-purpose cluster. If the cluster is not running, it will fail.
Appreciate any help!
Cheers,
Quang

My code

      const client = await dbsqlClient.connect({
        host: process.env["DB_HOST"],
        path: process.env["DB_PATH"],
        token: process.env["DB_TOKEN"],
      });

Error Message

[error] Worker 98804825-b3c9-4902-bf7b-9e39aa2a1dae uncaught exception (learn more: https://go.microsoft.com/fwlink/?linkid=2097909 ): TypeError: Converting circular structure to JSON --> starting at object with constructor 'TLSSocket' | property 'parser' -> object with constructor 'HTTPParser' --- property 'socket' closes the circle at JSON.stringify (<anonymous>) at exports.HttpConnection.<anonymous> (C:\Users\mmqqq\Workspace\SmarterKnowledge\websites\api\node_modules\@databricks\sql\dist\DBSQLClient.js:92:69) at exports.HttpConnection.emit (node:events:390:28) at exports.HttpConnection.responseCallback (C:\Users\mmqqq\Workspace\SmarterKnowledge\websites\api\node_modules\thrift\lib\nodejs\lib\thrift\http_connection.js:173:12) at ClientRequest.connection.responseCallback (C:\Users\mmqqq\Workspace\SmarterKnowledge\websites\api\node_modules\@databricks\sql\dist\connection\connections\HttpConnection.js:67:30) at Object.onceWrapper (node:events:510:26) at ClientRequest.emit (node:events:390:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:623:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) at TLSSocket.socketOnData (node:_http_client:487:22) [2022-11-04T03:03:20.959Z] Waiting for the debugger to disconnect... [2022-11-04T03:03:21.122Z] Executed 'Functions.GetGeoJson' (Failed, Id=296d02dd-006a-473f-8019-b1743fd24641, Duration=1057ms) [2022-11-04T03:03:21.123Z] System.Private.CoreLib: Exception while executing function: Functions.GetGeoJson. System.Private.CoreLib: node exited with code 1 LanguageWorkerConsoleLog[error] Worker 98804825-b3c9-4902-bf7b-9e39aa2a1dae uncaught exception (learn more: https://go.microsoft.com/fwlink/?linkid=2097909 ): TypeError: Converting circular structure to JSON --> starting at object with constructor 'TLSSocket' | property 'parser' -> object with constructor 'HTTPParser' --- property 'socket' closes the circle at JSON.stringify (<anonymous>) at exports.HttpConnection.<anonymous> (C:\Users\mmqqq\Workspace\SmarterKnowledge\websites\api\node_modules\@databricks\sql\dist\DBSQLClient.js:92:69) at exports.HttpConnection.emit (node:events:390:28) at exports.HttpConnection.responseCallback (C:\Users\mmqqq\Workspace\SmarterKnowledge\websites\api\node_modules\thrift\lib\nodejs\lib\thrift\http_connection.js:173:12) at ClientRequest.connection.responseCallback (C:\Users\mmqqq\Workspace\SmarterKnowledge\websites\api\node_modules\@databricks\sql\dist\connection\connections\HttpConnection.js:67:30) at Object.onceWrapper (node:events:510:26) at ClientRequest.emit (node:events:390:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:623:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) at TLSSocket.socketOnData (node:_http_client:487:22).

Activity

  1. kravets-levko commented on Nov 4, 2022

    @kravets-levko
    Contributor

    Hi @minh2uang! It turns out that you see an error that happened in logger while trying to log the original connection error. If possible, could you apply changes from #89 and share the actual error here? Thank you, and sorry for inconvenience

  2. adobayua-rpay commented on Jan 13, 2023

    @adobayua-rpay

    Hi @minh2uang! It turns out that you see an error that happened in logger while trying to log the original connection error. If possible, could you apply changes from #89 and share the actual error here? Thank you, and sorry for inconvenience

    Hi Kravets, how do we apply the changes from #89 ? Thanks!

  3. kravets-levko commented on Nov 23, 2023

    @kravets-levko
    Contributor

    @minh2uang and @adobayua-rpay have you tried recent versions of the library? Do you still have this issue there, or maybe some updates? Please let me know if there's anything I can help with. Thanks!

  4. kravets-levko commented on Jan 18, 2024

    @kravets-levko
    Contributor

    I'm closing this issue as it should be fixed now. Please feel free to re-open if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions