Cassandra 压力工具失败
Posted
技术标签:
【中文标题】Cassandra 压力工具失败【英文标题】:Cassandra stress-tool failing 【发布时间】:2016-12-28 11:00:59 【问题描述】:我正在尝试测试 cassandra-stress 工具。通过使用 write 启动该工具,我收到此错误:
/bin $ ./cassandra-stress write -node 10.xxx.xx.1:31xx5
java.lang.RuntimeException: java.lang.IllegalArgumentException: 10.xxx.xx.1:31xx5: invalid IPv6 address
at org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:200)
at org.apache.cassandra.stress.settings.SettingsSchema.createKeySpacesNative(SettingsSchema.java:79)
at org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:69)
at org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:207)
at org.apache.cassandra.stress.StressAction.run(StressAction.java:55)
at org.apache.cassandra.stress.Stress.main(Stress.java:117)
Caused by: java.lang.IllegalArgumentException: 10.xxx.xx.1:31xx5: invalid IPv6 address
at com.datastax.driver.core.Cluster$Builder.addContactPoint(Cluster.java:849)
at org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:116)
at org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:191)
... 5 more
配置详情:
Version: 3.0.8
native_transport_port: 31xx5
start_native_transport: true
listen_address: "10.xxx.xx.1"
当我检查端口时,它使用的是 tcp6 协议。
【问题讨论】:
【参考方案1】:尝试使用-port
标志指定端口:
$ ./cassandra-stress write -node 10.xxx.xx.1 -port 31xx5
【讨论】:
【参考方案2】:解决方案是使用以下方法,并且有效。
./cassandra-stress write -node "IPv6 equivalent of IP" -port native=31xx5
【讨论】:
以上是关于Cassandra 压力工具失败的主要内容,如果未能解决你的问题,请参考以下文章
Cassandra Stess 工具 -Err:Application 不允许任意参数:write,yaml