Свържете Pentaho към MS SQL Server (Native)

Аз съм много нов в използването на 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


person crystal    schedule 07.01.2014    source източник
comment
За да се свържете към SQL Server в собствен режим, Java трябва да може да намери файла sqlauth.dll. Реших този проблем, като модифицирах файла spoon.bat и предоставих пътя до файла sqlauth.dll там. Мисля, че има много по-добър начин за това, но все още не съм го пробвал. Сигурни ли сте, че хостът и портът са правилни?   -  person Brian.D.Myers    schedule 07.01.2014
comment
Да, сигурен съм, че хостът и портът са правилни. Можете ли да ми покажете как решавате този проблем? Аз съм много нов в използването на този софтуер. Току-що го научих за около 3 дни.   -  person crystal    schedule 07.01.2014


Отговори (8)


Integrated Security Setup

За да се свържете с база данни с интегрирана защита, трябва да направите следните стъпки:

  • Изтеглете Microsoft JDBC драйвери 4.2 на https://www.microsoft.com/en-us/download/details.aspx?id=11774
  • Разархивирайте пакета във временна директория
  • Затворете лъжица
  • Копирайте '‹temp directory›\sqljdbc_4.2\enu\auth\x86\sqljdbc_auth.dll' в 'C:\Program Files (x86)\Java\jre1.8.0_73\bin' (32-bit)

  • Копирайте '‹temp directory›\sqljdbc_4.2\enu\sqljdbc42.jar' в '‹Папка за инсталиране на Kettle›\data-integration\lib'
  • Отворена лъжица
  • Тествайте връзката в лъжица
  • Изтриване на временна директория

Ако надстроите Kettle, Java, JDBC драйвер до по-висока версия, трябва да повторите горните стъпки

person Bart VdA    schedule 21.03.2016
comment
Инсталирането на Java в папка, независима от версията, предотвратява копирането на файла за всяка актуализация на Java - person Bart VdA; 08.07.2017
comment
Работи и с Microsoft JDBC драйвер за SQL Server 6 и 8, само структурата на папките е малко по-различна. docs.microsoft.com/en-us/sql/connect/jdbc/ - person Bart VdA; 26.05.2020

Ето какво ми помогна да свържа Pentaho PDI към Microsoft SQL Server:

  1. Изтеглете официалния Microsoft JDBC драйвер за SQL Server (v4.0) от тук.

  2. Той идва в пакет с два jar файла, копирайте файла "sqljdbc4.jar" във вашия път data-integration\lib.

  3. Рестартирайте Pentaho и опитайте връзката MS SQL server(Native) отново.

Забележка: Използвах този метод за Pentaho PDI (чайник), но трябва да работи за останалите продукти от пакета.

Забележка 2: Дори ако използвате Windows, можете да изтеглите файла ".tar.gz" вместо ".exe", защото го използвате само за Pentaho.

person Watchmaker    schedule 12.01.2016

Не знам дали сте следвали тези стъпки или не, но това, което искам да спомена:

1>първо добавете jdbc драйвер за ms sql сървър добавете в tomcat->lib. sqljdbc4.jar

намерете изображението по-долу въведете описание на изображението тук

Надявам се да е полезно.

person Amit Kumar    schedule 07.01.2014
comment
Вече следя това, което показваш. Въпреки това все още не успя да се свърже. Имате ли друго предложение? - person crystal; 08.01.2014
comment
Трябва ли да инсталирам tomcat и в сървъра? - person crystal; 08.01.2014

За да работи функцията за удостоверяване "Inregratedsecurity" на SQL Server, трябва да копирате sqljdbc_auth.dll в местоположението "~\tomcat\bin" на BA сървъра и да рестартирате BA сървъра.

Надявам се това да помогне!

person armin    schedule 30.08.2014

добавете "sqljdbc41.jar" към \Pentaho\java\bin и "sqljdbc_auth" (Diff за 32-битова и 64-битова версия) към \Pentaho\design-tools\data-integration\lib

person Raj Kamuni    schedule 20.02.2015

Току-що се борих с това на моя Mac.

По подразбиране "главната" директория, когато разархивирате архива, е data-integration. Преместих го в директория, наречена "Pentaho" -- това е дребно нещо, но не съвсем ясно -- искате JDBC драйвера в поддиректорията lib извън която и да е ROOT директория, която използвате за Pentaho.

Използвах най-новия JDBC драйвер -- sqljdbc42.jar -- работи добре -- работи добре с mariadb-java-client-2.1.0.jar за Aurora DB на AWS RDS.

person JFM    schedule 24.08.2017

Добавям моето решение, защото нито едно от горните не съвпада точно. Получих sqljdbc_auth.dll, както беше предложено в тази статия, и просто го поставих в директорията data-integration\libswt\win64 и стартирах Spoon. След това успях да се удостоверя.

person Daniel Hudsky    schedule 13.08.2019

Следвайте стъпките на Bart VdA, след което отидете на Pentaho, file, new, transformation. Отидете в раздела за визуализация, изберете трансформация, щракнете върху връзки, нова връзка. Въведете настройките на sql сървъра по подразбиране, както е показано на изображението по-долу.

въведете описание на изображението тук

person Alexandre Neukirchen    schedule 12.06.2021