I was doing a PoC using data from tables on a DB2/400 on iSeries.
Previously I registered the JT400 driver on File -> Preferences -> Databases (legacy), and everything worked like a charm.
Now I want to run this workflow on batch execution mode, but always get:
ERROR KNIME-Worker-0 Node Execute failed: Could not create connection to database: Maximum number of retries to get a valid connection reached. JDBC URL: jdbc:as400://10.xx.xx.107
java.sql.SQLException: Could not create connection to database: Maximum number of retries to get a valid connection reached. JDBC URL: jdbc:as400://10.xx.xx.107
at org.knime.base.node.io.database.connection.JDBCConnectorNodeModel.execute(JDBCConnectorNodeModel.java:122)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:567)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1192)
at org.knime.core.node.Node.execute(Node.java:979)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:179)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:110)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:328)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:204)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: java.sql.SQLException: Maximum number of retries to get a valid connection reached. JDBC URL: jdbc:as400://10.19.1.107
at org.knime.core.node.port.database.DatabaseConnectionSettings.execute(DatabaseConnectionSettings.java:693)
at org.knime.base.node.io.database.connection.JDBCConnectorNodeModel.execute(JDBCConnectorNodeModel.java:113)
... 13 more
Sep 25, 2019 3:03:30 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister
INFO: Removing the extensions for bundle 125
Sep 25, 2019 3:03:30 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister
INFO: Removing the extensions for bundle 126
I thought it was because I needed to export my preferences where I registered the driver, and pass it using -preferences, but still not working.
I’m using this Dockerfile
FROM ubuntu:18.04
# copy proxy settings
COPY proxy.conf /etc/apt/apt.conf.d/
RUN apt-get update
RUN apt-get install -y default-jre
ENV INSTALLATION_DIR /usr/local
ENV KNIME_DIR $INSTALLATION_DIR/knime_4.0.1
ENV HOME_DIR /home/knime
ENV WORKSPACE=/root/knime-workspace
ENV WORKFLOW="workflow.zip"
ENV PREFERENCES="batch-preferences.epf"
COPY knime_4.0.1.linux.gtk.x86_64.tar.gz .
RUN tar vxzf knime_4.0.1.linux.gtk.x86_64.tar.gz -C $INSTALLATION_DIR
WORKDIR $WORKSPACE
CMD $KNIME_DIR/knime --launcher.suppressErrors -nosave -reset -nosplash \
-application org.knime.product.KNIME_BATCH_APPLICATION \
-workflowDir=$WORKSPACE/$WORKFLOW \
-preferences=$WORKSPACE/$PREFERENCES
Run it using this command:
docker run -it --rm -e WORKFLOW=test-db2-legacy -e PREFERENCES=batch-preferences.epf -v F:\workspace\BI\knime:/root/knime-workspace/ knime-dir-docker
I would thank any help