Error: No credentails found. Add an Azure login script before this action.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- github-actions, sql, typescript
Research direction
Start in bin/main.js by searching for the reported “credentails” message, then trace the sqlcmd failure path from the logged TCP timeout through the AzureCLIAuthorizer check. Reproduce the two back-to-back workflow steps using the supplied YAML and compare the successful and failed logs; done means the resulting error accurately reflects the underlying connection failure.
Written by the indexing model from the issue text.
Description
Using Azure/sql-action@v2.2 to deploy scripts to on-premises SQL Server 2019 using a sql authenticated account. I am not using Azure in any way. I can have a successful deploy of a .sql script one run, and the next run that same script/execution can fail, and keep failing reruns, and then just randomly be successful.
The error is:
Error: No credentails found. Add an Azure login script before this action.
"credentails" is not a spelling error on my end, that is the copy/pasted error from GitHub Actions workflow. In bin/main.js, you can search for "credentails" to see the chunk of code that it is erroring due to something within the code.
I find it strange behavior that with the exact same setup one run will be successful, the next one will fail (and sometimes fail dozens of times in a row), and then randomly will be successful again.
Has anyone else seen this behavior/error message?
- name: Deploy Script A
uses: Azure/sql-action@v2.2
with:
connection-string: "${{ secrets.CONNECTION_STRING }}"
path: './sqlscripts/scriptA.sql'
arguments: -b
- name: Deploy Script B
uses: Azure/sql-action@v2.2
with:
connection-string: "${{ secrets.CONNECTION_STRING }}"
path: './sqlscripts/scriptB.sql'
arguments: -b
I turned debug mode on and captured the output.
Scenario: the GitHub workflow executes 2 scripts with the above code above, back to back. Same connection string and script contents (select 'Testing debug'), just in separate scripts to catch a success and a failure in the same workflow.
The '.' in the failed attempt at the beginning of the line means it's the same as the successful log.
Here are the logs right before the azure/sql-action kicks off:
SUCCESS - deploy scriptA to AdventureWorks database on sql-server1.domain.com:1433
##[debug]isExplicit: 1.0.0
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/go-sqlcmd/1.0.0/x64
##[debug]not found
##[debug]Downloading https://github.com/microsoft/go-sqlcmd/releases/download/v1.0.0/sqlcmd-v1.0.0-linux-x64.tar.bz2
##[debug]Destination /home/gaction/actions-runner/_work/_temp/751ab65d-c2e3-46b2-8d80-4fccce6751ad
##[debug]download complete
##[debug]Checking tar --version
##[debug]tar (GNU tar) 1.34
##[debug]Copyright (C) 2021 Free Software Foundation, Inc.
##[debug]License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.
##[debug]This is free software: you are free to change and redistribute it.
##[debug]There is NO WARRANTY, to the extent permitted by law.
##[debug]
##[debug]Written by John Gilmore and Jay Fenlason.
tar xj -v --warning=no-unknown-keyword --overwrite -C /home/gaction/actions-runner/_work/_temp/c655f6ad-76f2-4fdf-9e30-61e77e092f39 -f /home/gaction/actions-runner/_work/_temp/8a3e0d22-c11d-418c-a2d5-d04a4cbcb575
NOTICE.md
sqlcmd
sqlcmd_debug
##[debug]Caching tool go-sqlcmd 1.0.0 x64
##[debug]source dir: /home/gaction/actions-runner/_work/_temp/c655f6ad-76f2-4fdf-9e30-61e77e092f39
##[debug]destination /opt/hostedtoolcache/go-sqlcmd/1.0.0/x64
##[debug]finished caching tool
##[debug]Get action inputs.
::add-mask::***
::add-mask::***
##[debug]Validating if client has access to 'master' on 'sql-server1.domain.com'.
##[debug]Begin executing sql script
sqlcmd -S sql-server1.domain.com -d AdventureWorks -U *** -i ./sqlscripts/scriptA.sql -b
Output
Testing debug
(1 row affected)
Successfully executed SQL file on target database.
FAIL - deploy scriptB to AdventureWorks database on sql-server1.domain.com:1433
. ##[debug]isExplicit: 1.0.0
. ##[debug]explicit? true
. ##[debug]checking cache: /opt/hostedtoolcache/go-sqlcmd/1.0.0/x64
. ##[debug]not found
. ##[debug]Downloading https://github.com/microsoft/go-sqlcmd/releases/download/v1.0.0/sqlcmd-v1.0.0-linux-x64.tar.bz2
. ##[debug]Destination /home/gaction/actions-runner/_work/_temp/751ab65d-c2e3-46b2-8d80-4fccce6751ad
. ##[debug]download complete
. ##[debug]Checking tar --version
. ##[debug]tar (GNU tar) 1.34
. ##[debug]Copyright (C) 2021 Free Software Foundation, Inc.
. ##[debug]License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.
. ##[debug]This is free software: you are free to change and redistribute it.
. ##[debug]There is NO WARRANTY, to the extent permitted by law.
. ##[debug]
. ##[debug]Written by John Gilmore and Jay Fenlason.
. tar xj -v --warning=no-unknown-keyword --overwrite -C /home/gaction/actions-runner/_work/_temp/45f3bd31-9bf4-4851-8faa-11cd2b3c0bab -f /home/gaction/actions-runner/_work/_temp/751ab65d-c2e3-46b2-8d80-4fccce6751ad
. NOTICE.md
. sqlcmd
. sqlcmd_debug
. ##[debug]Caching tool go-sqlcmd 1.0.0 x64
. ##[debug]source dir: /home/gaction/actions-runner/_work/_temp/45f3bd31-9bf4-4851-8faa-11cd2b3c0bab
. ##[debug]destination /opt/hostedtoolcache/go-sqlcmd/1.0.0/x64
. ##[debug]finished caching tool
. ##[debug]Get action inputs.
. ::add-mask::***
. ::add-mask::***
. ##[debug]Validating if client has access to 'master' on 'sql-server1.domain.com'.
##[debug]The process 'sqlcmd' failed with exit code 1
##[debug]SqlCmd stderr: unable to open tcp connection with host 'sql-server1.domain.com:1433': dial tcp ip.ad.dre.ss:1433: i/o timeout
##[debug]unable to open tcp connection with host 'sql-server1.domain.com:1433': dial tcp ip.ad.dre.ss:1433: i/o timeout
##[debug]
##[debug]try-get AzureCLIAuthorizer
##[debug]{}
Error: No credentails found. Add an Azure login script before this action.
##[debug]Node Action run completed with exit code 1
##[debug]AZURE_HTTP_USER_AGENT='GITHUBACTIONS_AzureSqlAction_5a2680ec296d517622edbc0a559bf3fb603c4c653bc14cc5d46f5ffc1f2f4e6e'
##[debug]SQLCMDPASSWORD='***'
##[debug]AZURE_HTTP_USER_AGENT=''
##[debug]Finishing: Deploy to Target
@jongilmorejr - tagging because your name is in the debug logs :)
- Dominant language
- TypeScript
- Stars
- 142
- Forks
- 73
- Avg merge
- 9d 18h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/sql-action
-
need-to-triage
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Azure/sql-action#247 ·
-
need-to-triage
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Azure/sql-action#282 ·
-
bug
Azure/sql-action#267 · 1 assignee ·
-
need-to-triage
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Azure/sql-action#262 · 1 comment ·
-
need-to-triage
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Azure/sql-action#261 ·
All issues in Azure/sql-action
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linagora/twake-calendar-frontend#1377 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
EclipseFdn/open-vsx.org#13385 · 1 comment ·
-
front-end UI/UX
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
S: triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100