Pipe creation problem: From Java app using rsync + ssh on windows with cygwin

Derek OKeeffe derek0207 at gmail.com
Wed Mar 25 22:38:56 GMT 2009


Thanks Michael,
Yes Its outputing to the java Process's input stream. This normally works.
It works fine in linux.
Maybe a problem with cygwin...

I tried removing the -progress to see if it would help but to no avail.

I think its happening when rsync is opening the ssh pipe to the remote host.

Derek

On Wed, Mar 25, 2009 at 10:33 PM, Michael Chletsos <mpchlets at gmail.com>wrote:

> Are you properly opening up your pipe to output?  cause --progress
> wants to output to something, what are you outputing to?
>
> On Wed, Mar 25, 2009 at 3:46 PM, Derek OKeeffe <derek0207 at gmail.com>
> wrote:
> > Hello,
> >
> > I'm having trouble calling rsync from java on windows vista with cygwin
> > installed.
> > Its strange as pasting the exact same command into a command shell works
> > fine.
> >
> > My test java call looks like this.
> >
> > String[] envVars = {"PATH=c:/cygwin/bin;%PATH%"};
> > File workingDir = new File("c:/cygwin/bin/");
> > Process p = Runtime.getRuntime().exec("c:/cygwin/bin/rsync.exe -verbose
> -r
> > -t -v --progress -e ssh /cygdrive/c/Users/dokeeffe/workspace/jrsync/
> > www.servername.net:/home/dokeeffe/rsync/",envVars,workingDir);
> >
> > Then I start 2 stream reader threads to capture and log the inputStream
> and
> > errorStream of the Process p.
> >
> > Here is the output....
> > DEBUG: com.mddc.client.rsync.StreamGobbler - opening connection using:
> ssh
> > www.derekokeeffe.net rsync --server -vvtre.iLs . /home/dokeeffe/rsync/
> > DEBUG: com.mddc.client.rsync.StreamGobbler - rsync: pipe: Operation not
> > permitted (1)
> > DEBUG: com.mddc.client.rsync.StreamGobbler - rsync error: error in IPC
> code
> > (code 14) at
> /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/pipe.c(57)
> > [sender=3.0.4]
> >
> > The rsync code where the error happens is pipe.c(57) which is this.
> >     if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) {
> >         rsyserr(FERROR, errno, "pipe");
> >         exit_cleanup(RERR_IPC);
> >     }
> >
> > So for some reason fd_pair(to_child_pipe) is < 0 or
> fd_pair(from_child_pipe)
> > < 0.
> >
> > If anyone has any suggestions it would be great as I'm stuck now.
> > Thanks,
> > Derek
> >
> >
> > --
> > Please use reply-all for most replies to avoid omitting the mailing list.
> > To unsubscribe or change options:
> > https://lists.samba.org/mailman/listinfo/rsync
> > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html<http://www.catb.org/%7Eesr/faqs/smart-questions.html>
> >
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list