datahub icon indicating copy to clipboard operation
datahub copied to clipboard

invalid variable names in docker/elasticsearch/env/docker.env when using docker compose v2

Open nikmartin opened this issue 3 years ago • 11 comments

Installing the latest docker compose (v2) will cause the dev.sh script to throw errors:

unexpected character "." in variable name near "discovery.type=single-node\nxpack.security.enabled=false\nES_JAVA_OPTS=-Xms256m -Xmx256m -Dlog4j2.formatMsgNoLookups=true\n"

nikmartin avatar Feb 06 '22 00:02 nikmartin

@dexter-mh-lee could you take a look at this please?

@nikmartin are you using a custom docker-compose file? Where are you getting it from? Which version of DataHub are you trying to deploy?

pedro93 avatar Feb 11 '22 19:02 pedro93

Am using https://github.com/linkedin/datahub/blob/master/docker/docker-compose-without-neo4j.yml, and the env file for elastic search is the offending file. The issue is most definitely with docker compose v2, as switching back to compose v1 works ok.

nikmartin avatar Feb 12 '22 02:02 nikmartin

@nikmartin Seems like we need to put quotes around variables. Can you try putting quotes around the value side of this variable and see if that works with docker compose v2? https://github.com/linkedin/datahub/blob/master/docker/elasticsearch/env/docker.env#L3 Feel free to put out a PR with the change if that solves it!

dexter-mh-lee avatar Feb 12 '22 02:02 dexter-mh-lee

I didn't mention it in my original issue, but I had done a bit of research and saw a few posts about similar issues, but the issue was the '.' in the key name, and no amount or flavor of escaping could get it to pass. When I deleted lines 1&2 and wrapped line 3 in quotes, it worked ok.

nikmartin avatar Feb 12 '22 02:02 nikmartin

So ES_JAVA_OPTS="-Xms256m -Xmx256m -Dlog4j2.formatMsgNoLookups=true" doesn't work?

dexter-mh-lee avatar Feb 12 '22 02:02 dexter-mh-lee

yes that works fine, but the first two lines in the default env file have "." In the key name. Those I can't get escaped: ​discovery.type=single-node

nikmartin avatar Feb 12 '22 22:02 nikmartin

@nikmartin I'm very sorry for not replying sooner! Could you please share the command you are using to launch DataHub and your version of docker-compose so I can try to repo locally?

pedro93 avatar Mar 02 '22 11:03 pedro93

hello everyone ! I had the same issue than @nikmartin just after having downloaded and trying to run https://github.com/temporalio/docker-compose , as it happened running docker-compose up instead of docker compose up solved it, hope that helps

yactouatfuture avatar Mar 14 '22 10:03 yactouatfuture

On macos, I had to run docker-compose disable-v2 so that my docker-compose didn't run on v2. See https://docs.docker.com/compose/cli-command/#install-on-mac-and-windows

@pedro93 has a PR out with a fix! This should be fixed by next release

dexter-mh-lee avatar Mar 14 '22 16:03 dexter-mh-lee

This issue is stale because it has been open for 30 days with no activity. If you believe this is still an issue on the latest DataHub release please leave a comment with the version that you tested it with. If this is a question/discussion please head to https://slack.datahubproject.io. For feature requests please use https://feature-requests.datahubproject.io

github-actions[bot] avatar Sep 15 '22 02:09 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Oct 15 '22 02:10 github-actions[bot]