Getting Authorization:REDACTED error when running azure functions (Java) locally

Praveen Ramachandran 60 Reputation points
2023-01-22T02:13:11.0166667+00:00

Dear people,

I recently switched to a different azure subscription & encountering this issue which never happened before. Can you please help ?

This function listens to a service bus namespace queue in azure & process the messages

[2023-01-22T02:04:37.183Z] x-ms-version:2021-08-06

[2023-01-22T02:04:37.183Z] Accept:application/xml

[2023-01-22T02:04:37.183Z] x-ms-client-request-id:1a7eddc1-4371-48b3-b737-c195374cae87

[2023-01-22T02:04:37.183Z] x-ms-return-client-request-id:true

[2023-01-22T02:04:37.183Z] User-Agent:azsdk-net-Storage.Blobs/12.13.0,(.NET 6.0.10; Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000)

[2023-01-22T02:04:37.183Z] x-ms-date:Sun, 22 Jan 2023 02:04:37 GMT

[2023-01-22T02:04:37.183Z] Authorization:REDACTED

[2023-01-22T02:04:37.183Z] client assembly: Azure.Storage.Blobs

[2023-01-22T02:04:37.194Z] Request [1a7eddc1-4371-48b3-b737-c195374cae87] exception Azure.RequestFailedException: Connection refused (127.0.0.1:10000)

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2023-01-25T06:08:07.1633333+00:00

    @Praveen Ramachandran Thanks for reaching out. It looks like the connection to 127.0.0.1:10000 couldn't be established. Your function app is using local storage running on this port and the service may not be running on this port.

    Can you make sure that have installed the storage emulator and the service is running correctly on your local machine.

    By default, the storage emulator services should be running on the port below as mentioned here.

    You can also use the below command to verify which service is using port 10001. Similarly, you can verify for other ports 10001 and 10002.

    netstat -p tcp -ano | findstr :10001

    In case if the port is blocked or used by any other service and in case it is used by some other system process, and you are not able to kill the system process. The alternative would be specifying the below connection in your local.settings.json for every function that you will be running locally. You can modify the ports as per your need i.e. the ports where your storage service is running. The same is documented here on how you can use the other value instead of UseDevelopmentStorage=true

    and specify the same port that you have configured on the Azure storage emulator (in below I have used 20000, 20001 and 20002 port)

    "AzureWebJobsStorage": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:20000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:20001/devstoreaccount1;TableEndpoint=http://127.0.0.1:20002/devstoreaccount1;",    
    

    Please navigate to the C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator directory (i.e the directory where your emulator is installed) and open the AzureStorageEmulator.exe.config file and update the ports to the default port as the function try to find the storage emulator services in the default IP and port.

     <services>  
          <service name="Blob" url="http://127.0.0.1:20000/"/>  
          <service name="Queue" url="http://127.0.0.1:20001/"/>  
          <service name="Table" url="http://127.0.0.1:20002/"/>  
     </services>  
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.