BurningFlipside / DevSandbox

a docker compose symphony to allow for local sandboxed dev and testing
0 stars 3 forks source link

Verify support for redhat/centos #88

Open russelltsherman opened 6 years ago

russelltsherman commented 6 years ago

all of my testing and development was performed using OSX and Debian hosts OSX does not require sudo to run docker commands Debian can be configured to operate is this fashion as well all commands and documentation assumes that sudo is not required.

I have been told that redhat/centos systems are different and sudo is required. I believe this project will still function as intended and should only require prefixing calls to the convenience scripts in the bin/ directory with sudo

but i am leaving the verification of this to somebody who is more intimately familiar with these distributions.

pboyd04 commented 4 years ago

The network creation is failing at bin/compose up: Creating network "flipside_dev" with driver "bridge" ERROR: cannot create network fd90e6326062a3eab4151c5a2793972d3b218a898fd12f028000e2cddd84aead (br-fd90e6326062): conflicts with network 585b1de5a6ecb12e7e0e62925a9ecac45307152457a0cefb07054f2d486c8a81 (br-585b1de5a6ec): networks have overlapping IPv4

pboyd04 commented 4 years ago

And here are the errors once I worked around that: [pboyd@route1 DevSandbox (master)]$ sudo ./bin/compose up Creating network "flipside_dev" with driver "bridge" Creating mysql.burningflipside.local ... error Creating ldap.burningflipside.local ... Creating mongo.burningflipside.local ...

ERROR: for mysql.burningflipside.local Cannot start service mysql: driver failed programming external connectivity on endpoint mysql.burningflipside.local (58773e0547ae110cfcd39752744f1f38c0fcf5168ab9b165695b050cec2e8102): ErrCreating mongo.burningflipside.local ... error

Creating ldap.burningflipside.local ... done or starting userland proxy: listen tcp 0.0.0.0:27017: bind: address already in use

ERROR: for mysql Cannot start service mysql: driver failed programming external connectivity on endpoint mysql.burningflipside.local (58773e0547ae110cfcd39752744f1f38c0fcf5168ab9b165695b050cec2e8102): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use

ERROR: for mongo Cannot start service mongo: driver failed programming external connectivity on endpoint mongo.burningflipside.local (d86972fb8ff06c5deb0a1a43c5e774fb7e4625e4d3967d8d13b1340a3e50595e): Error starting userland proxy: listen tcp 0.0.0.0:27017: bind: address already in use ERROR: Encountered errors while bringing up the project.

russelltsherman commented 4 years ago

"bind: address already in use"

that means you have locally installed and currently running services listening on the same ports docker is trying to use... you should turn off locally installed ldap and mysql processes before launching docker..

pboyd04 commented 4 years ago

I need the local mysql and mongo instances. The mongo is for my unifi network controller so I can't work without that. Can I just use my local DBs instead of the docker images? They don't have conflicting DBs in them...

russelltsherman commented 4 years ago

(x) network conflicts with (y)

this suggests to me that you have a lingering network object created in docker which is trying to use the same cidr range .. if this is a network object you created intentionally then spin it down when attempting to use sandbox.. if not intentional destroy it..

pboyd04 commented 4 years ago

Yeah I nuked my whole docker network to get around that one....

russelltsherman commented 4 years ago

you could configure the sandbox to use your locally installed database and ldap.. and just not start those services (comment them from the docker compose configuration)

pboyd04 commented 4 years ago

Ok things spin up now, but not able to get anything when I hit the 3100 port. I get 404's... [Fri Jun 19 16:03:38.328224 2020] [autoindex:error] [pid 21] [client 192.168.86.34:60022] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive www.burningflipside.local | 192.168.86.34 - - [19/Jun/2020:16:03:38 +0000] "GET / HTTP/1.1" 403 1956 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" www.burningflipside.local | 192.168.86.34 - - [19/Jun/2020:16:03:38 +0000] "GET /favicon.ico HTTP/1.1" 404 563 "https://192.168.86.2:3100/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" www.burningflipside.local | [Fri Jun 19 16:04:04.022715 2020] [php7:error] [pid 22] [client 192.168.86.34:60068] script '/var/www/html/index.php' not found or unable to stat

pboyd04 commented 4 years ago

Oh and ldap is very, very unhappy in it's container... ldap.burningflipside.local.txt

russelltsherman commented 4 years ago

script '/var/www/html/index.php' not found or unable to stat

this suggests the source code volume mounts did not happen as expected.. did you run the setup script? did it complete without error? are the project repos all checked out in DevSandbox/src

pboyd04 commented 4 years ago

The only errors I see are about mongo and mysql (expected) but all my source directories are empty after setup.sh ran. setup.txt

russelltsherman commented 4 years ago

your log there shows that setup only attempted to clone the common code repo..

setup calls ./bin/repos to clone repos.. but that script swallows some output hiding potential errors

my guess is that you might have an artifact from previous work with this repo.. a .githubuser file.. and that might be pointing the script to git repos which do not exist..

that file contents dictates which github user or organization from which repos will be cloned

i believe this project readme advises you to create forks of all the repos..

pboyd04 commented 4 years ago

I have to run the script with sudo to get the docker commands to work on Fedora/Centos. That mucks up the repo check out stuff since my root doesn't have an authorized key for github. Maybe change the checkouts to https just to simplify what can go wrong?

pboyd04 commented 4 years ago

Ok the ldap container is still crashing as soon as it runs. And I get a 403 trying to access any URL. profiles.burningflipside.local | 192.168.86.34 - - [22/Jun/2020:14:13:58 +0000] "GET / HTTP/1.1" 403 763 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" profiles.burningflipside.local | [Mon Jun 22 14:13:58.513403 2020] [core:crit] [pid 19] (13)Permission denied: [client 192.168.86.34:5721] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable profiles.burningflipside.local | 192.168.86.34 - - [22/Jun/2020:14:13:58 +0000] "GET /favicon.ico HTTP/1.1" 403 636 "https://192.168.86.2:3300/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" profiles.burningflipside.local | [Mon Jun 22 14:13:58.609672 2020] [core:crit] [pid 19] (13)Permission denied: [client 192.168.86.34:5721] AH00529: /var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/' is executable, referer: https://192.168.86.2:3300/

pboyd04 commented 4 years ago

Opening child issues. To make it easier to track. https://github.com/BurningFlipside/DevSandbox/issues/94 https://github.com/BurningFlipside/DevSandbox/issues/95