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

Install via docker-compose does not work because of ports conflicts #22

Open
nidup opened this issue Aug 10, 2017 · 7 comments
Open

Install via docker-compose does not work because of ports conflicts #22

nidup opened this issue Aug 10, 2017 · 7 comments

Comments

@nidup
Copy link
Contributor

nidup commented Aug 10, 2017

nico@nidup-xps:~/git/migration-tool$ php MigrationTool.php akeneo-pim:migrate
Here you are ! Few questions before start to migrate the PIM !
What is the name of the project you want to migrate (snake_case, alphanumeric)? pim-17-std 
 Your project name should be an alphanumeric in snake_case one. 
What is the name of the project you want to migrate (snake_case, alphanumeric)? pim17std
Where is located your PIM? 
  [0] local
  [1] server
 > 0
Source Pim Configuration: Collect your configuration files from your computer
What is the absolute path of the composer.json on your computer? /home/nico/git/pim-ce-17-std/composer.json
Source Pim Detection : Detect your source pim
You want to migrate from an edition Community with ORM storage.
Source Pim Detection : Complete
Access to the Community edition allowed
How do you want to install the destination PIM? 
  [0] Using docker-compose
  [1] I have a tar.gz archive, install it with docker
  [2] I have already installed a PIM 2.0
 > 0
Destination Pim Download : Download your future PIM
Destination Pim Downloaded : /home/nico/git/migration-tool/var/pim17std
Destination Pim Configuration : Configure your destination PIM
Destination Pim Detection : Detect your future PIM.
Destination Pim Installation : Let docker makes the job

                                                                                                                                                                       
  [Akeneo\PimMigration\Domain\DestinationPimInstallation\DestinationPimInstallationException]                                                                          
  Error: Step 5 - Destination PIM installation: Docker cannot boot the install system, please check `docker-compose ps` in /home/nico/git/migration-tool/var/pim17std  
                                                                                                                                                                       

                                                                                                                         
[Akeneo\PimMigration\Domain\DestinationPimInstallation\DestinationPimSystemRequirementsNotBootable]                    
  Docker cannot boot the install system, please check `docker-compose ps` in /home/nico/git/migration-tool/var/pim17std  
                                                                                                                         

akeneo-pim:migrate [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--] <command>

I tested with docker-compose already running for other projects (the pim i try to migrate)

I think it has conflict with other containers using the same port, main issue here for me is to not have the docker output, i can't easily debug it. I'm doing extra tests and keep you updated.

@nidup
Copy link
Contributor Author

nidup commented Aug 10, 2017

ok seems related to the conflict with already used ports:

nico@nidup-xps:~/git/migration-tool/var/testagain$ docker-compose up -d
Starting testagain_elasticsearch_1
Starting testagain_node_1
testagain_mysql_1 is up-to-date

ERROR: for elasticsearch  Cannot start service elasticsearch: driver failed programming external connectivity on endpoint testagain_elasticsearch_1 (6b4de71816b9440bfaa8aaa02b2cbdb2b6889dba45611267bf702ed08e98deb1): Bind for 0.0.0.0:9200 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

@nidup
Copy link
Contributor Author

nidup commented Aug 10, 2017

Ok, installation is now in progress (after that i ensured that i have no other container running on the same ports, i had the issue because is use the same docker-compose.yml for my standard but this can happen with any container exposing on the port 8080 which is super common).

We have several option there,

  • easier one is start by running a "docker ps" and stop the install if there is any running docker and ask to the guy to stop them manually
  • can be improve by using super unexpected ports for your different container, by changing them when copying docker-compose.yml.dist to docker-compose to be sure to not use any already used port.

@nidup nidup changed the title Install via docker-compose does not work Install via docker-compose does not work because of ports conflicts Aug 10, 2017
@nidup
Copy link
Contributor Author

nidup commented Aug 10, 2017

Once installed i'd like to know where i can access my pim, for instance: "your pim is now available on http://localhost:8080/"

@nidup
Copy link
Contributor Author

nidup commented Aug 10, 2017

I can't access to the PIM in my browser at the end, i got a 500 error:

nico@nidup-xps:~/git/migration-tool/var/testagainagain$ docker-compose exec httpd bash
root@1c19f29e3991:/usr/local/apache2# tail -f /var/log/akeneo_error.log 
[Thu Aug 10 12:15:24.948305 2017] [core:alert] [pid 7:tid 140244842116864] [client 172.29.0.1:45262] /srv/pim/web/.htaccess: Invalid command 'DirectoryIndex', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost:8080/

Don't hesitate if you need any further information or need a docker beta tester and good luck to continue to improve this tool 💪 ❤️

@anaelChardan
Copy link
Contributor

Yes, I've already seen the problem with docker when port are already used, by using unexpected port it might be easier, you right. It is normal you can't access the PIM I think as we don't have install assets or javascript dependencies

@anaelChardan
Copy link
Contributor

Thanks a lot for the report :)

@nidup
Copy link
Contributor Author

nidup commented Aug 10, 2017

ok, for the install part 👍

I think it could be interesting to have a full working PIM at the end of the command before to start to improve each part, like migration data, etc. But i guess you'll review prios with @skeleton & @jjanvier 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants