darkalfx / requestrr

Requestrr is a chatbot used to simplify using services like Sonarr/Radarr/Ombi via the use of chat. Current platform is Discord only, but the bot was built around the ideology of quick adaptation for new features as well as new platforms.
MIT License
876 stars 102 forks source link

Cant access UI when running with macvlan network and non root user #24

Open arpitgupta opened 4 years ago

arpitgupta commented 4 years ago

I am trying to launch this container so that it gets a ip different from the docker host as i need to be able to route traffic via vpn based on ip's. Using macvlan network for this and when i launch the network logs show bot comes up but when i try to access the UI it shows the following in the logs

arn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
      Bot has been restarted.
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
      Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      An unhandled exception has occurred while executing the request.
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[3]
      An exception was thrown attempting to execute the error handler.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HLV9LDHRUGTE", Request id "0HLV9LDHRUGTE:00000001": An unhandled exception was thrown by the application.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
      Bot configuration changed/not connected to Discord: restarting bot

The same container works fine if bought up as root user. So may be my earlier fix was really a bandaid and more fixes need be made?

darkalfx commented 4 years ago

So everything works with your macvlan if you use root?

arpitgupta commented 4 years ago

Yup so far so good. Note i do have other containers using macvlan and running non root without any issues.

Also was thinking may be changing the container umask would have been a better fix than just changing permissions of /root or may be move to some other subfolder for the install.

Not sure if this error is related to any of those though.