iotedge: edgeHub container fails to start, probably due to user permissions (listen on port 443 with unprivileged user)
I am trying to setup GA on redhat 7. One of the errors I have found is that the edgeHub Docker container is unable to start. After some troubleshooting and after checking that the iotedged daemon was reachable through http I created a custom Docker image with user “root” and it worked so I suspect it is due to the edgeHub is unable to listen in that port and it fails. This is the error I am getting:
[2018-07-17 07:23:34 : Starting Edge Hub
[07/17/2018 07:23:34.254 AM] Edge Hub Main()
FailFast:
Exception thrown from SocketAsyncEngine event loop: System.TypeInitializationException: The type initializer for ‘OperationQueue1' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Threading.ThreadPool, Version=4.1.1.0, Culture=neutral, PublicKeyToken=*********'. Access is denied. at System.Net.Sockets.SocketAsyncContext.OperationQueue
1…cctor()
— End of inner exception stack trace —
at System.Net.Sockets.SocketAsyncContext.OperationQueue1.HandleEvent(SocketAsyncContext context) at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events) at System.Net.Sockets.SocketAsyncEngine.EventLoop() at System.Environment.FailFast(System.String, System.Exception) at System.Environment.FailFast(System.String, System.Exception) at System.Net.Sockets.SocketAsyncEngine.EventLoop() at System.Net.Sockets.SocketAsyncEngine+<>c.<.ctor>b__24_0(System.Object) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) Exception details: System.TypeInitializationException: The type initializer for 'OperationQueue
1’ threw an exception. —> System.IO.FileLoadException: Could not load file or assembly ‘System.Threading.ThreadPool, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. Access is denied.
at System.Net.Sockets.SocketAsyncContext.OperationQueue1..cctor() --- End of inner exception stack trace --- at System.Net.Sockets.SocketAsyncContext.OperationQueue
1.HandleEvent(SocketAsyncContext context)
at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events)
at System.Net.Sockets.SocketAsyncEngine.EventLoop()
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (6 by maintainers)
Hi, have you tried it after rebooting it?
Our host is RHEL 7.5 and it works after a fresh install however it fails after reboot due to two things:
We use unix sockets directly in iotedge configuration. That may change in your case.
Setting User as root in the deployment does not work so you need a new image. It does not make sense for me being able to change a subset not documented of Docker options and not others. This is my workaround: