Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP connections through URLConnection fail from within private network / firewall #14

Open
sheridancbio opened this issue Jul 29, 2016 · 5 comments

Comments

@sheridancbio
Copy link
Collaborator

Code in PdbScriptsPipelineRunCommand.java may attempt to access files through a URLConnection object from the standard java library. If the url specifies the "ftp:" protocol, and if the program is running inside a private network or behind a firewall, the data connection for the ftp transfer may fail.

Luckily, all URLs in use currently come from servers which offer dual ftp/http protocol services, so we can avoid the exceptions by specifying in the URL to use http protocol. But it would be better if the code used an FTP client which had proper support for passive mode file transfers such as org.apache.commons.net.ftp.FTPClient.

Example of the error as observed:

[SHELL] Weekly Update: Create deleted list
java.io.IOException: sun.net.ftp.FtpProtocolException: PORT 172,18,233,39,194,100:500 Illegal command, EPSV ALL in effect.

at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:488)
at org.cbioportal.pdb_annotation.scripts.PdbScriptsPipelineRunCommand.readFTPfile2List(PdbScriptsPipelineRunCommand.java:348)
at org.cbioportal.pdb_annotation.scripts.PdbScriptsPipelineRunCommand.prepareUpdatePDBFile(PdbScriptsPipelineRunCommand.java:404)
at org.cbioportal.pdb_annotation.scripts.PdbScriptsPipelineRunCommand.runUpdatePDB(PdbScriptsPipelineRunCommand.java:484)
at org.cbioportal.pdb_annotation.scripts.PdbScriptsPipelineStarter.main(PdbScriptsPipelineStarter.java:123)

(local machine on wireless network was assigned IP address 172.18.233.39)

@juexinwang
Copy link
Collaborator

Get stack in this:

@sheridancbio
Copy link
Collaborator Author

We decided to push this to "Low Priority" status

@sheridancbio sheridancbio changed the title FTP connections through URLConnection fail from within private network / firewall Pri4 : FTP connections through URLConnection fail from within private network / firewall Aug 4, 2016
@juexinwang juexinwang changed the title Pri4 : FTP connections through URLConnection fail from within private network / firewall Rev4 : FTP connections through URLConnection fail from within private network / firewall Aug 10, 2016
@juexinwang
Copy link
Collaborator

I changed all ftp:// to http:// it seems work on my linux version. Please check it on Mac System

@juexinwang juexinwang removed their assignment Aug 10, 2016
@sheridancbio sheridancbio changed the title Rev4 : FTP connections through URLConnection fail from within private network / firewall FTP connections through URLConnection fail from within private network / firewall Aug 12, 2016
@sheridancbio sheridancbio removed their assignment Aug 12, 2016
@sheridancbio
Copy link
Collaborator Author

http: downloads are working on mac. Still, the "bug" is present if someone decides to point their machine at an ftp:: resource for download in the application.properties file. I will leave this issue open with low priority, but unassign it for now. We can get back to this in the future if we have time.

@tinarooot
Copy link

hello,I also encountered how to solve the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants