Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

How to change Nomad address #3

@scalp42

Description

@scalp42

Hi @sethvargo

I'm trying to figure how to change the address Nomad talks to:

[2] pry(main)> require 'nomad'
=> true
[3] pry(main)> Nomad.address
=> "http://127.0.0.1:4646"

[4] pry(main)> Nomad.options
=> {:address=>"http://127.0.0.1:4646",
 :hostname=>nil,
 :open_timeout=>nil,
 :proxy_address=>nil,
 :proxy_password=>nil,
 :proxy_port=>nil,
 :proxy_username=>nil,
 :pool_size=>16,
 :read_timeout=>nil,
 :ssl_ciphers=>"TLSv1.2:!aNULL:!eNULL",
 :ssl_pem_contents=>nil,
 :ssl_pem_file=>nil,
 :ssl_pem_passphrase=>nil,
 :ssl_ca_cert=>nil,
 :ssl_ca_path=>nil,
 :ssl_cert_store=>nil,
 :ssl_verify=>true,
 :ssl_timeout=>nil,
 :timeout=>nil}

[5] pry(main)> Nomad.region.list
Nomad::HTTPConnectionError: The Nomad server at `http://127.0.0.1:4646' is not currently
accepting connections. Please ensure that the server is running and that your
authentication information is correct.

The original error was `Errno::ECONNREFUSED'. Additional information (if any) is
shown below:

    Connection refused - connect(2) for "127.0.0.1" port 4646

Please refer to the documentation for more help.
from /Users/antho/.rvm/gems/xxx/gems/nomad-0.1.0/lib/nomad/client.rb:172:in `rescue in request’

[6] pry(main)> Nomad.address = 'http://example.com:4646'
=> "http://example.com:4646"

[7] pry(main)> Nomad.options
=> {:address=>"http://example.com:4646",
 :hostname=>nil,
 :open_timeout=>nil,
 :proxy_address=>nil,
 :proxy_password=>nil,
 :proxy_port=>nil,
 :proxy_username=>nil,
 :pool_size=>16,
 :read_timeout=>nil,
 :ssl_ciphers=>"TLSv1.2:!aNULL:!eNULL",
 :ssl_pem_contents=>nil,
 :ssl_pem_file=>nil,
 :ssl_pem_passphrase=>nil,
 :ssl_ca_cert=>nil,
 :ssl_ca_path=>nil,
 :ssl_cert_store=>nil,
 :ssl_verify=>true,
 :ssl_timeout=>nil,
 :timeout=>nil}

[8] pry(main)> Nomad.region.list
Nomad::HTTPConnectionError: The Nomad server at `http://example.com:4646' is not currently
accepting connections. Please ensure that the server is running and that your
authentication information is correct.

The original error was `Errno::ECONNREFUSED'. Additional information (if any) is
shown below:

    Connection refused - connect(2) for "127.0.0.1" port 4646

Please refer to the documentation for more help.
from /Users/antho/.rvm/gems/xxxx/gems/nomad-0.1.0/lib/nomad/client.rb:172:in `rescue in request'

I'm probably doing something wrong, any help would be much appreciated 🙇

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions