2014-01-07 160 views
5

我在使用PENTAHO時非常新。我需要將此軟件連接到MS SQL Server(本機)。我已經嘗試多次連接它,但每次測試連接時都失敗。 這是每次測試連接時發生的錯誤消息。將Pentaho連接到MS SQL Server(Native)

Error connecting to database [sutera] : 
org.pentaho.di.core.exception.KettleDatabaseException: 
Error occured while trying to connect to the database 

Error connecting to database: (using class 

com.microsoft.sqlserver.jdbc.SQLServerDriver)

The TCP/IP connection to the host 172.16.1.133, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.". 


org.pentaho.di.core.exception.KettleDatabaseException: 
Error occured while trying to connect to the database 

Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver) 
The TCP/IP connection to the host 172.16.1.133, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.". 


at org.pentaho.di.core.database.Database.normalConnect(Database.java:368) 
at org.pentaho.di.core.database.Database.connect(Database.java:317) 
at org.pentaho.di.core.database.Database.connect(Database.java:279) 
at org.pentaho.di.core.database.Database.connect(Database.java:269) 
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:86) 
at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2464) 
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:533) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329) 
at org.pentaho.ui.xul.swing.tags.SwingButton$OnClickRunnable.run(SwingButton.java:58) 
at java.awt.event.InvocationEvent.dispatch(Unknown Source) 
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
at java.awt.EventQueue.access$200(Unknown Source) 
at java.awt.EventQueue$3.run(Unknown Source) 
at java.awt.EventQueue$3.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
at java.awt.EventQueue.dispatchEvent(Unknown Source) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
at java.awt.WaitDispatchSupport$2.run(Unknown Source) 
at java.awt.WaitDispatchSupport$4.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.awt.WaitDispatchSupport.enter(Unknown Source) 
at java.awt.Dialog.show(Unknown Source) 
at java.awt.Component.show(Unknown Source) 
at java.awt.Component.setVisible(Unknown Source) 
at java.awt.Window.setVisible(Unknown Source) 
at java.awt.Dialog.setVisible(Unknown Source) 
at org.pentaho.ui.xul.swing.tags.SwingDialog.show(SwingDialog.java:234) 
at org.pentaho.reporting.ui.datasources.jdbc.ui.XulDatabaseDialog.open(XulDatabaseDialog.java:256) 
at org.pentaho.reporting.ui.datasources.jdbc.ui.ConnectionPanel$EditDataSourceAction.actionPerformed(ConnectionPanel.java:162) 
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) 
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) 
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) 
at javax.swing.DefaultButtonModel.setPressed(Unknown Source) 
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) 
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) 
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) 
at java.awt.Component.processMouseEvent(Unknown Source) 
at javax.swing.JComponent.processMouseEvent(Unknown Source) 
at java.awt.Component.processEvent(Unknown Source) 
at java.awt.Container.processEvent(Unknown Source) 
at java.awt.Component.dispatchEventImpl(Unknown Source) 
at java.awt.Container.dispatchEventImpl(Unknown Source) 
at java.awt.Component.dispatchEvent(Unknown Source) 
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) 
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) 
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) 
at java.awt.Container.dispatchEventImpl(Unknown Source) 
at java.awt.Window.dispatchEventImpl(Unknown Source) 
at java.awt.Component.dispatchEvent(Unknown Source) 
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
at java.awt.EventQueue.access$200(Unknown Source) 
at java.awt.EventQueue$3.run(Unknown Source) 
at java.awt.EventQueue$3.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
at java.awt.EventQueue$4.run(Unknown Source) 
at java.awt.EventQueue$4.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
at java.awt.EventQueue.dispatchEvent(Unknown Source) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
at java.awt.WaitDispatchSupport$2.run(Unknown Source) 
at java.awt.WaitDispatchSupport$4.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.awt.WaitDispatchSupport.enter(Unknown Source) 
at java.awt.Dialog.show(Unknown Source) 
at java.awt.Component.show(Unknown Source) 
at java.awt.Component.setVisible(Unknown Source) 
at java.awt.Window.setVisible(Unknown Source) 
at java.awt.Dialog.setVisible(Unknown Source) 
at org.pentaho.reporting.libraries.designtime.swing.CommonDialog.performEdit(CommonDialog.java:156) 
at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog.performConfiguration(JdbcDataSourceDialog.java:759) 
at org.pentaho.reporting.ui.datasources.jdbc.JdbcDataSourcePlugin.performEdit(JdbcDataSourcePlugin.java:67) 
at org.pentaho.reporting.designer.core.actions.report.AddDataFactoryAction.actionPerformed(AddDataFactoryAction.java:79) 
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) 
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) 
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) 
at javax.swing.DefaultButtonModel.setPressed(Unknown Source) 
at javax.swing.AbstractButton.doClick(Unknown Source) 
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) 
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) 
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) 
at java.awt.Component.processMouseEvent(Unknown Source) 
at javax.swing.JComponent.processMouseEvent(Unknown Source) 
at java.awt.Component.processEvent(Unknown Source) 
at java.awt.Container.processEvent(Unknown Source) 
at java.awt.Component.dispatchEventImpl(Unknown Source) 
at java.awt.Container.dispatchEventImpl(Unknown Source) 
at java.awt.Component.dispatchEvent(Unknown Source) 
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) 
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) 
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) 
at java.awt.Container.dispatchEventImpl(Unknown Source) 
at java.awt.Window.dispatchEventImpl(Unknown Source) 
at java.awt.Component.dispatchEvent(Unknown Source) 
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
at java.awt.EventQueue.access$200(Unknown Source) 
at java.awt.EventQueue$3.run(Unknown Source) 
at java.awt.EventQueue$3.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
at java.awt.EventQueue$4.run(Unknown Source) 
at java.awt.EventQueue$4.run(Unknown Source) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) 
at java.awt.EventQueue.dispatchEvent(Unknown Source) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) 
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
at java.awt.EventDispatchThread.run(Unknown Source) 
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver) 
The TCP/IP connection to the host 172.16.1.133, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.". 

at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:504) 
at org.pentaho.di.core.database.Database.normalConnect(Database.java:352) 
... 122 more 
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 172.16.1.133, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.". 
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170) 
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:104 
     9) 
at 
    com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833) 
at           
    com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716) 
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841) 
at java.sql.DriverManager.getConnection(Unknown Source) 
at java.sql.DriverManager.getConnection(Unknown Source) 
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:478) 
... 123 more 

誰能幫我解決這個問題呢?我真的需要你的幫助。 TQ

+0

要以純模式連接到SQL Server,Java必須能夠找到sqlauth.dll文件。我通過修改spoon.bat文件並在那裏提供了sqlauth.dll文件的路徑來解決這個問題。我認爲有一個更好的方法來做到這一點,但我還沒有嘗試過。你確定主機和端口是正確的嗎? –

+0

是的,我確定主機和端口是正確的。你能告訴我你是如何解決這個問題的?我在使用這個軟件方面很新穎。我剛剛學了3天左右。 – crystal

回答

0

我不知道你是否已經按照這些步驟或not.but什麼,我想提::

1>首先添加JDBC驅動程序的MS SQL Server中添加tomcat-> LIBsqljdbc4.jar

找到下面的圖片 enter image description here

我希望這是有幫助的。

+0

我已經像你展示的一樣。但是,它仍然無法連接。你有其他建議嗎? – crystal

+0

我是否需要在服務器上安裝tomcat? – crystal

+0

不需要它 – bajrangi

0

要使SQL Server的「Inregratedsecurity」身份驗證功能正常工作,必須將sqljdbc_auth.dll複製到BA服務器的「〜\ tomcat \ bin」位置並重新啓動BA服務器。

希望這會有所幫助!

0

添加 「sqljdbc41.jar」 到\ Pentaho的\ java的\ BIN 和 「sqljdbc_auth」(DIFF爲32位和64位版本)到\ Pentaho的\設計工具\數據集成\ lib中

0

這裏是什麼工作對我來說,Pentaho的PDI連接到Microsoft SQL Server的:

  1. here下載用於SQL Server(V4.0)在微軟官方JDBC驅動程序。

  2. 它附帶兩個jar文件,將文件「sqljdbc4.jar」複製到您的路徑data-integration\lib

  3. 重新啓動Pentaho並再次嘗試連接MS SQL server(Native)

注:我用這種方法爲Pentaho PDI(壺),但它應該適用於該套件的其餘產品。注意2:即使您使用的是Windows,您也可以下載「.tar.gz」文件,而不是「.exe」,因爲您僅用於Pentaho。

5

集成安全性設置

要連接到集成的安全數據庫,應做以下步驟:

  • 下載Microsoft JDBC驅動程序4。2上https://www.microsoft.com/en-us/download/details.aspx?id=11774
  • 解壓縮包在一個臨時目錄
  • 關閉勺
  • 複製 '< temp目錄> \ sqljdbc_4.2 \ ENU \ AUTH \ 86 \ sqljdbc_auth.dll' 到「C:\程序文件(x86) \的Java \ jre1.8.0_73 \ bin'的(32位)

  • 複製 '< temp目錄> \ sqljdbc_4.2 \ ENU \ sqljdbc42.jar' 到 '<水壺安裝文件夾> \數據集成\ LIB'
  • 開放勺子
  • 勺子的測試連接
  • 刪除臨時目錄

如果您將Kettle,Java,JDBC Driver升級到更高版本,則必須重複上述步驟

+0

在獨立於版本的文件夾中安裝Java可防止爲每個java更新複製文件 –

0

只需在我的Mac上與此搏鬥。

默認情況下,「根」目錄,當你解壓縮存檔data-integration。我將它移動到一個名爲「Pentaho」的目錄中 - 這是一件小事,但並不十分清楚 - 您需要將lib子目錄中的JDBC驅動程序關閉,而不要使用任何用於Pentaho的ROOT目錄。

我使用了最新的JDBC驅動程序 - sqljdbc42.jar - 工作得很好 - 在AWS RDS上工作得很好,mariadb-java-client-2.1.0.jar對於Aurora DB