Truststore not working after export

One Star

Truststore not working after export

Hi all,
I created a job that moves data from a Mongo (SSL) to Postgres.
Because Mongo uses SSL I had to create a truststore, I did this and when executing the job locally (on my Windows computer) everything works perfectly. The problems start when exporting the job and executing the .sh on my Ubuntu dev machine.
Exception in component tMongoDBConnection_1
com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=
        at com.mongodb.BaseCluster.getDescription(BaseCluster.java:128)
        at com.mongodb.DBTCPConnector.getClusterDescription(DBTCPConnector.java:402)
        at com.mongodb.DBTCPConnector.getAddress(DBTCPConnector.java:333)
        at com.mongodb.Mongo.getAddress(Mongo.java:455)
        at mongo_postgres.upgrades_0_2.Upgrades.tMongoDBConnection_1Process(Upgrades.java:686)
        at mongo_postgres.upgrades_0_2.Upgrades.tSetKeystore_1Process(Upgrades.java:570)
        at mongo_postgres.upgrades_0_2.Upgrades$3.run(Upgrades.java:6384)

I can't seem to connect. The context parameters are set for remote execution (different IP and port).
This seems to be the problem: Before exporting I manually change the path of the truststore to a different one, even setting this path to a non-existing path still gives this same error (and not a truststore not found error). What is going on? Any help is appreciated.
Thanks in advance,
S.
One Star

Re: Truststore not working after export

Sorry for the triple post, please remove the duplicate topics.
One Star

Re: Truststore not working after export

Additional info:
Adding the .pem certificate to my cacerts in jvm still gives the same error:
keytool -import -noprompt -trustcacerts -alias Mongo1 -file ca.pem -keystore /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts
In talend:
Location of truststore: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts
Password: changeit
Moderator

Re: Truststore not working after export

Hi,
We have replied to your another topic:https://www.talendforge.org/forum/viewtopic.php?id=54786. Could you please take a look at it?
In addition, are you using Open JDK in your machine? So far, talend don't support Open JDK .
Please refer to online document about:https://help.talend.com/search/all?query=Java&content-lang=en
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Truststore not working after export

Thanks xdshi, this was the solution. I completely removed java and installed the java-8-oracle package on ubuntu. This solved the problem for me!