OpenVZ Forum


Home » General » Support » **Bug 343-Workaround** vzmigrate error upon failback - /dev/stdout: No such device or address
**Bug 343-Workaround** vzmigrate error upon failback - /dev/stdout: No such device or address [message #8129] Wed, 08 November 2006 20:45 Go to next message
jmeek is currently offline  jmeek
Messages: 9
Registered: July 2006
Junior Member

I have two hosts on the same local network, same version of OpenVZ (2.6.9-023stab032.1-smp), the main host (HARPALYKE) is running 20+ VMs without a problem. The other system (OTHOSIE) can create VMs and run them as expected.

I can vzmigrate a VM from the main to the secondary and after the ARP tables on the switch update it works perfectly but when I try to fail back I get this error:

[/]# vzmigrate -r no -v harpalyke 121
OPT:-r
OPT:-v
OPT:harpalyke
Starting migration of VE 121 on harpalyke
bash: /dev/stdout: No such device or address
OpenVZ is not running on the target machine
Can't continue migration

I don't know where to go from here. Please help me understand why on two identical machines I can fail one way but cannot fail back ..


[Updated on: Fri, 10 November 2006 17:48]

Report message to a moderator

Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8160 is a reply to message #8129] Thu, 09 November 2006 16:45 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Can you please post here output of
ls /dev/stdout -l
on both servers.
What distrib is installed on servers?


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8176 is a reply to message #8160] Thu, 09 November 2006 17:16 Go to previous messageGo to next message
jmeek is currently offline  jmeek
Messages: 9
Registered: July 2006
Junior Member

On HARPALYKE (the working one):
[~]$ ls /dev/stdout -l
lrwxrwxrwx 1 root root 15 Nov 8 06:39 /dev/stdout -> /proc/self/fd/1

On OTHOSIE (the nonworking one)
[~]# ls /dev/stdout -l
lrwxrwxrwx 1 root root 15 Nov 8 07:07 /dev/stdout -> /proc/self/fd/1


[Updated on: Thu, 09 November 2006 17:17]

Report message to a moderator

Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8195 is a reply to message #8176] Fri, 10 November 2006 07:50 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Please post here result of "/etc/init.d/vz status" command on both servers. Actually this is the main problem, which stops migration.
What vzctl version do you use?
And what Linux distributive is installed on both servers?


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8215 is a reply to message #8195] Fri, 10 November 2006 14:42 Go to previous messageGo to next message
jmeek is currently offline  jmeek
Messages: 9
Registered: July 2006
Junior Member

both systems have VZ running, esp from the secondary to the primvary since it hosting 19 ofther VMs

The VM version on the main (was):
[harpalyke ~]$ rpm -qa |grep vzctl
vzctl-lib-3.0.10-1
vzctl-3.0.10-1

but since has been updated to match the secondary, which is:
[othosie ~]# rpm -qa |grep vzctl
vzctl-lib-3.0.12-1
vzctl-3.0.12-1

Distribution os both systems is CentOS4 for the host and VMs
Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8218 is a reply to message #8129] Fri, 10 November 2006 16:03 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

please run:
# bash -x vzmigrate -r no -v harpalyke 121


http://static.openvz.org/userbars/openvz-developer.png
Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8222 is a reply to message #8218] Fri, 10 November 2006 16:24 Go to previous messageGo to next message
jmeek is currently offline  jmeek
Messages: 9
Registered: July 2006
Junior Member

I tested two VMs, one was created on OTHOSIE and cannot migrate to HARPALYKE (VM:121) and the other came from HARPALYKE to OTHOSIE correctly but cannot return (VM:103).


Migrating 121 (A new VM created on OTHOSIE):
[root@othosie ~]# bash -x vzmigrate -r no -v harpalyke 121
+ ACT_SCRIPTS_SFX='start stop mount umount'
+ SSH_OPTIONS=
+ SSH='ssh '
+ SCP='scp '
+ online=0
+ verbose=0
+ remove_area=1
+ keep_dst=0
+ debug=0
+ out=/dev/null
+ confdir=/etc/vz/conf
+ vzconf=/etc/vz/vz.conf
+ tmpdir=/var/tmp
+ act_scripts=
+ MIG_ERR_USAGE=1
+ MIG_ERR_VPS_IS_STOPPED=2
+ MIG_ERR_CANT_CONNECT=4
+ MIG_ERR_COPY=6
+ MIG_ERR_START_VPS=7
+ MIG_ERR_STOP_SOURCE=8
+ MIG_ERR_EXISTS=9
+ MIG_ERR_NOEXIST=10
+ MIG_ERR_IP_IN_USE=12
+ MIG_ERR_QUOTA=13
+ MIG_ERR_CHECKPOINT=8
+ MIG_ERR_MOUNT_VPS=7
+ MIG_ERR_RESTORE_VPS=7
+ MIG_ERR_OVZ_NOT_RUNNING=14
+ MIG_ERR_APPLY_CONFIG=15
+ '[' 5 -lt 2 ']'
+ '[' '!' -z -r ']'
+ echo OPT:-r
OPT:-r
+ case "$1" in
+ shift
+ '[' no = yes ']'
+ '[' no = no ']'
+ remove_area=0
+ shift
+ '[' '!' -z -v ']'
+ echo OPT:-v
OPT:-v
+ case "$1" in
+ verbose=1
+ out=/dev/stdout
+ shift
+ '[' '!' -z harpalyke ']'
+ echo OPT:harpalyke
OPT:harpalyke
+ case "$1" in
+ break
+ host=harpalyke
+ shift
+ VEID=121
+ shift
+ '[' -z harpalyke -o -z 121 -o 0 -ne 0 ']'
+ vpsconf=/etc/vz/conf/121.conf
+ '[' '!' -r /etc/vz/vz.conf -o '!' -r /etc/vz/conf/121.conf ']'
++ vzctl status 121
+ get_status VEID 121 exist unmounted down
+ exist=exist
+ mounted=unmounted
+ state=down
+ '[' exist = deleted ']'
+ '[' 0 -eq 1 ']'
+ log 1 'Starting migration of VE 121 on harpalyke'
+ '[' 1 -eq 1 ']'
+ shift
+ echo -e Starting migration of VE 121 on harpalyke
Starting migration of VE 121 on harpalyke
+ ssh '-o BatchMode=yes' root@harpalyke /bin/true
+ ssh '-o BatchMode=yes' root@harpalyke '/etc/init.d/vz status &> /dev/stdout'
bash: /dev/stdout: No such device or address
+ echo 'OpenVZ is not running on the target machine'
OpenVZ is not running on the target machine
+ echo 'Can'\''t continue migration'
Can't continue migration
+ exit 14



Migrating a VM that was migrated from HARPALYKE to OTHOSIE and trying to migrate it back:
[root@othosie ~]# bash -x vzmigrate -r no -v harpalyke 103
+ ACT_SCRIPTS_SFX='start stop mount umount'
+ SSH_OPTIONS=
+ SSH='ssh '
+ SCP='scp '
+ online=0
+ verbose=0
+ remove_area=1
+ keep_dst=0
+ debug=0
+ out=/dev/null
+ confdir=/etc/vz/conf
+ vzconf=/etc/vz/vz.conf
+ tmpdir=/var/tmp
+ act_scripts=
+ MIG_ERR_USAGE=1
+ MIG_ERR_VPS_IS_STOPPED=2
+ MIG_ERR_CANT_CONNECT=4
+ MIG_ERR_COPY=6
+ MIG_ERR_START_VPS=7
+ MIG_ERR_STOP_SOURCE=8
+ MIG_ERR_EXISTS=9
+ MIG_ERR_NOEXIST=10
+ MIG_ERR_IP_IN_USE=12
+ MIG_ERR_QUOTA=13
+ MIG_ERR_CHECKPOINT=8
+ MIG_ERR_MOUNT_VPS=7
+ MIG_ERR_RESTORE_VPS=7
+ MIG_ERR_OVZ_NOT_RUNNING=14
+ MIG_ERR_APPLY_CONFIG=15
+ '[' 5 -lt 2 ']'
+ '[' '!' -z -r ']'
+ echo OPT:-r
OPT:-r
+ case "$1" in
+ shift
+ '[' no = yes ']'
+ '[' no = no ']'
+ remove_area=0
+ shift
+ '[' '!' -z -v ']'
+ echo OPT:-v
OPT:-v
+ case "$1" in
+ verbose=1
+ out=/dev/stdout
+ shift
+ '[' '!' -z harpalyke ']'
+ echo OPT:harpalyke
OPT:harpalyke
+ case "$1" in
+ break
+ host=harpalyke
+ shift
+ VEID=103
+ shift
+ '[' -z harpalyke -o -z 103 -o 0 -ne 0 ']'
+ vpsconf=/etc/vz/conf/103.conf
+ '[' '!' -r /etc/vz/vz.conf -o '!' -r /etc/vz/conf/103.conf ']'
++ vzctl status 103
+ get_status VEID 103 exist mounted running
+ exist=exist
+ mounted=mounted
+ state=running
+ '[' exist = deleted ']'
+ '[' 0 -eq 1 ']'
+ log 1 'Starting migration of VE 103 on harpalyke'
+ '[' 1 -eq 1 ']'
+ shift
+ echo -e Starting migration of VE 103 on harpalyke
Starting migration of VE 103 on harpalyke
+ ssh '-o BatchMode=yes' root@harpalyke /bin/true
+ ssh '-o BatchMode=yes' root@harpalyke '/etc/init.d/vz status &> /dev/stdout'
bash: /dev/stdout: No such device or address
+ echo 'OpenVZ is not running on the target machine'
OpenVZ is not running on the target machine
+ echo 'Can'\''t continue migration'
Can't continue migration
+ exit 14

Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8224 is a reply to message #8222] Fri, 10 November 2006 16:44 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

run the following commands from othosie:
# ssh '-o BatchMode=yes' root@harpalyke '/etc/init.d/vz status &> /dev/stdout'

does it work?
if not, then:
1. run:
# ssh '-o BatchMode=yes' root@harpalyke 'ls -la /dev/stdout'
# ssh '-o BatchMode=yes' root@harpalyke 'ls -la /proc/self/fd'

2. check /etc/passwd on harpalyke, what shell is specified for root user?


http://static.openvz.org/userbars/openvz-developer.png
Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8227 is a reply to message #8224] Fri, 10 November 2006 16:53 Go to previous messageGo to next message
jmeek is currently offline  jmeek
Messages: 9
Registered: July 2006
Junior Member

[root@othosie ~]# ssh '-o BatchMode=yes' root@harpalyke '/etc/init.d/vz status &> /dev/stdout'
bash: /dev/stdout: No such device or address

[root@othosie ~]# ssh '-o BatchMode=yes' root@harpalyke 'ls -la /dev/stdout'
lrwxrwxrwx 1 root root 15 Nov 8 06:39 /dev/stdout -> /proc/self/fd/1

[root@othosie ~]# ssh '-o BatchMode=yes' root@harpalyke 'ls -la /proc/self/fd'
total 4
dr-x------ 2 root root 0 Nov 10 10:52 .
dr-xr-xr-x 3 root root 0 Nov 10 10:52 ..
lrwx------ 1 root root 64 Nov 10 10:52 0 -> socket:[10705511]
lrwx------ 1 root root 64 Nov 10 10:52 1 -> socket:[10705511]
lrwx------ 1 root root 64 Nov 10 10:52 2 -> socket:[10705513]
lr-x------ 1 root root 64 Nov 10 10:52 3 -> /proc/4922/fd



[root@harpalyke ~]$ grep root /etc/passwd
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/sbin/nologin
Re: vzmigrate error upon failback - /dev/stdout: No such device or address [message #8229 is a reply to message #8227] Fri, 10 November 2006 17:12 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

heh, I reproduced it locally. don't know why it doesn't work yet.
but the bug is definetely here. probably somehow depends on bash or ssh version.

please, fill in a bug and use the following workaround:
edit your /usr/sbin/vzmigrate file:
- remove "&> $out" in the following fragment:

# Check if OpenVZ is running
if ! $SSH "-o BatchMode=yes" "root@$host" "/etc/init.d/vz status &> $out"; then

to get:

# Check if OpenVZ is running
if ! $SSH "-o BatchMode=yes" "root@$host" "/etc/init.d/vz status"; then


http://static.openvz.org/userbars/openvz-developer.png
Re: **Bug 343-Workaround** vzmigrate error upon failback - /dev/stdout: No such device or address [message #9436 is a reply to message #8129] Wed, 03 January 2007 06:21 Go to previous message
consultorpc is currently offline  consultorpc
Messages: 10
Registered: May 2006
Junior Member
I had exactly the same bug here.

Using the workaround seems to work ok, BTW.
Previous Topic: *SOLVED* Kernel Bug? Unable to handle kernel paging request at
Next Topic: *SOLVED* version of pre-cached OS templates for FC5
Goto Forum:
  


Current Time: Sat Nov 16 04:46:29 GMT 2024

Total time taken to generate the page: 0.03411 seconds