qemu-kvm: Migrate: socket bind failed



1、错误信息

2、原因:

其原因是qemu迁移端口与glusterfs端口冲突导致的

3、解决方法:

这种问题有两种解决办法:

第一:

解决办法,在所有安装glusterfs的机器上执行:

# vi /etc/glusterfs/glusterd.vol

在“end-volume”之前加入一行:

option base-port 50152  (写其它端口也可以,反正不要写49152)

然后,重启glusterfs服务

第二:

# virsh migrate --live rhel qemu+ssh://10.66.100.102/system --verbose

error: internal error Process exited while reading console log output: char device redirected to /dev/pts/2

qemu-kvm: Migrate: socket bind failed: Address already in use

Migration failed. Exit code tcp:[::]:49152(-1), exiting.

verify with build:libvirt-0.10.2-37.el6.x86_64

step:

S1:

1:prepare gluster server and client(on migration source and dst.)

2:mount gluster pool both on souce and dst.

10.66.100.103:/gluster-vol1 on /var/lib/libvirt/migrate type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)

3:prepare a guest with gluster storage

4:check port on dst.

tcp        0      0 0.0.0.0:49152               0.0.0.0:*                   LISTEN      0          194240     29866/glusterfsd

tcp        0      0 10.66.100.102:49152         10.66.100.103:1015          ESTABLISHED 0          194475     29866/glusterfsd

tcp        0      0 10.66.100.102:49152         10.66.100.102:1021          ESTABLISHED 0          194462     29866/glusterfsd

tcp        0      0 10.66.100.102:1016          10.66.100.102:49152         ESTABLISHED 0          194748     30008/glusterfs

tcp        0      0 10.66.100.102:1018          10.66.100.103:49152         ESTABLISHED 0          194464     29879/glusterfs

tcp        0      0 10.66.100.102:1015          10.66.100.103:49152         ESTABLISHED 0          194751     30008/glusterfs

tcp        0      0 10.66.100.102:49152         10.66.100.103:1017          ESTABLISHED 0          194466     29866/glusterfsd

tcp        0      0 10.66.100.102:49152         10.66.100.102:1016          ESTABLISHED 0          194749     29866/glusterfsd

tcp        0      0 10.66.100.102:1021          10.66.100.102:49152         ESTABLISHED 0          194461     29879/glusterfs

4:do migration

5:repeat 20 times, no error occured.

S2:

1:prepare a guest same with S1

2:do live migrate then cancelled

# virsh migrate rhel qemu+ssh://10.66.100.102/system --verbose

Migration: [  2 %]^Cerror: operation aborted: migration job: canceled by client

3:before migration canceled, check port on dst.:

tcp        0      0 :::49153                    :::*                        LISTEN      107        212413     931/qemu-kvm

tcp        0      0 ::ffff:10.66.100.102:49153  ::ffff:10.66.100.103:52244  ESTABLISHED 107        212487     931/qemu-kvm

after canceled, check port again:

# netstat -laputen | grep 49153

no output

if cancelled the job, the port cleaned up, can reused in next migration

S3:

1:config /etc/libvirt/qemu.conf, edit and restart libvirtd

migration_port_min = 51152

migration_port_max = 51251

2:do migration

3:check dst. port

# netstat -laputen | grep 51

tcp        0      0 10.66.100.102:1015          10.66.100.103:49152         ESTABLISHED 0          194751     30008/glusterfs

tcp        0      0 :::51152                    :::*                        LISTEN      107        214187     1179/qemu-kvm

tcp        0      0 ::ffff:10.66.100.102:51152  ::ffff:10.66.100.103:56922  ESTABLISHED 107        214260     1179/qemu-kvm

# virsh migrate rhel qemu+ssh://10.66.100.102/system --verbose

Migration: [100 %]

migration worked well.

时间: 2024-08-03 12:49:03

qemu-kvm: Migrate: socket bind failed的相关文章

java.lang.Exception: Socket bind failed: [730048]

严重: Error initializing endpoint java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í?? at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprP

java.lang.Exception: Socket bind failed

1.错误描述 严重: Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í?? at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:4

启动tomcat报错 java.lang.Exception: Socket bind failed

严重: Error initializing endpointjava.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í?? at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:647) at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprPr

Tomcat 的 socket bind failed的解决方法

1.socket bind failed的原因一般是Tomcat端口被占用,一般解除端口占用就行了 解决步骤: 1.win+R打开运行,输入cmd,进入dos界面: 2.输入netstat -ano |findstr 8080  查看占用端口8080,每个人的端口号可能占用的不同,要根据实际情况来看 通过 taskkill /f /pid 4228 杀死进程为4228的应用:

linux 网络编程 socket bind failed 问题解决

今天写一个简单的socket网络通讯的程序的时候,用ctrl+c结束服务器端程序之后,再次启动服务器出现了bind failed:the address already in use的错误.在网上查了一下以后找到了原因,在此记录一下.这个IBM的官网上说到了这一点:http://www.ibm.com/developerworks/cn/linux/l-sockpit/.详细介绍如下: bind 普遍遭遇的问题是试图绑定一个已经在使用的端口.该陷阱是也许没有活动的套接字存在,但仍然禁止绑定端口(

java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??

严重: Error starting endpoint java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í?? at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:649) at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:

Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í??错误

启动项目的时候发现tomcat跑不起来.后台输出错误Socket bind failed: [730048] ?????????×???(Э?é/???????/???)????í?? 发现是eclipse死了之后重新启动的.原来的那个还在进程中,实际上就是启用了2个tomcat.但是共用了一个端口.所以报这个错. 解决办法:在进程中杀掉tomcat重新启动eclipse,或者直接注销用户!

kvm打开虚拟机失败Failed to bindsocket: No such file or directory

kvm打开虚拟机失败Failed to bindsocket: No such file or directory 使用virt-manger克隆一个虚拟机,再打开虚拟机失败,失败错误如下: Error starting domain: internal error:process exited while connecting to monitor: 2016-09-23T11:25:02.302266Zqemu-kvm: -chardevsocket,id=charchannel0,path

干货分享: 长达250页的Libvirt Qemu KVM的ppt,不实验无真相

<iframe height=570 width=100% scrolling="no" src="http://share.csdn.net/frame/9070" frameborder=0 allowfullscreen></iframe> 1. 概论 1.1 虚拟化的基本类型 无虚拟化 半虚拟化Paravirtualization 非硬件辅助全虚拟化 硬件辅助全虚拟化 实验一:查看系统是否支持硬件辅助虚拟化 1.2 KVM Qemu