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

edge hub does not start (same as issue #705) #2592

Closed
thisistayo opened this issue Feb 26, 2020 · 7 comments
Closed

edge hub does not start (same as issue #705) #2592

thisistayo opened this issue Feb 26, 2020 · 7 comments

Comments

@thisistayo
Copy link

neral summary of the issue in the Title above
-->

Expected Behavior

Deploying iotedge on windows 10. Edge Hub starts.

Current Behavior

Edge Hub fails to start

Steps to Reproduce

Provide a detailed set of steps to reproduce the bug.

  1. install windows 10 on a dual NIC machine.
  2. deploy an iotedge as exactly as described in the quickstart documentation
  3. send a deployment manifest to edge
  4. watch as edge hub fails to start

Context (Environment)

windows 10, iotedge installed using the aka.ms script as per quickstart documentation)

Output of iotedge check

``` PS C:\WINDOWS\system32> iotedge check --verbose Configuration checks -------------------- √ config.yaml is well-formed - OK √ config.yaml has well-formed connection string - OK √ container engine is installed and functional - OK √ Windows host version is supported - OK ‼ config.yaml has correct hostname - Warning config.yaml has hostname SEFAGD1274 which does not comply with RFC 1035.
- Hostname must be between 1 and 255 octets inclusive.
- Each label in the hostname (component separated by ".") must be between 1 and 63 octets inclusive.
- Each label must start with an ASCII alphabet character (a-z), end with an ASCII alphanumeric character (a-z, 0-9), and must contain only ASCII alphanumeric characters or hyphens (a-z, 0-9, "-").

Not complying with RFC 1035 may cause errors during the TLS handshake with modules and downstream devices.

√ config.yaml has correct URIs for daemon mgmt endpoint - OK
√ latest security daemon - OK
√ host time is close to real time - OK
√ container time is close to host time - OK
‼ DNS server - Warning
Container engine is not configured with DNS server setting, which may impact connectivity to IoT Hub.
Please see https://aka.ms/iotedge-prod-checklist-dns for best practices.
You can ignore this warning if you are setting DNS server per module in the Edge deployment.
caused by: Could not open container engine config file C:\ProgramData\iotedge-moby\config\daemon.json
caused by: The system cannot find the path specified. (os error 3)
‼ production readiness: certificates - Warning
Device is using self-signed, automatically generated certs.
Please see https://aka.ms/iotedge-prod-checklist-certs for best practices.
√ production readiness: certificates expiry - OK
√ production readiness: container engine - OK
‼ production readiness: logs policy - Warning
Container engine is not configured to rotate module logs which may cause it run out of disk space.
Please see https://aka.ms/iotedge-prod-checklist-logs for best practices.
You can ignore this warning if you are setting log policy per module in the Edge deployment.
caused by: Could not open container engine config file C:\ProgramData\iotedge-moby\config\daemon.json
caused by: The system cannot find the path specified. (os error 3)

Connectivity checks

√ host can connect to and perform TLS handshake with IoT Hub AMQP port - OK
√ host can connect to and perform TLS handshake with IoT Hub HTTPS / WebSockets port - OK
√ host can connect to and perform TLS handshake with IoT Hub MQTT port - OK
√ container on the IoT Edge module network can connect to IoT Hub AMQP port - OK
√ container on the IoT Edge module network can connect to IoT Hub HTTPS / WebSockets port - OK
√ container on the IoT Edge module network can connect to IoT Hub MQTT port - OK
× Edge Hub can bind to ports on host - Error
Could not check if port 5671 is available for Edge Hub to bind to
caused by: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)

16 check(s) succeeded.
4 check(s) raised warnings.
1 check(s) raised errors.

</details>

### Device Information
* Host OS [e.g. Ubuntu 16.04, Ubuntu 18.04, Windows IoT Core]: 
* Architecture [e.g. amd64, arm32, arm64]: 
* Container OS [e.g. Linux containers, Windows containers]: 

### Runtime Versions
everything installed as per quickstart script
iotedge 1.0.8 (208b2204fd30e856d00b280112422130c104b9f0)

Note: when using Windows containers on Windows, run `docker -H npipe:////./pipe/iotedge_moby_engine version` instead

## Logs
<!--
Please share as many logs as possible. This will help debugging
Follow [diagnostic steps](https://docs.microsoft.com/en-us/azure/iot-edge/troubleshoot#standard-diagnostic-steps) to help extract useful information.
Don't forget to remove any connection string information!
-->

</details>

<details>
<summary>edge-agent logs</summary>

<6> 2020-02-26 14:30:57.794 +01:00 [INF] - Executing command: "Start module edgeHub"
<3> 2020-02-26 14:31:15.508 +01:00 [ERR] - Executing command for operation ["start"] failed.
Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling start module edgeHub: Could not start module edgeHub
caused by: Could not start module edgeHub
caused by: failed to create endpoint edgeHub on network nat: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20), StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2019_01_30.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in C:\agent_work\7\s\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Edgelet\version_2019_01_30\ModuleManagementHttpClient.cs:line 194
at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Versioning.ModuleManagementHttpClientVersioned.Execute[T](Func`1 func, String operation) in C:\agent_work\7\s\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Edgelet\versioning\ModuleManagementHttpClientVersioned.cs:line 124
at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2019_01_30.ModuleManagementHttpClient.StartModuleAsync(String name) in C:\agent_work\7\s\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Edgelet\version_2019_01_30\ModuleManagementHttpClient.cs:line 149
at Microsoft.Azure.Devices.Edge.Agent.Core.LoggingCommandFactory.LoggingCommand.ExecuteAsync(CancellationToken token) in C:\agent_work\7\s\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Core\LoggingCommandFactory.cs:line 60

</details>

<details>
<summary>edge-hub logs</summary>

no logs as teh module does not start

</details>

## Additional Information
Please provide any additional information that may be helpful in understanding the issue.
@veyalla
Copy link
Contributor

veyalla commented Feb 26, 2020

Thanks for the issue, do things work correctly if you disable or remove one of two NICs?

@thisistayo
Copy link
Author

We have disabled one NIC and the problem persists.

@lfitchett
Copy link
Contributor

Is this a production box or dev box?
Are you running docker desktop alongside moby?

@thisistayo
Copy link
Author

@lfitchett
It is a brand new box with a clean installation of windows 10 using the version that supports edge. On top of windows we install edge using the powershell script provided. Then kepware. No docker installed.
PS I am not sure what is the diff between a Dev box or a production box.

@lfitchett
Copy link
Contributor

Ok, please open a support ticket as more extensive debugging is required.

(difference between dev box and production is dev box might have a bunch of other stuff like sdks and compilers. sometimes people will have both moby and docker desktop in dev environments)

@veyalla
Copy link
Contributor

veyalla commented Mar 9, 2020

@qusp66 Can you check if any other program is using ports 8883, 5671 or 443 on the device. The edge hub tries to bind to these ports by default and if that can't, this is the error you'll see on Windows.

@veyalla
Copy link
Contributor

veyalla commented Apr 2, 2020

Likely same issue as #2752.

Closing, please re-open if you still need assistance..

@veyalla veyalla closed this as completed Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants