Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

[NIFI] Cannot create PoolableConnectionFactory (The connection attempt failed.)

avatar
Explorer

Hi Team,

I am a newbie for nifi. I am trying to connect mssql 2008 by using DBCPConnectionPool.

The following are my setting:

 

  • Docker Desktop:v4.19.0
  • Nifi:v1.22.0
  • JDBC Driver:jtds-1.3.1.jar
  • JDBC Driver location:/opt/nifi/nifi-current/lib/jtds-1.3.1.jar

    nifi jtds driver location.png

 

DBCPConnectionPool Configure Controller Service:

 

  • Database Connection URL:jdbc:jtds:sqlserver://xxx.xxx.xx.xx:1433/xxxxx
  • Database Driver Class Name:net.sourceforge.jtds.jdbc.Driver
  • Database Driver Location(s):/opt/nifi/nifi-current/lib/jtds-1.3.1.jar
  • Database User:xxx
  • Password:xxx
  • Validation query:Select 1 as test

nifi controller service connet failed.png

 

And I try to Verify Controller Service Configuration get the message bellow:

 

org.apache.nifi.dbcp.DBCPConnectionPool DBCPConnectionPool[id=67dc5ad3-0189-1000-09ac-b19f6c25590c] Failed to establish Database Connection
org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Network error IOException: Connection timed out (Connection timed out))
     at org.apache.nifi.dbcp.AbstractDBCPConnectionPool.getConnection(AbstractDBCPConnectionPool.java:245)
     at org.apache.nifi.dbcp.AbstractDBCPConnectionPool.verify(AbstractDBCPConnectionPool.java:89)
     at org.apache.nifi.controller.service.StandardControllerServiceNode.verifyConfiguration(StandardControllerServiceNode.java:493)
     at org.apache.nifi.web.dao.impl.StandardControllerServiceDAO.verifyConfiguration(StandardControllerServiceDAO.java:424)
     at org.apache.nifi.web.dao.impl.StandardControllerServiceDAO$$FastClassBySpringCGLIB$$6b77954.invoke(<generated>)
     at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
     at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
     at org.apache.nifi.web.dao.impl.StandardControllerServiceDAO$$EnhancerBySpringCGLIB$$1a2edf4e.verifyConfiguration(<generated>)
     at org.apache.nifi.web.StandardNiFiServiceFacade.performControllerServiceConfigVerification(StandardNiFiServiceFacade.java:2934)
     at org.apache.nifi.web.StandardNiFiServiceFacade$$FastClassBySpringCGLIB$$358780e0.invoke(<generated>)
     at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
     at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
     at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
     at org.apache.nifi.web.StandardNiFiServiceFacade$$EnhancerBySpringCGLIB$$72e216a8.performControllerServiceConfigVerification(<generated>)
     at org.apache.nifi.web.api.ControllerServiceResource.lambda$performAsyncConfigVerification$28(ControllerServiceResource.java:1110)
     at org.apache.nifi.web.api.concurrent.AsyncRequestManager$2.run(AsyncRequestManager.java:117)
     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
     at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
     at java.base/java.lang.Thread.run(Unknown Source)

 

 

nifi jtds driver connet failed.png

 

Help on this would be appreciated.

 

5 REPLIES 5

avatar
Community Manager

@mandychen, Welcome to our community! To help you get the best possible answer, I have tagged our NiFi experts @hegdemahendra @SAMSAL @steven-matison @cotopaul who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.

 



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
New Contributor

Hello @mandychen 

did you got solution for that error so i am facing same problem.

 

avatar
Explorer

Hi @Mohamed_M 

I use Nifi v1.20.0 can solve the error.
Don't use the latest version.
You can try it.

avatar
Community Manager

@Mohamed_M Welcome to the Cloudera Community!
@MattWho Any insights here? Thanks!


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Community Manager

@Mohamed_M Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  Thanks.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: