[CRIU] Error: #tty: Standard stream is not a terminal, aborting

Pavel Emelyanov xemul at parallels.com
Wed Oct 14 05:00:18 PDT 2015


On 10/14/2015 12:01 PM, Prashant Chillabatte wrote:
> Hi All,
> 
> I am trying to migrate a c program(process) from one nod to another node.
> Doing above running CRIU commands in shell prompt works fine.
> 
> Now i am trying to automate the process by writing the shell script.

You're welcome to join the p.haul project [1] -- it's all about automating
the live migration using criu.

[1] https://github.com/xemul/p.haul

> My script runs on the primary node say NODE1 and triggers a ssh connection to NODE2 to launch page-server.
> In the same script i run the dump command on NODE1 and on successful dumping i trigger another ssh call to run the restore command on the NODE2.
> 
> This is how i do :
> 
> ssh username at IP 'bash -s' < restore.sh 
> 
> restore.sh is another script residing on the NODE1 which triggers restore command on NODE2.
> 
> #! /bin/bash 
> 
> sudo criu restore --tree <pid> --shell-job --images-dir <path> -d
> 
> Doing so i am flashed with this below mentioned error. 
> *Error: #tty: Standard stream is not a terminal, aborting*

If you want to restore with a terminal, the program you spawn criu
from should have stdin opened as a terminal.

> *
> *
> I have read the conversation related to the same issue @
> https://lists.openvz.org/pipermail/criu/2014-September/016100.html
>  
> As suggested solution of removing option "--shell-job" i have this problem 
> *Error: #tty: Found slave peer index 2 without correspond master peer*

Yes, that's because the program you migrate has terminal at stdin. So
should it have at the restore time.

> Kindly suggested the possible solutions and work around to overcome the same.
> 
> I would really appreciate your help.

-- Pavel



More information about the CRIU mailing list