Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1802627: deprecated region property in connection config must still be specified. #960

Closed
AubieDawg92 opened this issue Nov 13, 2024 · 1 comment
Assignees
Labels
invalid This doesn't seem right status-triage_done Initial triage done, will be further handled by the driver team

Comments

@AubieDawg92
Copy link

If you need urgent assistance then file a case with Snowflake Support.
Otherwise continue here.

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of NodeJS driver are you using?
    1.15.0

  2. What operating system and processor architecture are you using?
    windows

  3. What version of NodeJS are you using?
    (node --version and npm --version)
    16.20.2
    8.19.4

  4. What are the component versions in the environment (npm list)?
    +-- @types/[email protected]
    +-- @types/[email protected]
    +-- @types/[email protected]
    +-- @types/[email protected]
    +-- @types/[email protected]
    +-- [email protected]
    +-- [email protected]
    +-- [email protected]
    +-- [email protected]
    +-- [email protected]
    +-- [email protected]
    `-- [email protected]

  5. What did you do?

    If possible, provide a recipe for reproducing the error.
    A complete runnable program would be the most helpful.

    I configured a connection as such:
    let connection = snowflake.createConnection({
    account: "{my_snowflake_account}",
    host: "{account}.{aws_region}.snowflakecomputing.com",
    warehouse: "{warehouse_name",
    role: "{role}",
    username: userName,
    password: password,
    authenticator:
    "{okta_authenticator_url}",
    database: "{database}",
    schema: "{schema}",
    });

  6. What did you expect to see?

    What should have happened and what happened instead?

    I should have made a connection to snowflake

  7. Can you collect debug logs?

I did collect logs. The relevant error was:

{"level":"INFO","message":"[9:38:42.241 AM]: Connection[id: 9fcb8b52-0525-4fc0-82f5-ebfe4e8bc1cf] - failed to connect async after 939.9255000054836 milliseconds.Failed during authentication. Error: AxiosError: Request failed with status code 404\n at settle (C:\src\PipelineTasks\node_modules\axios\dist\node\axios.cjs:2019:12)\n at IncomingMessage.handleStreamEnd (C:\src\PipelineTasks\node_modules\axios\dist\node\axios.cjs:3135:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358"}
{"level":"ERROR","message":"[9:38:42.242 AM]: Connection[id: 9fcb8b52-0525-4fc0-82f5-ebfe4e8bc1cf] - failed during authentication. Error: AxiosError: Request failed with status code 404\n at settle (C:\src\PipelineTasks\node_modules\axios\dist\node\axios.cjs:2019:12)\n at IncomingMessage.handleStreamEnd (C:\src\PipelineTasks\node_modules\axios\dist\node\axios.cjs:3135:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/"}

After additional debugging, I was able to determine that the endpoint that axios was trying to connect to was the host string with the region removed. Once I specified the region property (deprecated) on the connection config then it worked.

⚠️ Before sharing any data, please be sure to review the log and remove any sensitive
information.

@AubieDawg92 AubieDawg92 added the bug Something isn't working label Nov 13, 2024
@github-actions github-actions bot changed the title deprecated region property in connection config must still be specified. SNOW-1802627: deprecated region property in connection config must still be specified. Nov 13, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Nov 14, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added invalid This doesn't seem right status-triage_done Initial triage done, will be further handled by the driver team and removed bug Something isn't working labels Nov 14, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

hello - i'm able to connect with

const connection = snowflake.createConnection({
    validateDefaultParameters: true,
    account: process.env.SFLOCATOR,
    host: process.env.SFLOCATOR + '.eu-central-1.snowflakecomputing.com',
    username: process.env.SFUSER,
    password: process.env.SFPASS,
    application: __filename.slice(__dirname.length + 1)
});

for an account in AWS EU Frankfurt, where SFLOCATOR is xy12345 , the account locator name.
So no bug here, but looks like a misconfiguration of the account name.

Recommendation is to either use the regionless notation ORGNAME-ACCOUNTNAME for account, or the older, locator version accountlocator.yourregion (where region is needed, and sometimes cloud notation is also needed, see https://docs.snowflake.com/en/user-guide/admin-account-identifier)

host is not necessary if you have account properly populated, see https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver-connect#creating-a-single-connection

Since this works as expected and per documentation, I'm marking it as closed but if you have evidence (logs) of an actual error which doesn't happen due to a misconfiguration, please do share and I can reopen and look further.

@sfc-gh-dszmolka sfc-gh-dszmolka closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants