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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FTP Issue

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hai All,

I am using "org.apache.commons.net.ftp.FTPClient" jar file to upload the files in FTP server.I tested standalone java application in my local system its working fine and files are placed in FTP server also.
But in production its not working.
When run command prompt with same FTP user name and password in production,it connects FTP server and places the files FTP also . But when run my standalone application connection is created succesfully but when transfer the file


"connection refused","java.net.connect Exception " is comming on following line.

"flag=fclient.storeFile("/" + strftpdir + "/" + strFileName,
is);"

The same code working fine in my local machine.Please help me to solve the issue. This is very urgent, because error in production server.

Please help Me,
Thanks in Advance,
Abiramkumar
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hai All,

Please give me any sugesstion.

Thanks and Regards,
Abiramkumar
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Where is the FTP Server located? Is it in a different subnet/network as that of your local machine?
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Dear Raghavan,

Thanks for your reply, two servers are different network.

Thanks and Regards,
Abiramkumar.P
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Dear All,

Finally i solved ftp issue.

Regards,
Abiram kumar
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Dear All,

Finally i solved ftp issue.

Regards,
Abiram kumar
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Friends,
Thanks for all replys!!!

Still i have a problem in production server.I have an one doubt,Please clarrify.
When cronjob runs, PWD shows following path.



My main class is in Datasync.jar, i set in CLASSPATH.My modified sh file as below,



When run manually in runtime folder it is running fine.So i added following two lines in sh file.



When cronjob run it goes to " data/userhome/wmsuser/ " So i used cd / to travell to root directory and moved to runtime package. This is right or how to give correct path.Please correct me.

Where i can see cronjob log file.

Please help me to solve this problem.
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Sorry ,by mistaken i posted in I/O and stream ,Same question i posted in " Linux / UNIX " Please dont reply here.

Thanks and Regards,
Abiramkumar.P
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic