devilbox no longer works when migrating to WSL2 using Ubuntu 18.04

Created on 14 Aug 2020  路  3Comments  路  Source: cytopia/devilbox

ISSUE TYPE

  • Bug Report

Checklist

OS / ENVIRONMENT

  1. Host operating system and version: Windows 10 2004 (19041.450)
  2. (Windows) Native Docker or Docker Toolbox: Native Docker
  3. Docker version: 19.03.12
  4. Docker Compose version: 1.26.2
  5. (Linux) Is SELinux enabled?: No
  6. What git commit hash are you on?: 3556873f1920790b22a1d686966c689e2e2d4017

SUMMARY


I have been using devilbox (installed in my documents folder) for ages, with no problems. I've recently enabled WSL2 and installed Ubuntu 18.04 from the windows store. I've installed devilbox inside the ubuntu file system in the /home/josh/projects folder. When I docker-compose up -d httpd mysql everything comes up ok, but I can't reach localhost. It says localhost refused to connect, and the same with all my other hosts

STEPS TO REPRODUCE


  • Install docker-desktop for windows
  • Install devilbox to Documents/devilbox
  • Add an example project to Documents/devilbox/data/www
  • Install Ubuntu 18.04 from the windows store
  • Enable WSL2 in docker-desktop.
  • copy devilbox directory from Documents to \\wsl$/home/<you>/projects/devilbox
  • run wsl
  • navigate to devilbox folder inside wsl and run docker-compose up -d httpd mysql
  • go to localhost

EXPECTED BEHAVIOUR


The devilbox intranet page loads up

ACTUAL BEHAVIOUR


Google chrome ERR_CONNECTION_REFUSED error

OTHER INFORMATION

I have another project in wsl that just uses a custom dockerfile, rather than devilbox and it works fine. I just can't get devilbox to work

Start command

docker-compose up -d httpd mysql

File and user permissions (Linux & MacOS)

uid=1000(josh) gid=1000(josh) groups=1000(josh),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),117(netdev),1001(docker)

drwxr-xr-x 16 josh josh 4096 Aug 14 16:06 devilbox

drwxr-xr-x 4 josh josh
bug

Most helpful comment

@cytopia so when I copied my devilbox files across, I copied all of the custom nginx configs, but only one project inside data/www. I think this was causing the error. Now I've removed the extra nginx config files from cfg/nginx-stable and only kept the one which matches what I have in data/www, everything seems to work ok. Thanks for looking into it and thanks for keeping up the great work with devilbox

All 3 comments

Hi @joshjacksoncastus , thanks for reporting the bug.

After digging into the attached log output, I found that the httpd container is unable to open the generated certificates:

httpd_1  | 2020/08/14 14:31:07 [emerg] 235#235: cannot load certificate "/etc/httpd/cert/mass/www.accoya.loc.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/httpd/cert/mass/www.accoya.loc.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
httpd_1  | nginx: [emerg] cannot load certificate "/etc/httpd/cert/mass/www.accoya.loc.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/httpd/cert/mass/www.accoya.loc.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
httpd_1  | 2020-08-14 14:31:07,101 INFO exited: httpd (exit status 1; not expected)

Can you try out the startup with all four provided httpd server (nginx-stable, nginx-mainline, apache-2.2 and apache-2.4) and see if that yields the same behaviour?

Hi @cytopia thanks for taking a look. So when I switch to nginx-stable, apache-2.2 and apache-2.4, localhost (the devilbox intranet page) loads fine. When I go to one of my project urls I get a permission defined 403 error.

@cytopia so when I copied my devilbox files across, I copied all of the custom nginx configs, but only one project inside data/www. I think this was causing the error. Now I've removed the extra nginx config files from cfg/nginx-stable and only kept the one which matches what I have in data/www, everything seems to work ok. Thanks for looking into it and thanks for keeping up the great work with devilbox

Was this page helpful?
0 / 5 - 0 ratings

Related issues

taliptako picture taliptako  路  4Comments

mwmichael picture mwmichael  路  3Comments

fkaminski picture fkaminski  路  4Comments

hurrtz picture hurrtz  路  5Comments

msyhr picture msyhr  路  7Comments