Originally created by @blacknet76 on GitHub (Aug 17, 2019).
Hi all,
I have a problem to get it to work. I can register a new user but I can't login with it. I got always this error "An error has occurred. An unexpected error occurred." (Is translatet from German output). I can't see also a entry in the bitwareden.log file.
I checked the MySQL DB and the new user is added.
I hope anyone can help and I forgot a stupid setting in my docker-compose file.
Originally created by @blacknet76 on GitHub (Aug 17, 2019).
Hi all,
I have a problem to get it to work. I can register a new user but I can't login with it. I got always this error "An error has occurred. An unexpected error occurred." (Is translatet from German output). I can't see also a entry in the bitwareden.log file.
I checked the MySQL DB and the new user is added.
I hope anyone can help and I forgot a stupid setting in my docker-compose file.
Here are my docker-compose.yml
```version: "3.6"
networks:
internal:
external: false
default:
driver: bridge
services:
mysql:
container_name: mysql
image: mysql:5.7
ports:
- 3306:3306
networks:
- internal
- default
environment:
- MYSQL_ROOT_PASSWORD=totalsecure
- MYSQL_DATABASE=bitwarden
- MYSQL_USER=bitwarden
- MYSQL_PASSWORD=bitwarden
bitwarden:
container_name: bitwarden
image: bitwardenrs/server:latest
restart: always
depends_on:
- mysql
networks:
- internal
- default
ports:
- 80:80
- 433:433
volumes:
- ${USERDIR}/.config/bw-data:/data
environment:
WEBSOCKET_ENABLED: "true" # Required to use websockets
SIGNUPS_ALLOWED: "true" # set to false to disable signups
SMTP_HOST: "smtp.gamil.com"
SMTP_FROM: "xxxxxxx@gmail.com"
SMTP_PORT: "465"
SMTP_SSL: "true"
SMTP_USERNAME: "xxxxxx@gamil.com"
SMTP_PASSWORD: "xxxxxxx"
LOG_FILE: "/data/bitwarden.log"
RUST_BACKTRACE: 1
DATABASE_URL: "mysql://bitwarden:bitwarden@mysql/bitwarden"
ADMIN_TOKEN: "totalsecureto"
ENABLE_DB_WAL: "false"
```
If there aren't any errors in the logfile, can you check the web browsers console? Or maybe the network requests tab?
@dani-garcia commented on GitHub (Aug 18, 2019):
If there aren't any errors in the logfile, can you check the web browsers console? Or maybe the network requests tab?
@blacknet76 commented on GitHub (Aug 30, 2019):
@mprasil in my local test environment no, but I configure it on my production server and here I use traefik with the following labels
```
labels:
- "traefik.enable=true"
- "traefik.backend=xxxxx"
- "traefik.frontend.rule=Host:xxxx.${DOMAINNAME}"
- "traefik.protocol=http"
- "traefik.port=80"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
```
You might want to remove WEBSOCKET_ENABLED: "true". The websocket connection won't work without appropriately configured proxy and client will fail trying to access it. When that happens clients tend to misbehave in weird ways, this is why it's disabled by default. So as a first step to troubleshoot it, try to run the server without and see if you can log in.
@mprasil commented on GitHub (Aug 30, 2019):
You might want to remove `WEBSOCKET_ENABLED: "true"`. The websocket connection won't work without appropriately configured proxy and client will fail trying to access it. When that happens clients tend to misbehave in weird ways, this is why it's disabled by default. So as a first step to troubleshoot it, try to run the server without and see if you can log in.
Also to minimize the possible failure scenarios, can you try without DATABASE_URL? This will use local sqlite DB that will be gone once you restart the container, but that's good enough for test.
Also remove ENABLE_DB_WAL variable. It has no effect with MySQL and with sqlite the default is usually better option.
@mprasil commented on GitHub (Aug 30, 2019):
Also to minimize the possible failure scenarios, can you try without `DATABASE_URL`? This will use local sqlite DB that will be gone once you restart the container, but that's good enough for test.
Also remove `ENABLE_DB_WAL` variable. It has no effect with MySQL and with sqlite the default is usually better option.
Same error as before, here now my config from docker.
I have also deactivate RUST_BACKTRACE but with the same result.
I have tesed with a windows 10, Linux and with my mobile phone with LTE to make sure that it is not a problem on my computer and/or network.
Are certain packages needed on the host machine?
[2019-08-30 12:56:00][rocket::rocket][INFO] POST /api/accounts/prelogin application/json; charset=utf-8:
[2019-08-30 12:56:00][_][INFO] Matched: POST /api/accounts/prelogin (prelogin)
[2019-08-30 12:56:00][_][INFO] Outcome: Success
[2019-08-30 12:56:00][_][INFO] Response succeeded.
[2019-08-30 12:56:00][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-08-30 12:56:00][_][INFO] Matched: POST /identity/connect/token (login)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Custom { kind: Other, error: "failed to lookup address information: Name or service not known" })', src/libcore/result.rs:1084:5
And here a screenshot from the ff console Screenshot
@blacknet76 commented on GitHub (Aug 30, 2019):
Same error as before, here now my config from docker.
I have also deactivate RUST_BACKTRACE but with the same result.
I have tesed with a windows 10, Linux and with my mobile phone with LTE to make sure that it is not a problem on my computer and/or network.
Are certain packages needed on the host machine?
```
version: "3.6"
networks:
traefik_proxy:
external:
name: traefik_proxy
internal:
external: false
default:
driver: bridge
bitwardenrs:
container_name: bitwardenrs
image: bitwardenrs/server:latest
# image: bitwardenrs/server-mysql:latest
restart: always
depends_on:
# - mariadb
- traefik
networks:
# - internal
- default
# ports:
# - 80:80
# - 443:443
volumes:
- ${USERDIR}/.config/bwrs-data:/data
environment:
SIGNUPS_ALLOWED: "true" # set to false to disable signups
SMTP_HOST: "smtp.gamil.com"
SMTP_FROM: "xxxxxxxxx@gmail.com"
SMTP_PORT: "465"
SMTP_SSL: "true"
SMTP_USERNAME: "xxxxxxxxx@gamil.com"
SMTP_PASSWORD: "xxxxxxxx"
LOG_FILE: "/data/bitwarden.log"
RUST_BACKTRACE: "full"
# DATABASE_URL: "mysql://bitwarden:xxxxxxx@mariadb/bitwarden"
ADMIN_TOKEN: "xxxxxxxx"
# ENABLE_DB_WAL: "false"
# links:
# - mariadb
labels:
- "traefik.enable=true"
- "traefik.backend=xxxxxxxxxx"
- "traefik.frontend.rule=Host:xxxxxxxxxx.${DOMAINNAME}"
- "traefik.protocol=http"
- "traefik.port=80"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
```
docker logs
```
[2019-08-30 12:56:00][rocket::rocket][INFO] POST /api/accounts/prelogin application/json; charset=utf-8:
[2019-08-30 12:56:00][_][INFO] Matched: POST /api/accounts/prelogin (prelogin)
[2019-08-30 12:56:00][_][INFO] Outcome: Success
[2019-08-30 12:56:00][_][INFO] Response succeeded.
[2019-08-30 12:56:00][rocket::rocket][INFO] POST /identity/connect/token application/x-www-form-urlencoded; charset=utf-8:
[2019-08-30 12:56:00][_][INFO] Matched: POST /identity/connect/token (login)
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Custom { kind: Other, error: "failed to lookup address information: Name or service not known" })', src/libcore/result.rs:1084:5
```
And here a screenshot from the ff console
[Screenshot](https://imgur.com/XBzrXNA)
Okay this is really shooting in the dark, but I've noticed you have typo in the SMTP_HOST (gamil instead of gmail) and the error logged says failed to lookup address information: Name or service not known. Could that be it?
Edit: same for SMTP_USERNAME
@mprasil commented on GitHub (Aug 30, 2019):
Okay this is really shooting in the dark, but I've noticed you have typo in the `SMTP_HOST` (`gamil` instead of `gmail`) and the error logged says `failed to lookup address information: Name or service not known`. Could that be it?
Edit: same for `SMTP_USERNAME`
Thanks for the hint to the typo error.
I checked the admin page and changed all settings copy/paste. And now it works like a charm.
I think I have here also a typo error. Thanks for your support.
@blacknet76 commented on GitHub (Aug 30, 2019):
Thanks for the hint to the typo error.
I checked the admin page and changed all settings copy/paste. And now it works like a charm.
I think I have here also a typo error. Thanks for your support.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @blacknet76 on GitHub (Aug 17, 2019).
Hi all,
I have a problem to get it to work. I can register a new user but I can't login with it. I got always this error "An error has occurred. An unexpected error occurred." (Is translatet from German output). I can't see also a entry in the bitwareden.log file.
I checked the MySQL DB and the new user is added.
I hope anyone can help and I forgot a stupid setting in my docker-compose file.
Here are my docker-compose.yml
@dani-garcia commented on GitHub (Aug 18, 2019):
If there aren't any errors in the logfile, can you check the web browsers console? Or maybe the network requests tab?
@blacknet76 commented on GitHub (Aug 19, 2019):
In the logfile is no error reportet. In the browser console under network I get status 500 for token and for prelogin is the status 200
Header
Parameters
In the docker log I get following
@blacknet76 commented on GitHub (Aug 30, 2019):
Can no one help?
Or can anyone give me a working docker-compose file to compare and check out?
@mprasil commented on GitHub (Aug 30, 2019):
Do you have any proxy in front of the bitwarden instance?
@blacknet76 commented on GitHub (Aug 30, 2019):
@mprasil in my local test environment no, but I configure it on my production server and here I use traefik with the following labels
@mprasil commented on GitHub (Aug 30, 2019):
You might want to remove
WEBSOCKET_ENABLED: "true". The websocket connection won't work without appropriately configured proxy and client will fail trying to access it. When that happens clients tend to misbehave in weird ways, this is why it's disabled by default. So as a first step to troubleshoot it, try to run the server without and see if you can log in.@blacknet76 commented on GitHub (Aug 30, 2019):
No I can't login, same error and log entry as before
@mprasil commented on GitHub (Aug 30, 2019):
Also to minimize the possible failure scenarios, can you try without
DATABASE_URL? This will use local sqlite DB that will be gone once you restart the container, but that's good enough for test.Also remove
ENABLE_DB_WALvariable. It has no effect with MySQL and with sqlite the default is usually better option.@blacknet76 commented on GitHub (Aug 30, 2019):
Same error as before, here now my config from docker.
I have also deactivate RUST_BACKTRACE but with the same result.
I have tesed with a windows 10, Linux and with my mobile phone with LTE to make sure that it is not a problem on my computer and/or network.
Are certain packages needed on the host machine?
docker logs
And here a screenshot from the ff console
Screenshot
@mprasil commented on GitHub (Aug 30, 2019):
Okay this is really shooting in the dark, but I've noticed you have typo in the
SMTP_HOST(gamilinstead ofgmail) and the error logged saysfailed to lookup address information: Name or service not known. Could that be it?Edit: same for
SMTP_USERNAME@blacknet76 commented on GitHub (Aug 30, 2019):
Thanks for the hint to the typo error.
I checked the admin page and changed all settings copy/paste. And now it works like a charm.
I think I have here also a typo error. Thanks for your support.
@mprasil commented on GitHub (Aug 30, 2019):
Glad you figured that out!