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

Error when Deploying API portal locally #61

Closed
bigdoods opened this issue Mar 27, 2017 · 6 comments
Closed

Error when Deploying API portal locally #61

bigdoods opened this issue Mar 27, 2017 · 6 comments
Labels
Milestone

Comments

@bigdoods
Copy link

Hi,

I have followed instructions. Everything was fine until I ran docker-compose up and I received this error:

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.portal-api.environment contains non unique items, please remove duplicates from ['NODE_ENV', 'DEBUG', None, None, 'PORTAL_CONFIG_KEY', 'GIT_REPO', 'GIT_BRANCH', 'GIT_CREDENTIALS', 'GIT_REVISION']

I tried to remove the corresponding empty lines. When I did this, I received a 503 Service Unavailable - No server is available to handle this request.

@hlgr360
Copy link

hlgr360 commented Mar 28, 2017

Could you attach the docker-compose file and send a trace of your last shell commands prior to invoking docker-compose up

@DonMartin76
Copy link
Member

I can reproduce the problem; there is a regression in there regarding the templating of the docker-compose.yml file, sorry for that, will fix in the next version.

What's more interesting is that I can also reproduce the 503 regarding the https://portal.local, which seems to be a change in docker 1.13 (17.03) that does not fit the HAproxy version. I will investigate and come back.

Can you please attach your local machine's configuration:

  • Operating system and version
  • docker version,
  • docker-compose version

I am guessing you're on macOS?

@DonMartin76
Copy link
Member

DonMartin76 commented Mar 28, 2017

Blushing

I found the problem: In your docker-compose.yml, check the portal: section. In this section, you will find two environment: sections, one with VIRTUAL_HOST and others, and one with only - DEBUG. Move the - DEBUG into the first one and delete the second environment: section.

I assumed docker-compose would merge the two environment sections, or at least throw an error if it finds multiple ones. This is apparently not the case, and this one slipped through the tests. We have been working more on the Kubernetes integration the last couple of releases.

Will fix this for the next version. Sorry for the inconvenience.

@bigdoods
Copy link
Author

Hi,

This worked but I also had to remove the two blank fields in the environment section of portal-api in the docker-compose.

Thanks for quick resolution.

John

DonMartin76 added a commit to apim-haufe-io/wicked.kickstarter that referenced this issue Mar 28, 2017
- The portal component had two "environment" sections in the YML, which caused the second one to overwrite the first one. This caused HAproxy not to pick up the target container.
- In docker-compose.yml, the wrong variable name was passed in for the portal and api host names (typo)
- Likewise in the variables.env.template, even if that's currently not used
- Bumped to 0.11.5.
@DonMartin76
Copy link
Member

Yes, thanks, I fixed that as well with the commit above. Will schedule a release for when I'm back from KubeCon. Sorry.

Martin

@DonMartin76 DonMartin76 added this to the 0.11.5 milestone Mar 29, 2017
@DonMartin76
Copy link
Member

Fixed and released in 0.11.5.

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

No branches or pull requests

3 participants