azureazure-clinetflix-eurekaazure-spring-cloud

"az spring eureka-server" CLI command returns always "not found"


I'm testing Azure Spring Apps on Standard tier and deployed a container image on the cluster.

But I'm not able to get info about the managed Eureka service provided by Azure Spring Apps.

The following commands are failing with no clue of the issue:

az spring eureka-server show -n MyCluster -g MyResourceGroup
az spring eureka-server enable -n MyCluster -g MyResourceGroup
az spring eureka-server disable -n MyCluster -g MyResourceGroup

All of them are returning Operation returned an invalid status 'Not Found'.

By using --debug on the commands more details are shown (the requests to Azure APIs):

azure.core.exceptions.ResourceNotFoundError: Operation returned an invalid status 'Not Found'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/glauber/.azure/cliextensions/spring/azext_spring/_utils.py", line 314, in handle_asc_exception
    raise CLIError(ex.inner_exception.error.message)
AttributeError: 'NoneType' object has no attribute 'error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/home/glauber/.azure/cliextensions/spring/azext_spring/_utils.py", line 320, in handle_asc_exception
    raise CLIError(ex)
knack.util.CLIError: Operation returned an invalid status 'Not Found'

cli.azure.cli.core.azclierror: Operation returned an invalid status 'Not Found'
az_command_data_logger: Operation returned an invalid status 'Not Found'

Is it possible that the Eureka service was not created as part of the deployment?

By running those commands in another resource groups's instance, it works.


Solution

  • According to this MSDoc & said by @VenkateshDodda, it is clearly mentioned that the az spring eureka-server CLI command only support Standard consumption Tier spring app instances. As a result, when you try to get the details for the Standard plan app instance, it always returns a "resource not found" error.

    Use the az --version command to see if your AzCLI version is 2.45 or higher.

    enter image description here

    After checking my CLI version as shown above, I've created an Azure Spring apps hosting in a Standard Consumption plan and tried retrieving the related information. It was successful as shown below.

    enter image description here

    az spring eureka-server show -n "spjrng" -g "xxxxx"
    

    enter image description here