masterha_check_ssh验证互信时候报错/usr/share/perl5/vendor_perl/MHA/SSHCheck.pm line 148.

masterha_check_ssh验证互信时候报错

[root@mha-m .ssh]# masterha_check_ssh -conf=/etc/mha_master/mha.cnf
Thu Nov 12 20:02:10 2020 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
/etc/mha_master/mha.cnf:
 at /usr/share/perl5/vendor_perl/MHA/SSHCheck.pm line 148.
 
错误原因是/etc/mha_master/mha.cnf文件中有空格存在

重新编辑/etc/mha_master/mha.cnf文件,去掉空格
[server default]                                                                             
user=mhaadmin                                                                                   
password=mhapass                                                                                
manager_workdir=/etc/mha_master/app1                                                         
manager_log=/etc/mha_master/manager.log                                                      
remote_workdir=/mydata/mha_master/app1                                                
ssh_user=root                                                                                
repl_user=repl                                                                                
repl_password=oracle                                                                           
ping_interval=1                                                                                 
[server1]                                                                                         
hostname=192.168.10.11                                                   
ssh_port=22                                                                                    
candidate_master=1                                                                   
[server2]                                                                                           
hostname=192.168.10.12                                                                              
ssh_port=22                                                                                         
candidate_master=1
[server3]
hostname=192.168.10.13
ssh_port=22
candidate_master=1



重新执行masterha_check_ssh文件

[root@mha-m]# masterha_check_ssh -conf=/etc/mha_master/mha.cnf

Thu Nov 12 20:04:25 2020 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Thu Nov 12 20:04:25 2020 - [info] Reading application default configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:04:25 2020 - [info] Reading server configuration from /etc/mha_master/mha.cnf..
Thu Nov 12 20:04:25 2020 - [info] Starting SSH connection tests..
Thu Nov 12 20:04:26 2020 - [debug] 
Thu Nov 12 20:04:25 2020 - [debug]  Connecting via SSH from root@192.168.10.11(192.168.10.11:22) to root@192.168.10.12(192.168.10.12:22)..
Warning: Permanently added '192.168.10.12' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug]   ok.
Thu Nov 12 20:04:26 2020 - [debug]  Connecting via SSH from root@192.168.10.11(192.168.10.11:22) to root@192.168.10.13(192.168.10.13:22)..
Warning: Permanently added '192.168.10.13' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug]   ok.
Thu Nov 12 20:04:27 2020 - [debug] 
Thu Nov 12 20:04:26 2020 - [debug]  Connecting via SSH from root@192.168.10.12(192.168.10.12:22) to root@192.168.10.11(192.168.10.11:22)..
Warning: Permanently added '192.168.10.11' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug]   ok.
Thu Nov 12 20:04:26 2020 - [debug]  Connecting via SSH from root@192.168.10.12(192.168.10.12:22) to root@192.168.10.13(192.168.10.13:22)..
Warning: Permanently added '192.168.10.13' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:26 2020 - [debug]   ok.
Thu Nov 12 20:04:28 2020 - [debug] 
Thu Nov 12 20:04:26 2020 - [debug]  Connecting via SSH from root@192.168.10.13(192.168.10.13:22) to root@192.168.10.11(192.168.10.11:22)..
Warning: Permanently added '192.168.10.11' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:27 2020 - [debug]   ok.
Thu Nov 12 20:04:27 2020 - [debug]  Connecting via SSH from root@192.168.10.13(192.168.10.13:22) to root@192.168.10.12(192.168.10.12:22)..
Warning: Permanently added '192.168.10.12' (ECDSA) to the list of known hosts.
Thu Nov 12 20:04:27 2020 - [debug]   ok.
Thu Nov 12 20:04:28 2020 - [info] All SSH connection tests passed successfully.

 

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个误是由于在perl模块中找不到Log/Dispatch.pm文件导致的。根据引用\[1\]中的误信息,可以看到@INC中包含了一些perl模块的路径,但是在这些路径中找不到Log/Dispatch.pm文件。同样的问题也出现在引用\[2\]中,只是这次是找不到Params/Validate.pm文件。 解决这个问题的方法是安装缺失的perl模块。在这种情况下,你需要安装Log::Dispatch和Params::Validate模块。你可以使用CPAN或者系统包管理器来安装这些模块。 如果你使用的是CPAN,你可以在终端中运行以下命令来安装这些模块: ``` cpan Log::Dispatch cpan Params::Validate ``` 如果你使用的是系统包管理器,你可以根据你使用的操作系统和包管理器的不同,运行适当的命令来安装这些模块。例如,在Ubuntu上,你可以使用以下命令: ``` sudo apt-get install liblog-dispatch-perl sudo apt-get install libparams-validate-perl ``` 安装完这些模块后,你应该能够解决这个误并成功运行你的程序。 #### 引用[.reference_title] - *1* [Can't locate Log/Dispatch.pm in @INC](https://blog.csdn.net/weixin_30685047/article/details/99237075)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [Can't locate Params/Validate.pm in @INC (@INC contains: /usr/local/lib64/perl5 /](https://blog.csdn.net/weixin_30838873/article/details/96170433)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值