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

parameter error #4

Open
alwqx opened this issue Jan 3, 2017 · 5 comments
Open

parameter error #4

alwqx opened this issue Jan 3, 2017 · 5 comments

Comments

@alwqx
Copy link

alwqx commented Jan 3, 2017

Hi, when I give only hosts and port, I get :

root@master:/# cassandra-web --hosts '192.168.10.134' --port '9042'
TypeError: can't convert nil into Integer

Usage: cassandra-web [options]
    -B, --bind BIND                  ip:port or path for cassandra web to bind on (default: 0.0.0.0:3000)
    -H, --hosts HOSTS                coma-separated list of cassandra hosts (default: 127.0.0.1)
    -P, --port PORT                  integer port that cassandra is running on (default: 9042)
    -L, --log-level LEVEL            log level (default: info)
    -u, --username USER              username to use when connecting to cassandra
    -p, --password PASS              password to use when connecting to cassandra
    -C, --compression NAME           compression algorithm to use (lz4 or snappy)
        --server-cert PATH           server ceritificate pathname
        --client-cert PATH           client ceritificate pathname
        --private-key PATH           path to private key
        --passphrase SECRET          passphrase for the private key
    -h, --help                       Show help

When I give hosts, port, username and password:

root@master:/# cassandra-web --hosts '10.0.2.2' --port '9042' --username 'cassweb' --password 'myPassword'
ArgumentError: :username must be a String, nil given

Usage: cassandra-web [options]
    -B, --bind BIND                  ip:port or path for cassandra web to bind on (default: 0.0.0.0:3000)
    -H, --hosts HOSTS                coma-separated list of cassandra hosts (default: 127.0.0.1)
    -P, --port PORT                  integer port that cassandra is running on (default: 9042)
    -L, --log-level LEVEL            log level (default: info)
    -u, --username USER              username to use when connecting to cassandra
    -p, --password PASS              password to use when connecting to cassandra
    -C, --compression NAME           compression algorithm to use (lz4 or snappy)
        --server-cert PATH           server ceritificate pathname
        --client-cert PATH           client ceritificate pathname
        --private-key PATH           path to private key
        --passphrase SECRET          passphrase for the private key
    -h, --help                       Show help
@avalanche123
Copy link
Owner

Hmm, I'm not sure what's going on, can you try without single quotes?

@alwqx
Copy link
Author

alwqx commented Jan 4, 2017

The same:

root@master:/# cassandra-web -H 192.168.10.134 -P 9042
TypeError: can't convert nil into Integer

Usage: cassandra-web [options]
    -B, --bind BIND                  ip:port or path for cassandra web to bind on (default: 0.0.0.0:3000)
    -H, --hosts HOSTS                coma-separated list of cassandra hosts (default: 127.0.0.1)
    -P, --port PORT                  integer port that cassandra is running on (default: 9042)
    -L, --log-level LEVEL            log level (default: info)
    -u, --username USER              username to use when connecting to cassandra
    -p, --password PASS              password to use when connecting to cassandra
    -C, --compression NAME           compression algorithm to use (lz4 or snappy)
        --server-cert PATH           server ceritificate pathname
        --client-cert PATH           client ceritificate pathname
        --private-key PATH           path to private key
        --passphrase SECRET          passphrase for the private key
    -h, --help                       Show help

By the way, I test cassandra-web on docker . Click here for dockerfile.

@rdigiorgio
Copy link

rdigiorgio commented Jan 5, 2017

Hi, same behaviour here, but with username parameter...

ArgumentError: :username must be a String, nil given

Options passed to Cassandra Driver seems to not get resolved correctly.
Snippet from driver source code where it fails:

username = options.delete(:username)
password = options.delete(:password)

Util.assert_instance_of(::String, username) do
  ":username must be a String, #{username.inspect} given"
end
Util.assert_instance_of(::String, password) do
  ":password must be a String, #{password.inspect} given"
end

@avalanche123
Copy link
Owner

something is up with option parsing, I'd appreciate your help debugging.

@jeremyjpj0916
Copy link

I tested the app as it stands today the option parsing does indeed work. I would make a note that c* host has to be an IP and not a host name else the app breaks it seems.

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

No branches or pull requests

4 participants