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

Local mode does not work if NODE_ENV=production #228

Closed
ddgenome opened this Issue Jan 25, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@ddgenome
Copy link
Member

commented Jan 25, 2019

If you run

$ npm ci
$ npm run compile
$ NODE_ENV=production atomist start --local --no-compile --no-install

The last command fails because even though you are specifying --local, the SDM tries to register with the API.

atomist: [INFO] Running "/Users/X/Y/atomist/k8s-sdm/node_modules/.bin/atm-start" in '/Users/X/Y/atomist/k8s-sdm'
2019-01-25T16:11:05.236Z [m:83357] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:05.243Z [m:83357] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:05.307Z [m:83357] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:05.310Z [m:83357] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:05.311Z [m:83357] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:05.345Z [m:83357] [info ] Starting Atomist automation client master @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:12.134Z [w:83362] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.162Z [w:83362] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.186Z [w:83361] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.202Z [w:83361] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.180Z [w:83360] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.216Z [w:83360] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.286Z [w:83358] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.303Z [w:83358] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.340Z [w:83362] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.357Z [w:83362] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.357Z [w:83362] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.368Z [w:83360] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.372Z [w:83361] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.381Z [w:83360] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.381Z [w:83360] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.414Z [w:83361] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.415Z [w:83361] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.419Z [w:83363] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.456Z [w:83363] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.460Z [w:83359] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.469Z [w:83362] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:12.484Z [w:83359] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.532Z [w:83358] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.546Z [w:83358] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.547Z [w:83358] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.547Z [w:83361] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:12.549Z [w:83365] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.562Z [w:83360] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:12.611Z [w:83365] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.664Z [w:83362] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:12.666Z [w:83364] [info ] GITHUB_TOKEN not set in environment: Defaulting to 'not.a.real.token'
2019-01-25T16:11:12.701Z [w:83364] [info ] Adding extension pack '@atomist/sdm-core:info' version 1.3.0-master.20190121222307 from Atomist
2019-01-25T16:11:12.718Z [w:83363] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.744Z [w:83361] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:12.753Z [w:83359] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.753Z [w:83358] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:12.759Z [w:83363] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.760Z [w:83363] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.731Z [w:83360] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:12.767Z [w:83359] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.769Z [w:83359] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.875Z [w:83365] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.877Z [w:83359] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:12.884Z [w:83365] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.885Z [w:83365] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.887Z [w:83358] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:12.901Z [w:83363] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:12.914Z [w:83364] [info ] Adding extension pack '@atomist/sdm-pack-k8s' version 1.1.0-k8s.20190123225606 from Atomist
2019-01-25T16:11:12.943Z [w:83364] [info ] Adding extension pack '@atomist/sdm-local:local-lifecycle' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:12.944Z [w:83364] [info ] Adding extension pack '@atomist/sdm-local:local-config' version 1.0.5-master.20190121144327 from Atomist
2019-01-25T16:11:13.053Z [w:83359] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:13.058Z [w:83363] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:13.066Z [w:83365] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:13.073Z [w:83364] [info ] Starting Atomist automation client worker @atomist/k8s-sdm:1.0.0
2019-01-25T16:11:13.229Z [w:83365] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:13.236Z [w:83364] [info ] Using provided Docker environment variables: DOCKER_HOST=tcp://192.168.99.100:2376
2019-01-25T16:11:13.588Z [m:83357] [error] Registration failed with code '401': '"Invalid token"'
2019-01-25T16:11:13.589Z [m:83357] [info ] Shutdown initiated. Calling shutdown hooks
atomist: [ERROR] Command "/Users/dd/develop/atomist/k8s-sdm/node_modules/.bin/atm-start" failed with non-zero status: 1
2019-01-25T16:11:13.614Z [w:83362] [info ] Shutdown initiated. Calling shutdown hooks
2019-01-25T16:11:13.615Z [w:83360] [info ] Shutdown initiated. Calling shutdown hooks
2019-01-25T16:11:13.615Z [w:83358] [info ] Shutdown initiated. Calling shutdown hooks
2019-01-25T16:11:13.615Z [w:83361] [info ] Shutdown initiated. Calling shutdown hooks
2019-01-25T16:11:13.669Z [w:83363] [info ] Shutdown initiated. Calling shutdown hooks
2019-01-25T16:11:13.620Z [w:83365] [info ] Shutdown initiated. Calling shutdown hooks
2019-01-25T16:11:13.686Z [w:83359] [info ] Shutdown initiated. Calling shutdown hooks
2019-01-25T16:11:13.686Z [w:83364] [info ] Shutdown initiated. Calling shutdown hooks

The repeated log lines for various workers leads me to think it may have something to do with production turning on workers that local mode does not and they do not handle local mode properly?

@cdupuis cdupuis self-assigned this Jan 25, 2019

@cdupuis cdupuis closed this in e2dd678 Jan 25, 2019

atomist-bot added a commit that referenced this issue Jan 25, 2019

Changelog: #228 to fixed
[atomist:generated]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.