Port 5000 started (not 80/443), after docker install

Hi

  • I got bitwarden installed on a fedora 28 and I answered y to use default ports.
(!) Do you want to use the default ports for HTTP (80) and HTTPS (443)? (y/n): y

  • Here is dokcer ps output, web ports are not on 80 and 443.
[email protected] env]# docker ps
CONTAINER ID        IMAGE                          COMMAND             CREATED             STATUS                         PORTS               NAMES
2fe90ff309f2        bitwarden/admin:1.20.0         "/entrypoint.sh"    18 minutes ago      Up 18 minutes                  5000/tcp            bitwarden-admin
7defccc086fc        bitwarden/attachments:1.20.0   "/entrypoint.sh"    18 minutes ago      Up 18 minutes                  5000/tcp            bitwarden-attachments
1988d965a7ee        bitwarden/web:1.27.0           "/entrypoint.sh"    18 minutes ago      Up 18 minutes                  5000/tcp            bitwarden-web
7a2fe7239a39        bitwarden/icons:1.20.0         "/entrypoint.sh"    18 minutes ago      Up 18 minutes                  5000/tcp            bitwarden-icons
7d780854150f        bitwarden/api:1.20.0           "/entrypoint.sh"    18 minutes ago      Up 18 minutes                  5000/tcp            bitwarden-api
ac5516ba0034        bitwarden/mssql:1.20.0         "/entrypoint.sh"    18 minutes ago      Up 18 minutes                  1433/tcp            bitwarden-mssql
7103eae5fb15        bitwarden/identity:1.20.0      "/entrypoint.sh"    18 minutes ago      Up 18 minutes                  5000/tcp            bitwarden-identity
e508ffa91cc9        bitwarden/nginx:1.20.0         "/entrypoint.sh"    18 minutes ago      Restarting (1) 4 minutes ago                       bitwarden-nginx
[[email protected] env]#

  • How can specify web port numbers after install ?
    I can’t find which file to change the default port 5000
[[email protected] env]# ls -lrt
total 12
-rw-r--r-- 1 nfsnobody nfsnobody   32 Jul 11 17:55 uid.env
-rw------- 1 nfsnobody nfsnobody 1638 Jul 11 18:18 global.override.env
-rw------- 1 nfsnobody nfsnobody   77 Jul 11 18:18 mssql.override.env
[[email protected] env]#

These are internal network ports. The external port is linked to the nginx container, which is failing to start. Probably due to cert issues. Look at your error log in ./bwdata/logs/nginx

1 Like

@kspearrin, Thanks for the pointer.

  • Indeed /root/bwdata/logs/nginx/error.log has following error.
[[email protected] nginx]# tail error.log
2018/07/11 23:23:31 [emerg] 1#1: BIO_new_file("/etc/ssl/self/./bitwarden.sh/certificate.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/self/./bitwarden.sh/certificate.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
2018/07/12 00:18:08 [warn] 1#1: server name "./bitwarden.sh" has suspicious symbols in /etc/nginx/conf.d/default.conf:13
2018/07/12 00:18:08 [warn] 1#1: server name "./bitwarden.sh" has suspicious symbols in /etc/nginx/conf.d/default.conf:20
2018/07/12 00:18:08 [emerg] 1#1: BIO_new_file("/etc/ssl/self/./bitwarden.sh/certificate.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/self/./bitwarden.sh/certificate.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
2018/07/12 02:07:22 [warn] 1#1: server name "./bitwarden.sh" has suspicious symbols in /etc/nginx/conf.d/default.conf:13
2018/07/12 02:07:22 [warn] 1#1: server name "./bitwarden.sh" has suspicious symbols in /etc/nginx/conf.d/default.conf:20
2018/07/12 02:07:22 [emerg] 1#1: BIO_new_file("/etc/ssl/self/./bitwarden.sh/certificate.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/self/./bitwarden.sh/certificate.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
2018/07/12 05:45:50 [warn] 1#1: server name "./bitwarden.sh" has suspicious symbols in /etc/nginx/conf.d/default.conf:13
2018/07/12 05:45:50 [warn] 1#1: server name "./bitwarden.sh" has suspicious symbols in /etc/nginx/conf.d/default.conf:20
2018/07/12 05:45:50 [emerg] 1#1: BIO_new_file("/etc/ssl/self/./bitwarden.sh/certificate.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/self/./bitwarden.sh/certificate.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
[[email protected] nginx]#

What was the solution here? I’m getting the same errors, but the certificates are sitting in the directory specified:

bitwarden-nginx | nginx: [emerg] BIO_new_file("/etc/ssl/barry.fail/cert.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/barry.fail/cert.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

The file is there and the permissions are global read. What’s missing?

@FoxBJK
I am sorry, I lost my centos 7 B.W test VM and I don’t remember the solution.
I have my google doc created and I will repeat the steps in my note to create the VM later.

After a lot of toil, I figured out the issue. I was completely confused about the “volume” syntax in docker, and was putting the certs in a place that the docker had no clue how to find. Moved the certs and all’s good now.