One Star

problem downloading file from https

hello all,
i can download demo file from talend HTTP server. But the problem is
i am having trouble download file using tFileFetch from an HTTPS server.
The task is fairly simple.
download a csv file from HTTPS server using https protocol.
https://xxx.xxx.xxx.xxx/abcd.csv with
when i try to run, it is giving me 'SSL Exception' 'plaintext connection' errors.
I am behind a proxy server, and in advanced setting put all the proxy setting. i.e.
I've added talend in the firewall exception. but still no success.
if anybody has a solution or suggestion. or some other trick to download this file.
Talend version : TOS-All-r50363-V4.1.1


the error is --->
May 20, 2011 6:48:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLException) caught when processing request: Unrecognized SSL message, plaintext connection?
May 20, 2011 6:48:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
May 20, 2011 6:48:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLException) caught when processing request: Unrecognized SSL message, plaintext connection?
May 20, 2011 6:48:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
May 20, 2011 6:48:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLException) caught when processing request: Unrecognized SSL message, plaintext connection?
May 20, 2011 6:48:01 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Exception in component tFileFetch_1
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:502)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at daily.test_ftp2_0_1.test_ftp2.tFileFetch_1Process(test_ftp2.java:385)
at daily.test_ftp2_0_1.test_ftp2.runJobInTOS(test_ftp2.java:658)
at daily.test_ftp2_0_1.test_ftp2.main(test_ftp2.java:529)
10 REPLIES
One Star

Re: problem downloading file from https

Hello,
Do you solved your problem ?
I have the same issue ...
Regards,
Stef
Seventeen Stars

Re: problem downloading file from https

hi,
have a look at solution find for same exception with tSetProxy.
http://www.talendforge.org/forum/viewtopic.php?id=15073
hope it helps
regards
laurent
One Star

Re: problem downloading file from https

Hi kzone,
Thank you for your answer.
I tried but I still have a problem :
30 août 2013 09:06:18 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
30 août 2013 09:06:18 org.apache.commons.httpclient.HttpMethodBase readResponseBody
INFO: Response content length is not known
30 août 2013 09:06:19 org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
30 août 2013 09:06:19 org.apache.commons.httpclient.HttpMethodDirector processAuthenticationResponse
GRAVE: Invalid challenge: Basic
org.apache.commons.httpclient.auth.MalformedChallengeException: Invalid challenge: Basic
at org.apache.commons.httpclient.auth.AuthChallengeParser.extractParams(AuthChallengeParser.java:97)
at org.apache.commons.httpclient.auth.RFC2617Scheme.processChallenge(RFC2617Scheme.java:93)
at org.apache.commons.httpclient.auth.BasicScheme.processChallenge(BasicScheme.java:111)
at org.apache.commons.httpclient.auth.AuthChallengeProcessor.processChallenge(AuthChallengeProcessor.java:161)
at org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChallenge(HttpMethodDirector.java:689)
at org.apache.commons.httpclient.HttpMethodDirector.processAuthenticationResponse(HttpMethodDirector.java:663)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:192)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at integration_conso_dwh.test_0_1.test.tFileFetch_1Process(test.java:641)
at integration_conso_dwh.test_0_1.test.tSetProxy_1Process(test.java:844)
at integration_conso_dwh.test_0_1.test$1.run(test.java:1139)
Exception in component tFileFetch_1
java.lang.Exception: Method failed: HTTP/1.1 401 Unauthorized
at integration_conso_dwh.test_0_1.test.tFileFetch_1Process(test.java:676)
at integration_conso_dwh.test_0_1.test.tSetProxy_1Process(test.java:844)
at integration_conso_dwh.test_0_1.test$1.run(test.java:1139).

I can't download my xml file from HTTPS server using https protocol with username,password.
Do you have any idea please ?
Regards,
Stef
Community Manager

Re: problem downloading file from https

Hi Stef_el
java.lang.Exception: Method failed: HTTP/1.1 401 Unauthorized

It is a 401 Unauthorized error, authentication is required when trying to access the resource, but it fails in this case, can you download the file on browser with this username/password?
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: problem downloading file from https

Hi Shong,
I can see the XML response on my brother with this username/password.
Do you think I have to contact the people in charge of the https in order they change the right of the username ?
Regards,
Stef
Community Manager

Re: problem downloading file from https

Hi Shong,
I can see the XML response on my brother with this username/password.
Do you think I have to contact the people in charge of the https in order they change the right of the username ?
Regards,
Stef

You just get XML response, not download the file when you type in the URL on browser? What's the content of response? Is it the content of the XML file which you are trying to download?
In the mean time, go to check if this username is authorized to download the file?
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: problem downloading file from https

Shong,
Yes, I just get XML response in the URL on browser.
But what I need is to save the content of this xml on my computer.
I have to contact the people in charge of this url in order to know if the username have the right to donwload the file ...
Regards,
Stef
One Star

Re: problem downloading file from https

Shong,
I've checked with the people in charge of this url and for them, there is no problem with the rights as I can see the response on browser.
Regards,
Stef
One Star

Re: problem downloading file from https

Shong,

I've seen with people in charge of this url, and they have noticed that the user/password is pass in the header http but also in the URL.
For them, there is a conflict and I should just pass the authentification by the header http. There is something in the tFileFecth which add automatically the authentifcation in the URL.
Do you know what ?

Regards,
Stephane
One Star

Re: problem downloading file from https

I am using tFileFetch to download an excel from a url which needs username and password for login.
But I get the following message in the excel file downloaded.
This page is used to hold your data while you are being authorized for your request.

You will be forwarded to continue the authorization process. If this does not happen automatically, please click the Continue button below.

How to solve this?. Please help asap.