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

Unable to Login with azure/login@v1 or azure@login@v2 #442

Closed
JackBruceShell opened this issue May 11, 2024 · 5 comments
Closed

Unable to Login with azure/login@v1 or azure@login@v2 #442

JackBruceShell opened this issue May 11, 2024 · 5 comments
Assignees
Labels
question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@JackBruceShell
Copy link

  • name: Check Az Login
    uses: azure/login@v1
    with:
    creds: ${{secrets.AZURE_CREDENTIALS}}

  • name: Check Az Login
    uses: azure/login@v2
    with:
    creds: ${{secrets.AZURE_CREDENTIALS}}

All CLI logins with a specific Azure Service Principle are failing using the above steps in Github workflow .yml files.

@JackBruceShell
Copy link
Author

Errors being faced:

I am also facing this issue with azure/login@v1 where the error is outputting the below:

Error: Login failed with Error: The process '/home/$username/.local/bin/az' failed with exit code 1. Double check if the 'auth-type' is correct. Refer to https://github.com/Azure/login#readme for more information.

If i change to azure/login@v2, then i get the below error:

Run azure/login@v2
/home/$username/actions-runner/externals/node20/bin/node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by /home/$username/actions-runner/externals/node20/bin/node) /home/$username/actions-runner/externals/node20/bin/node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by /home/$username/actions-runner/externals/node20/bin/node)
/home/$username/actions-runner/externals/node20/bin/node: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by /home/$username/actions-runner/externals/node20/bin/node) /home/$username/actions-runner/externals/node20/bin/node: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by /home/$username/actions-runner/externals/node20/bin/node)
/home/$username/actions-runner/externals/node20/bin/node: /lib64/libc.so.6: version GLIBC_2.28' not found (required by /home/$username/actions-runner/externals/node20/bin/node) /home/$username/actions-runner/externals/node20/bin/node: /lib64/libc.so.6: version GLIBC_2.25' not found (required by /home/$username/actions-runner/externals/node20/bin/node)

@MoChilia MoChilia self-assigned this May 11, 2024
@MoChilia MoChilia added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that and removed need-to-triage Requires investigation labels May 11, 2024
@JackBruceShell
Copy link
Author

Furthermore, running az login with Service Principle inside the Virtual Machine gives the below errors.

az login --service-principal -u "" -p "" --tenant "***
urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips 26 Jan 2017'. See: urllib3/urllib3#2168
Traceback (most recent call last):
File "/home/$username/.local/lib/python3.8/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 664, in execute
raise ex
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job
result = cmd_copy(params)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/commands/init.py", line 334, in call
return self.handler(*args, **kwargs)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/command_modules/profile/custom.py", line 139, in login
subscriptions = profile.login(
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/_profile.py", line 159, in login
identity.login_with_service_principal(username, password, scopes=scopes)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/auth/identity.py", line 189, in login_with_service_principal
cred = ServicePrincipalCredential(sp_auth, **self._msal_app_kwargs)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/auth/msal_authentication.py", line 132, in init
super().init(service_principal_auth.client_id, client_credential=client_credential, **kwargs)
File "/home/$username/.local/lib/python3.8/site-packages/msal/application.py", line 488, in init
import requests # Lazy load
File "/home/$username/.local/lib/python3.8/site-packages/requests/init.py", line 43, in
import urllib3
File "/home/$username/.local/lib/python3.8/site-packages/urllib3/init.py", line 42, in
raise ImportError(
ImportError: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips 26 Jan 2017'. See: https://github.com/urllib3/urllib3/issues
/2168

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/main.py", line 50, in
exit_code = cli_main(az_cli, sys.argv[1:])
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/main.py", line 36, in cli_main
return cli.invoke(args)
File "/home/$username/.local/lib/python3.8/site-packages/knack/cli.py", line 245, in invoke
exit_code = self.exception_handler(ex)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/init.py", line 127, in exception_handler
return handle_exception(ex)
File "/home/$username/.local/lib/python3.8/site-packages/azure/cli/core/util.py", line 59, in handle_exception
from msrestazure.azure_exceptions import CloudError
File "/home/$username/.local/lib/python3.8/site-packages/msrestazure/init.py", line 28, in
from .azure_configuration import AzureConfiguration
File "/home/$username/.local/lib/python3.8/site-packages/msrestazure/azure_configuration.py", line 34, in
from msrest import Configuration
File "/home/$username/.local/lib/python3.8/site-packages/msrest/init.py", line 28, in
from .configuration import Configuration
File "/home/$username/.local/lib/python3.8/site-packages/msrest/configuration.py", line 37, in
from .pipeline import Pipeline
File "/home/$username/.local/lib/python3.8/site-packages/msrest/pipeline/init.py", line 52, in
from requests.structures import CaseInsensitiveDict
File "/home/$username/.local/lib/python3.8/site-packages/requests/init.py", line 43, in
import urllib3
File "/home/$username/.local/lib/python3.8/site-packages/urllib3/init.py", line 42, in
raise ImportError(
ImportError: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2k-fips 26 Jan 2017'. See: https://github.com/urllib3/urllib3/issues
/2168

@MoChilia
Copy link
Member

I recommend upgrading the runner image to support Node20 and upgrading the azure-cli version to latest 2.60.0.

@JackBruceShell JackBruceShell changed the title Unbable to Login with azure/login@v1 or azure@login@v2 Unable to Login with azure/login@v1 or azure@login@v2 May 12, 2024
@JackBruceShell
Copy link
Author

Running Azure CLI Login.
/usr/bin/az cloud set -n azurecloud
ERROR: The cloud 'azurecloud' is not registered.

Latest error, something is missing in the registration?

@JackBruceShell
Copy link
Author

Issue resolved by upgrading azure-cli version to the latest.

Version that VM was running on was not working so installed "azure-cli-2.38.1-1.el7"

Thank you @MoChilia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants