leonchen83 / redis-rdb-cli

Redis rdb CLI : A CLI tool that can parse, filter, split, merge rdb and analyze memory usage offline. It can also sync 2 redis data and allow user define their own sink service to migrate redis data to somewhere.
Apache License 2.0
423 stars 85 forks source link

java.lang.RuntimeException: java.lang.NumberFormatException: null #35

Closed lvhanzhi closed 2 years ago

lvhanzhi commented 2 years ago

[root@aaa ~]# rmonitor -s redis://redis地址:6379?authPassword=密码 -n test-monito java.lang.RuntimeException: java.lang.NumberFormatException: null at com.moilioncircle.redis.rdb.cli.ext.rmonitor.impl.XMonitorMasterSlave.createMonitorCommands(XMonitorMasterSlave.java:91) at com.moilioncircle.redis.rdb.cli.ext.rmonitor.impl.XMonitorMasterSlave.(XMonitorMasterSlave.java:58) at com.moilioncircle.redis.rdb.cli.ext.rmonitor.XMonitorCommand.(XMonitorCommand.java:54) at com.moilioncircle.redis.rdb.cli.cmd.XRMonitor.call(XRMonitor.java:57) at com.moilioncircle.redis.rdb.cli.cmd.XRMonitor.call(XRMonitor.java:31) at picocli.CommandLine.executeUserObject(CommandLine.java:1953) at picocli.CommandLine.access$1300(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) at picocli.CommandLine.execute(CommandLine.java:2078) at com.moilioncircle.redis.rdb.cli.RMonitor.main(RMonitor.java:28) Caused by: java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:542) at java.lang.Integer.parseInt(Integer.java:615) at com.moilioncircle.redis.rdb.cli.ext.rmonitor.impl.XMonitorMasterSlave.createMonitorCommands(XMonitorMasterSlave.java:76) ... 13 more

不管是监控还是备份redis都执行失败,感觉是连接不上阿里云的redis,出现上面这个报错,用redis-cli命令是可以连接的。另外我用docker搭建的redis是可以监控并备份的。麻烦各位大大帮忙看下这个问题

leonchen83 commented 2 years ago

第一个备份redis执行失败的问题,是阿里云不支持psync命令,所以没法备份云redis,你可以试试https://github.com/leonchen83/tair-cli, 这个工具好不好用,如果此工具也不好用的话,推荐使用官方的备份工具。

lvhanzhi commented 2 years ago

第一个备份redis执行失败的问题,是阿里云不支持psync命令,所以没法备份云redis,你可以试试https://github.com/leonchen83/tair-cli, 这个工具好不好用,如果此工具也不好用的话,推荐使用官方的备份工具。

好的,蟹蟹

leonchen83 commented 2 years ago

监控也是监控阿里云redis吗?如果是的话,麻烦在阿里云redis上执行下info replication然后把执行结果发一下,我本地没有阿里云redis的环境

lvhanzhi commented 2 years ago

info replication

Replication

role:master

leonchen83 commented 2 years ago

阿里云redis的info replication命令与标准版redis不同,所以也不支持阿里云redis的监控,阿里云redis本身提供了指标监控,建议直接用阿里云自己的

lvhanzhi commented 2 years ago

好的,谢谢大大的及时回复,感谢