While sending request from API to Service bus, error occured "No such host is known" (09b49113)

Sachin Tripathi 21 Reputation points
2021-05-27T08:31:54.627+00:00

Hi Team,

We are using service bus to do some back-end process and it is running properly and processing the requests but all of sudden it threw error "No such host is known".

We are using below code to send message to Service Bus:

Message message = new Message(Encoding.UTF8.GetBytes(data));
QueueClient queueClient = new QueueClient(ServiceBusConnectionString, queueName);
await queueClient.SendAsync(message).ConfigureAwait(false);  

And getting error below at that time:

[ERR] Queue Message handler encountered an exception One or more errors occurred. (No such host is known) (09b49113)

Note: This is a intermittent issue.

Please let me know the root cause of this issue.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2021-05-27T13:16:12.06+00:00

    Hi @Sachin Tripathi

    Welcome to Microsoft Q&A! Thanks for posting the question.

    This is the socket exception when the connection is made from the client application to the service bus. Please make sure that you are using the right connection string.
    If you are using the right connection string (don't remove Endpoint=sb:// or other details) define on your ServiceBusConnectionString object then you need to verify whether the ports are blocked at your client machine. You can follow this troubleshooting guide.

    Endpoint=sb://{yourservicebusnae}.servicebus.windows.net/;SharedAccessKeyName={your access key name(RootManageSharedAccessKey)};SharedAccessKey={your key}

    Hope the above helps. Feel free to get back to me if you need any assistance.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

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.