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

DeviceNotFoundException from ServiceProxy #2

Open
base-jumper opened this issue Apr 4, 2023 · 2 comments
Open

DeviceNotFoundException from ServiceProxy #2

base-jumper opened this issue Apr 4, 2023 · 2 comments
Assignees

Comments

@base-jumper
Copy link

base-jumper commented Apr 4, 2023

I get the following error from the ServiceProxy when trying to open an SSH connection. I am running the DeviceProxy and I have confirmed in the Azure portal that the device is reported as 'online' when the proxy is running.

info: ServiceProxy[0]
      Waiting for TCP clients...
info: ServiceProxy[0]
      Accepted TCP client using endpoint '127.0.0.1:2222'.
fail: ServiceProxy[0]
      An error occured during streaming session.
Microsoft.Azure.Devices.Common.Exceptions.DeviceNotFoundException: {"Message":"{\"errorCode\":404103,\"message\":\"The operation failed because the requested device isn't online or hasn't registered the direct method callback. To learn more, see https://aka.ms/iothub404103\",\"trackingId\":\"91317EB1EDB7441FAC14F1A5B951DB18-G2:-TimeStamp:2023-04-04T08:52:34.476950757+00:00\",\"timestampUtc\":\"2023-04-04T08:52:34.476950757+00:00\",\"info\":null}","ExceptionMessage":""}
   at Microsoft.Azure.Devices.HttpClientHelper.ExecuteAsync(HttpClient httpClient, HttpMethod httpMethod, Uri requestUri, Func`3 modifyRequestMessageAsync, Func`2 isMappedToException, Func`3 processResponseMessageAsync, IDictionary`2 errorMappingOverrides, CancellationToken cancellationToken)
   at Microsoft.Azure.Devices.HttpClientHelper.ExecuteWithCustomOperationTimeoutAsync(HttpMethod httpMethod, Uri requestUri, TimeSpan operationTimeout, Func`3 modifyRequestMessageAsync, Func`2 isMappedToException, Func`3 processResponseMessageAsync, IDictionary`2 errorMappingOverrides, CancellationToken cancellationToken)
   at Microsoft.Azure.Devices.HttpClientHelper.PostAsync[T,T2](Uri requestUri, T entity, TimeSpan operationTimeout, IDictionary`2 errorMappingOverrides, IDictionary`2 customHeaders, CancellationToken cancellationToken)
   at Microsoft.Azure.Devices.AmqpServiceClient.CreateStreamAsync(Uri uri, DeviceStreamRequest deviceStreamRequest, CancellationToken cancellationToken)
   at IoTHubDeviceStreamSample.ServiceProxy.DeviceStream.HandleIncomingConnectionsAndCreateStreams(String deviceId, ServiceClient serviceClient, TcpClient tcpClient, CancellationTokenSource cancellationTokenSource) in C:\git\devicestreams-dev\src\ServiceProxy\DeviceStream.cs:line 57

I'm running .NET7.0.

@fzankl
Copy link
Owner

fzankl commented Apr 7, 2023

To narrow down the problem, I need some information.
Can you please state in which region you are using the Iot Hub itself?

@fzankl fzankl self-assigned this Apr 7, 2023
@base-jumper
Copy link
Author

The Iothub instance is running in south east Asia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants