cassandra-web
cassandra-web copied to clipboard
parameter error
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
Hmm, I'm not sure what's going on, can you try without single quotes?
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.
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
something is up with option parsing, I'd appreciate your help debugging.
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.