在近期的一次作业中出现了偶发信的报错:
Pan - Start of run.
2022/05/31 22:52:06 - KETTLE_TABLE - Dispatching started for transformation [KETTLE_TABLE]
2022/05/31 22:53:47 - ?? / ??.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : An error occurred during initialization, processing will be stopped:
2022/05/31 22:53:47 - ?? / ??.0 - Error occurred while trying to connect to the database
2022/05/31 22:53:47 - ?? / ??.0 -
2022/05/31 22:53:47 - ?? / ??.0 - Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
2022/05/31 22:53:47 - ?? / ??.0 - IO Error: Connection reset
2022/05/31 22:53:47 - ?? / ??.0 - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : Error initializing step [?? / ??]
2022/05/31 22:53:47 - KETTLE_TABLE - ERROR (version 5.4.0.1-130, build 1 from 2015-06-14_12-34-55 by buildguy) : Step [?? / ??.0] failed to initialize!
2022/05/31 22:53:47 - ???.0 - Finished reading query, closing connection.
1、根据日志的提示,首先确认为数据库连接问题(Error connecting to database)
在更新完Kettle目录下的ojdbc.jar包,问题无法解决。
2、再根据IO Error: Connection reset提示,结合这个故障是偶发性的及网上的文献,猜测是
连接ORACLE服务器时,客户端要生成随机密钥,进行客户端认证,在JDK中默认使用/dev/random(阻塞式随机生成),这个方式就会导致连接reset,无法正常连接。
解决方法:
1、find / -name java.security
2、vim /路径/java.security
将securerandom.source=/dev/random修改成securerandom.source=/dev/urandom
3、现再新运行作业及转换