Rsync through java program - issues with remote connection failure


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Rsync through java program - issues with remote connection failure
# 1  
Old 12-08-2011
Rsync through java program - issues with remote connection failure

Hi Everybody,

I am running rsync through my java application.

The Java application will sync the files with remote machine. During our connection failure testing we noticed an issue running rsync through java program. The java application which is running at source side is not receiving any error message if there are any connection issues during the sync process.

Brief details about the test scenario:

1. We run the Java Program
2. The java program starts the rsync command and sync the large number of files from source to remote destination
3. During the sync process we run the ps -ef | grep rsync to check whether the processes are running or not at both(source and dest) side. Both side rsync processes are running.
4. We identify the rsync process id at target machine and kill the process with Kill -9 <pid>
5. The java code didn't receive any error message and didn't exit. It just hanged.
6. And also noticed that the rsync process is still running at source side and rsync process is also not printing any log message in the log file.

Note : If we run the rsync command directly (not through java program) , then everything is working fine. When we stop the rsync process at target the source process will be stopped.



Through perl its working fine. Not sure what the problem with java...!!!



I don't have any clues to debug this issue.
Please share your thoughts and pointer to debug.


execuse me if i confused you .


Thanks !!
# 2  
Old 12-08-2011
Are you logging the error output of the java application? it may have thrown an exception which wasn't caught or got caught by something which didn't handle it properly.
# 3  
Old 12-08-2011
Yes, I am handling exceptions and logging the error message. When RSYNC terminated at target, the Java program and RSYNC is not detecting that the target has issues. No log files written , Java program will hang and becomes unresponsive.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Rsync Issues

Hi I am running several syncs from different servers to our data centre. I am getting some issues with the rsyncs that i am running. The OS are all red hat enterprise The rsync command is as follows #!/bin/bash if then rsync -aWv --stats progress --delete --ignore-errors --exclude... (0 Replies)
Discussion started by: treds
0 Replies

2. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

3. Shell Programming and Scripting

rsync with e-mail notification failure

dear all, i have script rsync like this : #!/bin/sh RSYNC=/usr/bin/rsync SSH=/usr/bin/ssh RUSER=root RHOST=123.123.123.1 INTRPATH=/home/jargo/log/internasional/ INTHPATH=/var/www/international/ IIXRPATH=/home/jargo/log/iix/ IIXHPATH=/var/www/iix/ TTLRPATH=/home/jargo/log/total/... (2 Replies)
Discussion started by: indracyd
2 Replies

4. Solaris

rsync - remote connection error

Hi , We have installed rsync in two Solaris boxes, when we try to sync files from one machine to another.. it is giving the following error. ld.so.1: rsync: fatal: libiconv.so.2: open failed: No such file or directory rsync: connection unexpectedly closed (0 bytes received so far) rsync... (1 Reply)
Discussion started by: MVEERA
1 Replies

5. Shell Programming and Scripting

Retrying a remote connection after failure

Hi all, I am new to this forum and want an urgent help from you experts. I am currently using SunOs 5.10. I have a .cfi file which contains some commands to be executed in a node(MSC node in telecom) To connect to a node (for eg node name is MSC1) we have a shell script that has the... (5 Replies)
Discussion started by: interceptor16
5 Replies

6. Shell Programming and Scripting

rsync multiple remote directories one connection

Hi, I want to specify multiple remote directories but want to transfer them in a single command with one connection with remote server. e.g. rsync -vrt --size-only --delete user@host:/home/user1/dir1 user@host:/home/user1/dir2 user@host:/home/user1/dir3 .... local_dir/ I want to... (0 Replies)
Discussion started by: sardare
0 Replies

7. Solaris

How to invoke remote java program from ssh

How can i invoke java program from MC1, when I connect remotely to execute can I set classpath etc. ____________ <-------------->____________________ |..................|<-------------->|...............................| |..................|<-------------->|...............................|... (2 Replies)
Discussion started by: vishnu559
2 Replies

8. UNIX for Dummies Questions & Answers

Remote connection to HP-UX from Linux, GUI issues.

Not sure if that's the best thread title... anyway, working remotely on a HP-UX machine I often need a GUI window when executing remote software installs, and for this I use Cygwin/X on my Windows laptop which works perfectly. Connect via telnet, set DISPLAY, run installer, GUI appears locally -... (3 Replies)
Discussion started by: stefcha
3 Replies

9. UNIX for Dummies Questions & Answers

Connection problem with gui java program to postgreaql database using unix

Having problem in connecting my gui java program to postgreaql database. I first used setenv classpath /home/share/postgresql/java/postgresql.jar:proj1, where proj1 is my folder conatining all java and class file, to set classpath. Then javac *.java. Then java proj1.Login. It gives me... (2 Replies)
Discussion started by: uci
2 Replies

10. UNIX for Advanced & Expert Users

ssh/sftp failure connection

Hello, I just want to ask regarding the meaning of the error that we got using sftp: Connecting to <TARGET SERVER IP>... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @... (3 Replies)
Discussion started by: james_falco
3 Replies
Login or Register to Ask a Question