Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Getting the error "Exceeds Task Time-out of 120000s waiting for end prompt"  RSS feed

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new to SSH sessions. My aim is to connect to remote unix server and execute my scripts over there. I'm using SSH sessions(secure-inet factory API) to achieve this. The (unix)script I put on server, just copies a file (the file name I'm passing from java code) from one location to another location on the server.
I'm able to connect & my code is working fine for small files say < 100 MB. When file size is more than that, I'm getting "Exceeds Task Time-out of 120000s waiting for end prompt" error & I'm not able to proceed further.
Any help would really be appreciated.
Thanks in advance.
 
Sheriff
Posts: 12749
211
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Santosh,
Have you looked at the API docs for the Secure iNet component(s) you're using? I'm guessing the answer might be somewhere in there - Secure iNet Javadocs.
 
santosh batta
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Junilu,
Thank you for your response. Yes, I've gone through the API. I tried all the possible methods in there. Below are what I tried...

session.send(cmd); // normal scenario
session.sendWait(cmd,"$",<time in millisec>);

where cmd = "./<my script>"

1. When I use the first method, I'm able to copy max. 40MB
2. When I use the second method, I'm able to copy max. 500MB. Here the error message would be those many ms I specify in sendWait() method.

But, in my case, I would not be able to know, what the file volume is & this method needs to be executed in a loop. So, I wanted the session to last long enough to make sure all the files copied successfully.
 
Junilu Lacar
Sheriff
Posts: 12749
211
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any particular reason you want to wait? I see there's a sendNoWait method. I take it that this one is a "fire and forget" type call, may be like nohup-ing the command. You might use this one, then have your script include updating a status of some kind that you can periodically check.
 
santosh batta
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I may forget, still I remember I used this method as well. Anyway, let me try this again. Thanks for the update Junilu.
 
santosh batta
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I just tried out with sendNoWait(), still getting the same error. I'm running out of ideas at the moment. Can you help me out?
 
santosh batta
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Atleast I want to know, what are the possible conditions for this error to occur so that, I can dig into my code & rectify it. Any help please?
 
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

santosh batta wrote:2. When I use the second method, I'm able to copy max. 500MB. Here the error message would be those many ms I specify in sendWait() method.


Then why not set the time based on the amount of data that needs to be copied? I'm sure you can come up with some reasonable overestimate.

However, I'm very surprised you get the same error with sendNoWait(). That would suggest that there's some upper limit on how long a command is allowed to execute for, which seems kind of arbitrary.

I guess my question would be: why do you need to copy more than 500Mb? That would suggest a design issue to me.

Winston

 
santosh batta
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Winston,
Thanks for the look. As I mentioned earlier, I would not know anything about the server files like the size,format and no. of files on the server location etc. I'm actually designing a tool, to serve my purpose of manual copy of files on unix box. I want to do it from this tool to copy files from the java code. I really can't comment on the design level issues. Could you please tell me what exactly is causing the error in question? probably I can workout based on that. Thanks a lot for your insight.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!