Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Issue while nomad startup in the EC2 instance #33

Open
vikramjadon921995 opened this issue Sep 13, 2018 · 3 comments
Open

Issue while nomad startup in the EC2 instance #33

vikramjadon921995 opened this issue Sep 13, 2018 · 3 comments
Labels

Comments

@vikramjadon921995
Copy link

vikramjadon921995 commented Sep 13, 2018

When this script is running: https://github.com/hashicorp/terraform-aws-nomad/blob/master/examples/root-example/user-data-client.sh in the EC2 instance. The logs in /var/log/user_data.log show this:

2018-09-13 11:43:29 [INFO] [run-consul] Creating default Consul configuration
2018-09-13 11:43:29 [INFO] [run-consul] Installing Consul config file in /opt/consul/config/default.json
2018-09-13 11:43:29 [INFO] [run-consul] Creating Supervisor config file to run Consul in /etc/supervisor/conf.d/run-consul.conf
2018-09-13 11:43:29 [INFO] [run-consul] Reloading Supervisor config and starting Consul
consul: available
consul: added process group
2018-09-13 11:43:30 [INFO] [run-nomad] Looking up current Compute Instance name
2018-09-13 11:43:30 [INFO] [run-nomad] Looking up Metadata value at http://metadata.google.internal/computeMetadata/v1/instance/name
curl: (6) Could not resolve host: metadata.google.internal

This means, consul started successfully but nomad startup failed.

When I do nomad status on the instance.
This is the output Error querying jobs: Get http://127.0.0.1:4646/v1/jobs: dial tcp 127.0.0.1:4646: connect: connection refused.

@josh-padnick
Copy link
Collaborator

It looks like you're using the GCP version os fhte run-nomad script. The log output you're seeing comes from this function. You need to run the AWS version of that script as contained in this repo.

@vikramjadon921995
Copy link
Author

Yes, I think that was the problem. I changed the nomad version to the one that is mentioned in the README.md of install-nomad module of this repository. I am not getting the error now and it works. Now the current version of nomad in my application is 0.5.4. Earlier it was 0.8.0.
Is the 0.8.0 version of nomad for GCP ?

@brikis98
Copy link
Collaborator

You need to use the modules from terraform-aws-nomad to deploy to AWS. You can set the version to install in the install script: https://github.com/hashicorp/terraform-aws-nomad/blob/master/modules/install-nomad/install-nomad#L29

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

No branches or pull requests

3 participants