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

Impossible to access on the admin console by https://<my-website>/admin #5061

Open
1 task done
pigi-spm opened this issue Nov 23, 2024 · 0 comments
Open
1 task done
Labels

Comments

@pigi-spm
Copy link

Steps To Reproduce

Hi,
I try to access on my selfhosted bitwarden admin console without success :(.
Here I replicate the steps of the problem.

  1. I type into the address bar the link https://my-website/admin and I can access on the admin login page (with the redirect link https://my-website/admin/login?returnUrl=%2Fadmin)
  2. In the box 'Please enter your email address below to log in.' I enter my email, that it have the grand to access on the console.
    After the click on the botton 'Continue', time to wait a couple of seconds to receive the error messagge 404 NOT FOUND

Bitwarden-404NotFound

On the admin's container I can see a error on the trace log:

fail: Bit.Core.Utilities.LoggingExceptionHandlerFilterAttribute[0]
      => SpanId:77d1177e2881d9ea, TraceId:441af7dea7aca3eb8994153a82dcd504, ParentId:0000000000000000 => ConnectionId:0HN8BTH87SSK5 => RequestPath:/admin/login RequestId:0HN8BTH87SSK5:00000001 => Bit.Admin.Auth.Controllers.LoginController.Index (Admin)
      Resource temporarily unavailable
      System.Net.Sockets.SocketException (00000001, 11): Resource temporarily unavailable
         at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, Nullable`1 startingTimestamp)
         at System.Net.Dns.<>c.<GetHostEntryOrAddressesCoreAsync>b__33_0(Object s, Int64 startingTimestamp)
         at System.Net.Dns.<>c__DisplayClass39_0`1.<RunAsync>b__0(Task <p0>, Object <p1>)
         at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
         at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
      --- End of stack trace from previous location ---
         at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
      --- End of stack trace from previous location ---
         at MailKit.Net.SocketUtils.ConnectAsync(String host, Int32 port, IPEndPoint localEndPoint, CancellationToken cancellationToken)
         at MailKit.Net.SocketUtils.ConnectAsync(String host, Int32 port, IPEndPoint localEndPoint, Int32 timeout, CancellationToken cancellationToken)
         at MailKit.MailService.ConnectNetworkAsync(String host, Int32 port, CancellationToken cancellationToken)
         at MailKit.Net.Smtp.SmtpClient.ConnectAsync(String host, Int32 port, SecureSocketOptions options, CancellationToken cancellationToken)
         at Bit.Core.Services.MailKitSmtpMailDeliveryService.SendEmailAsync(MailMessage message) in /home/runner/work/server/server/src/Core/Services/Implementations/MailKitSmtpMailDeliveryService.cs:line 86
         at Bit.Core.Services.HandlebarsMailService.SendPasswordlessSignInAsync(String returnUrl, String token, String email) in /home/runner/work/server/server/src/Core/Services/Implementations/HandlebarsMailService.cs:line 308
         at Bit.Admin.Auth.IdentityServer.PasswordlessSignInManager`1.PasswordlessSignInAsync(String email, String returnUrl) in /home/runner/work/server/server/src/Admin/Auth/IdentityServer/PasswordlessSignInManager.cs:line 37
         at Bit.Admin.Auth.Controllers.LoginController.Index(LoginModel model) in /home/runner/work/server/server/src/Admin/Auth/Controllers/LoginController.cs:line 40
         at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
         at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      => SpanId:77d1177e2881d9ea, TraceId:441af7dea7aca3eb8994153a82dcd504, ParentId:0000000000000000 => ConnectionId:0HN8BTH87SSK5 => RequestPath:/admin/login RequestId:0HN8BTH87SSK5:00000001
      An unhandled exception has occurred while executing the request.
      System.Net.Sockets.SocketException (00000001, 11): Resource temporarily unavailable
         at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, Nullable`1 startingTimestamp)
         at System.Net.Dns.<>c.<GetHostEntryOrAddressesCoreAsync>b__33_0(Object s, Int64 startingTimestamp)

(the word 'Resource temporarily unavailable already' appears when I access to https://my-website/admin on a popup).
Looking at the nginx configuration file, that I have, in the location section I point to the correct container.

 location /admin {
    proxy_pass http://admin:5000;
    include /etc/nginx/security-headers-ssl.conf;
    include /etc/nginx/security-headers.conf;
    add_header X-Frame-Options SAMEORIGIN;
  }

I do not understand why I cannot access the admin console whether a configuration problem or an internal server problem.

Expected Result

being able to access the admin console

Actual Result

after entering the login email I get 404 NOT FOUND

Screenshots or Videos

No response

Additional Context

No response

Build Version

2024.11.0

Environment

Self-Hosted

Environment Details

  • Operating system: Synology DSM 7.2.2-72806 Update 1
  • Enviroment: Docker

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@pigi-spm pigi-spm added the bug label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant