Enable tcp monitoring for libmongod in Linux

Source: Internet
Author: User

Enable tcp monitoring for libmongod in Linux

When you use virsh to connect to another server, tcp connections are used.
Virsh-c qemu + tcp: // host/system

If the tcp port listening of libmongod is not enabled on the target server
Error: unable to connect to server at 'host: 16509 ': Connection refused
Error: failed to connect to the hypervisor

Solution in Ubuntu
Sed-I's/# listen_tls = 0/listen_tls = 0/G'/etc/libvirt/lib1_d. conf
Sed-I's/# listen_tcp = 1/listen_tcp = 1/G'/etc/libvirt/lib1_d. conf
Sed-I's/# auth_tcp = "sasl"/auth_tcp = "none"/G'/etc/libvirt/lib1_d. conf

Vi/etc/default/libvirt-bin
Change to libpai_opts = "-d-l"
Add-l listener tcp

Service libvirt-bin restart

Solution in CentOS
Sed-I's/# listen_tls = 0/listen_tls = 0/G'/etc/libvirt/lib1_d. conf
Sed-I's/# listen_tcp = 1/listen_tcp = 1/G'/etc/libvirt/lib1_d. conf
Sed-I's/# auth_tcp = "sasl"/auth_tcp = "none"/G'/etc/libvirt/lib1_d. conf
Sed-I's/# lib1_d_args = "-- listen"/lib1_d_args = "-- listen"/G'/etc/sysconfig/lib1_d

Service libmongod restart

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.