How to solve the error of the rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
up vote
0
down vote
favorite
I'm using a command of rsync for making a new directory to save the images the command is "rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
but while running my code this command will gives me the error the error is
Error:
exit status 14: rsync: Failed to exec --rsync-path=mkdir: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(235) [sender=3.1.2]
Edit
func CopyUploadedFileToAppServers(filePath, path string) {
ExecuteCommand("rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path)
}
func ExecuteCommand(command string) error{
cmd := exec.Command("sh", "-c",command)
var out bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &stderr
err := cmd.Run()
if err != nil {
fmt.Println(fmt.Sprint(err) + ": " + stderr.String())
return err
}
fmt.Println("Result: " + out.String())
return nil
}
How can I solve this error?
ubuntu go rsync mkdir
New contributor
add a comment |
up vote
0
down vote
favorite
I'm using a command of rsync for making a new directory to save the images the command is "rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
but while running my code this command will gives me the error the error is
Error:
exit status 14: rsync: Failed to exec --rsync-path=mkdir: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(235) [sender=3.1.2]
Edit
func CopyUploadedFileToAppServers(filePath, path string) {
ExecuteCommand("rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path)
}
func ExecuteCommand(command string) error{
cmd := exec.Command("sh", "-c",command)
var out bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &stderr
err := cmd.Run()
if err != nil {
fmt.Println(fmt.Sprint(err) + ": " + stderr.String())
return err
}
fmt.Println("Result: " + out.String())
return nil
}
How can I solve this error?
ubuntu go rsync mkdir
New contributor
In ExecuteCommand func replacecmd := exec.Command("sh", "-c",command)
withcm := string{"-c"} cm = append(cm, strings.Split(command, " ")...) cmd := exec.Command("sh", cm...)
– hoque
4 hours ago
@hoque the solution you tell I applied it into my code and run but It gives me error ofexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/
– user10665991
3 hours ago
Can you ensure yourrsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
command work from your pc? And also it will be easy to me if you give the value of the variable, so that i can check.
– hoque
3 hours ago
@hoque I run thisrsync -ave --rsync-path="mkdir -p /var/www/html/uploads/ironnetwork/ && rsync" /var/www/html/uploads/ironnetwork/1542607804image.
command directly in the terminal and it will give me the errorsending incremental file list rsync: change_dir "/var/www/html/uploads/ironnetwork" failed: No such file or directory (2)
Now Can you solve my problem?
– user10665991
3 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using a command of rsync for making a new directory to save the images the command is "rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
but while running my code this command will gives me the error the error is
Error:
exit status 14: rsync: Failed to exec --rsync-path=mkdir: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(235) [sender=3.1.2]
Edit
func CopyUploadedFileToAppServers(filePath, path string) {
ExecuteCommand("rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path)
}
func ExecuteCommand(command string) error{
cmd := exec.Command("sh", "-c",command)
var out bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &stderr
err := cmd.Run()
if err != nil {
fmt.Println(fmt.Sprint(err) + ": " + stderr.String())
return err
}
fmt.Println("Result: " + out.String())
return nil
}
How can I solve this error?
ubuntu go rsync mkdir
New contributor
I'm using a command of rsync for making a new directory to save the images the command is "rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
but while running my code this command will gives me the error the error is
Error:
exit status 14: rsync: Failed to exec --rsync-path=mkdir: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(235) [sender=3.1.2]
Edit
func CopyUploadedFileToAppServers(filePath, path string) {
ExecuteCommand("rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path)
}
func ExecuteCommand(command string) error{
cmd := exec.Command("sh", "-c",command)
var out bytes.Buffer
var stderr bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &stderr
err := cmd.Run()
if err != nil {
fmt.Println(fmt.Sprint(err) + ": " + stderr.String())
return err
}
fmt.Println("Result: " + out.String())
return nil
}
How can I solve this error?
ubuntu go rsync mkdir
ubuntu go rsync mkdir
New contributor
New contributor
edited 4 hours ago
New contributor
asked 5 hours ago
user10665991
33
33
New contributor
New contributor
In ExecuteCommand func replacecmd := exec.Command("sh", "-c",command)
withcm := string{"-c"} cm = append(cm, strings.Split(command, " ")...) cmd := exec.Command("sh", cm...)
– hoque
4 hours ago
@hoque the solution you tell I applied it into my code and run but It gives me error ofexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/
– user10665991
3 hours ago
Can you ensure yourrsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
command work from your pc? And also it will be easy to me if you give the value of the variable, so that i can check.
– hoque
3 hours ago
@hoque I run thisrsync -ave --rsync-path="mkdir -p /var/www/html/uploads/ironnetwork/ && rsync" /var/www/html/uploads/ironnetwork/1542607804image.
command directly in the terminal and it will give me the errorsending incremental file list rsync: change_dir "/var/www/html/uploads/ironnetwork" failed: No such file or directory (2)
Now Can you solve my problem?
– user10665991
3 hours ago
add a comment |
In ExecuteCommand func replacecmd := exec.Command("sh", "-c",command)
withcm := string{"-c"} cm = append(cm, strings.Split(command, " ")...) cmd := exec.Command("sh", cm...)
– hoque
4 hours ago
@hoque the solution you tell I applied it into my code and run but It gives me error ofexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/
– user10665991
3 hours ago
Can you ensure yourrsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
command work from your pc? And also it will be easy to me if you give the value of the variable, so that i can check.
– hoque
3 hours ago
@hoque I run thisrsync -ave --rsync-path="mkdir -p /var/www/html/uploads/ironnetwork/ && rsync" /var/www/html/uploads/ironnetwork/1542607804image.
command directly in the terminal and it will give me the errorsending incremental file list rsync: change_dir "/var/www/html/uploads/ironnetwork" failed: No such file or directory (2)
Now Can you solve my problem?
– user10665991
3 hours ago
In ExecuteCommand func replace
cmd := exec.Command("sh", "-c",command)
with cm := string{"-c"} cm = append(cm, strings.Split(command, " ")...) cmd := exec.Command("sh", cm...)
– hoque
4 hours ago
In ExecuteCommand func replace
cmd := exec.Command("sh", "-c",command)
with cm := string{"-c"} cm = append(cm, strings.Split(command, " ")...) cmd := exec.Command("sh", cm...)
– hoque
4 hours ago
@hoque the solution you tell I applied it into my code and run but It gives me error of
exit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/
– user10665991
3 hours ago
@hoque the solution you tell I applied it into my code and run but It gives me error of
exit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/
– user10665991
3 hours ago
Can you ensure your
rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
command work from your pc? And also it will be easy to me if you give the value of the variable, so that i can check.– hoque
3 hours ago
Can you ensure your
rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
command work from your pc? And also it will be easy to me if you give the value of the variable, so that i can check.– hoque
3 hours ago
@hoque I run this
rsync -ave --rsync-path="mkdir -p /var/www/html/uploads/ironnetwork/ && rsync" /var/www/html/uploads/ironnetwork/1542607804image.
command directly in the terminal and it will give me the error sending incremental file list rsync: change_dir "/var/www/html/uploads/ironnetwork" failed: No such file or directory (2)
Now Can you solve my problem?– user10665991
3 hours ago
@hoque I run this
rsync -ave --rsync-path="mkdir -p /var/www/html/uploads/ironnetwork/ && rsync" /var/www/html/uploads/ironnetwork/1542607804image.
command directly in the terminal and it will give me the error sending incremental file list rsync: change_dir "/var/www/html/uploads/ironnetwork" failed: No such file or directory (2)
Now Can you solve my problem?– user10665991
3 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
You need to remove the -e
option, as this is taking the following work (--rsync-path=...
) as the replacement for the ssh command. For example,
$ rsync -ave --x_x /tmp/a abc@localhost:/tmp/y
rsync: Failed to exec --x_x: No such file or directory (2)
Just use -av
.
As you say @meuh I remove the flag-e
and then I run the command then it will give me the errorexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
– user10665991
2 hours ago
exit 1 is a syntax error in the arguments. Perhaps yourpath
orfilePath
strings have characters that are being interpreted by the shell. Try adding-x
in your ExecuteCommand, (cmd := exec.Command("sh", "-xc",command)
) to see what is actually being passed to rsync.
– meuh
2 hours ago
now it will print thisexit status 1: + rsync rsync version 3.1.2 protocol version 31
– user10665991
2 hours ago
I don't know the go language, so I cannot help you with this. You are not getting the entire error message. Perhaps you introduced a typing error when you converted the-ave
to-av
.
– meuh
2 hours ago
Can you tell me how I run this command successfully on ubuntu terminal? @meuh
– user10665991
2 hours ago
|
show 5 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You need to remove the -e
option, as this is taking the following work (--rsync-path=...
) as the replacement for the ssh command. For example,
$ rsync -ave --x_x /tmp/a abc@localhost:/tmp/y
rsync: Failed to exec --x_x: No such file or directory (2)
Just use -av
.
As you say @meuh I remove the flag-e
and then I run the command then it will give me the errorexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
– user10665991
2 hours ago
exit 1 is a syntax error in the arguments. Perhaps yourpath
orfilePath
strings have characters that are being interpreted by the shell. Try adding-x
in your ExecuteCommand, (cmd := exec.Command("sh", "-xc",command)
) to see what is actually being passed to rsync.
– meuh
2 hours ago
now it will print thisexit status 1: + rsync rsync version 3.1.2 protocol version 31
– user10665991
2 hours ago
I don't know the go language, so I cannot help you with this. You are not getting the entire error message. Perhaps you introduced a typing error when you converted the-ave
to-av
.
– meuh
2 hours ago
Can you tell me how I run this command successfully on ubuntu terminal? @meuh
– user10665991
2 hours ago
|
show 5 more comments
up vote
0
down vote
You need to remove the -e
option, as this is taking the following work (--rsync-path=...
) as the replacement for the ssh command. For example,
$ rsync -ave --x_x /tmp/a abc@localhost:/tmp/y
rsync: Failed to exec --x_x: No such file or directory (2)
Just use -av
.
As you say @meuh I remove the flag-e
and then I run the command then it will give me the errorexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
– user10665991
2 hours ago
exit 1 is a syntax error in the arguments. Perhaps yourpath
orfilePath
strings have characters that are being interpreted by the shell. Try adding-x
in your ExecuteCommand, (cmd := exec.Command("sh", "-xc",command)
) to see what is actually being passed to rsync.
– meuh
2 hours ago
now it will print thisexit status 1: + rsync rsync version 3.1.2 protocol version 31
– user10665991
2 hours ago
I don't know the go language, so I cannot help you with this. You are not getting the entire error message. Perhaps you introduced a typing error when you converted the-ave
to-av
.
– meuh
2 hours ago
Can you tell me how I run this command successfully on ubuntu terminal? @meuh
– user10665991
2 hours ago
|
show 5 more comments
up vote
0
down vote
up vote
0
down vote
You need to remove the -e
option, as this is taking the following work (--rsync-path=...
) as the replacement for the ssh command. For example,
$ rsync -ave --x_x /tmp/a abc@localhost:/tmp/y
rsync: Failed to exec --x_x: No such file or directory (2)
Just use -av
.
You need to remove the -e
option, as this is taking the following work (--rsync-path=...
) as the replacement for the ssh command. For example,
$ rsync -ave --x_x /tmp/a abc@localhost:/tmp/y
rsync: Failed to exec --x_x: No such file or directory (2)
Just use -av
.
answered 3 hours ago
meuh
4,7491427
4,7491427
As you say @meuh I remove the flag-e
and then I run the command then it will give me the errorexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
– user10665991
2 hours ago
exit 1 is a syntax error in the arguments. Perhaps yourpath
orfilePath
strings have characters that are being interpreted by the shell. Try adding-x
in your ExecuteCommand, (cmd := exec.Command("sh", "-xc",command)
) to see what is actually being passed to rsync.
– meuh
2 hours ago
now it will print thisexit status 1: + rsync rsync version 3.1.2 protocol version 31
– user10665991
2 hours ago
I don't know the go language, so I cannot help you with this. You are not getting the entire error message. Perhaps you introduced a typing error when you converted the-ave
to-av
.
– meuh
2 hours ago
Can you tell me how I run this command successfully on ubuntu terminal? @meuh
– user10665991
2 hours ago
|
show 5 more comments
As you say @meuh I remove the flag-e
and then I run the command then it will give me the errorexit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
– user10665991
2 hours ago
exit 1 is a syntax error in the arguments. Perhaps yourpath
orfilePath
strings have characters that are being interpreted by the shell. Try adding-x
in your ExecuteCommand, (cmd := exec.Command("sh", "-xc",command)
) to see what is actually being passed to rsync.
– meuh
2 hours ago
now it will print thisexit status 1: + rsync rsync version 3.1.2 protocol version 31
– user10665991
2 hours ago
I don't know the go language, so I cannot help you with this. You are not getting the entire error message. Perhaps you introduced a typing error when you converted the-ave
to-av
.
– meuh
2 hours ago
Can you tell me how I run this command successfully on ubuntu terminal? @meuh
– user10665991
2 hours ago
As you say @meuh I remove the flag
-e
and then I run the command then it will give me the error exit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
– user10665991
2 hours ago
As you say @meuh I remove the flag
-e
and then I run the command then it will give me the error exit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
– user10665991
2 hours ago
exit 1 is a syntax error in the arguments. Perhaps your
path
or filePath
strings have characters that are being interpreted by the shell. Try adding -x
in your ExecuteCommand, (cmd := exec.Command("sh", "-xc",command)
) to see what is actually being passed to rsync.– meuh
2 hours ago
exit 1 is a syntax error in the arguments. Perhaps your
path
or filePath
strings have characters that are being interpreted by the shell. Try adding -x
in your ExecuteCommand, (cmd := exec.Command("sh", "-xc",command)
) to see what is actually being passed to rsync.– meuh
2 hours ago
now it will print this
exit status 1: + rsync rsync version 3.1.2 protocol version 31
– user10665991
2 hours ago
now it will print this
exit status 1: + rsync rsync version 3.1.2 protocol version 31
– user10665991
2 hours ago
I don't know the go language, so I cannot help you with this. You are not getting the entire error message. Perhaps you introduced a typing error when you converted the
-ave
to -av
.– meuh
2 hours ago
I don't know the go language, so I cannot help you with this. You are not getting the entire error message. Perhaps you introduced a typing error when you converted the
-ave
to -av
.– meuh
2 hours ago
Can you tell me how I run this command successfully on ubuntu terminal? @meuh
– user10665991
2 hours ago
Can you tell me how I run this command successfully on ubuntu terminal? @meuh
– user10665991
2 hours ago
|
show 5 more comments
user10665991 is a new contributor. Be nice, and check out our Code of Conduct.
user10665991 is a new contributor. Be nice, and check out our Code of Conduct.
user10665991 is a new contributor. Be nice, and check out our Code of Conduct.
user10665991 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53369009%2fhow-to-solve-the-error-of-the-rsync-error-error-in-ipc-code-code-14-at-pipe-c%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
In ExecuteCommand func replace
cmd := exec.Command("sh", "-c",command)
withcm := string{"-c"} cm = append(cm, strings.Split(command, " ")...) cmd := exec.Command("sh", cm...)
– hoque
4 hours ago
@hoque the solution you tell I applied it into my code and run but It gives me error of
exit status 1: rsync version 3.1.2 protocol version 31 Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others. Web site: http://rsync.samba.org/
– user10665991
3 hours ago
Can you ensure your
rsync -ave --rsync-path='mkdir -p " + path + " && rsync' " + filePath + " ubuntu@" + LocalhostIp + ":" + path
command work from your pc? And also it will be easy to me if you give the value of the variable, so that i can check.– hoque
3 hours ago
@hoque I run this
rsync -ave --rsync-path="mkdir -p /var/www/html/uploads/ironnetwork/ && rsync" /var/www/html/uploads/ironnetwork/1542607804image.
command directly in the terminal and it will give me the errorsending incremental file list rsync: change_dir "/var/www/html/uploads/ironnetwork" failed: No such file or directory (2)
Now Can you solve my problem?– user10665991
3 hours ago