Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a running script in "Talend Open Studio 7.3.1" which does nothing else then get MSSQL data to transfer it to a MySQL database. In the studio everything works fine and so I build my script.
All connection data is put in Contexts and in the build menu I did choose the following parameters below.
When I run the script "importTicketing_run.sh" it on my windows-development machine with "mintty 2.7.3" it also connects to the database just fine. When I run the same script on the target Linux-server I do get the following exception:
[root@vm-***** plan]# sh /home/plan/Talend/importTicketing/importTickekting_run.sh
Exception in component tDBOutput_1 (importTickekting)
java.sql.SQLException: Access denied for user 'talend'@'vm-*****' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
On the other side I do have running talend-scripts running on this host based on talend 7.1. Also I can connect to the mysql-database with the login-name above:
[root@vm-**** plan]# mysql -u talend -p************************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1148191
Server version: 5.5.56 MySQL Community Server (GPL) by Remi
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
I actually have no clue what could went wrong ...
Hello,
@Xiaodi Shi I was not using any context variable for the database config, i always was typing password each time there is a change in the password , or only once when i create the job at first time .
also i build the job on the desktop, not in Talend folder ,which i think may have caused this issue ,it seems (maybe) the talend component in TOS once you save password it directly created an encrypted value of that password somewhere else in the talend folder so that when you run the job it decrypts it from that position and use it , but when i build it on desktop maybe it loses track of the password to be decrypted when launching the bat file ! (this was what i concluded from inspecting the java file in the build)
for now , i use password with String type and i just type its value with no single/double quote already 😉 .
thank you again for the hint .
Best regards.
Hello,
Thanks for your detailed description to repro this issue. I will make a testing on the desktop to see if it loses track of the password to be decrypted when launching the bat file.
There is no issue for you when you launching the bat file in the talend folder?
Best regards
Sabrina
@Xiaodi Shi hello again ,
i tried building with password like old method directly putting the password in the component TinputDB pass field , and built the project under talend directory and it did not work from bat file , it shows same error as access denied even when i put the build inside
C:\Talend\TOS_DI-Win32-20200219_1130-V7.3.1\workspace\LOCAL_PROJECT\poms\jobs\process\Myjobs\MyDBtask\
where my DBtask is the same project i want to build , i said maybe the password is there somewhere else so after the build it can find out the right pass to decrypt but nothing happened
in the same context i want to ask @Xiaodi Shi , how can i modify the java code behind the job itself? when i try to do it it always erase my modifications from job java file and build it as it was originally created , also even if i modify java code and RUN the job also it erase all what i did .
@Xiaodi Shi
my last post about this bug
here are the 2 codes from building with context var VS normal process (i added *** just to hide the keys
final String decryptedPassword_tDBInput_1 = routines.system.PasswordEncryptUtil.decryptPassword("enc:routine.encryption.key.v1:fW**9oc/FDn***al7***********2liq+Gv***UfA=");
String dbPwd_tDBInput_1 = decryptedPassword_tDBInput_1;
--------------------------------------------------------------------------------------------------
final String decryptedPassword_tDBInput_1 = context.password;
String dbPwd_tDBInput_1 = decryptedPassword_tDBInput_1;
Hello,
Could you please raise a jira issue of DI project on talend bug tracker?
Best regards
Sabrina
Hello,
You can not modify the generated Java code of job, the change will be not be saved.
If you want to use own code, please use tjavaRow, tJava... components to implement it or use your own Routines.
Best regards
Sabrina
i don't really know how to do it .
i use those possibiliteis already but they cannot for example read hidden variables that are used in other components
Hello,
Here is talend bug tracker portal:
https://jira.talendforge.org/secure/Dashboard.jspa
You can register this portal by going here if you don't have account for talend bug tracker…..
https://login.talend.com/register.php
and fill out the form.
To log in, go here….
https://login.talend.com/login.php
Please let me know if you have any further issues.
Best regards
Sabrina