【发布时间】:2017-01-01 02:42:16
【问题描述】:
我正在尝试将 Hive 作为 Cognos 10.2.1 的数据源。我有 Hive 0.11 版。我将以下罐子从 Hive 服务器放置到 Cognos 安装目录(cognos_install_Directory\webapps\p2pd\WEB-INF\lib 和 Cognos_Install_directory\v5dataserver\lib)。
commons-logging-1.0.4
guava-11.0.2
hadoop-core-1.2.1
hive-common-0.11.0
hive-exec-0.11.0
hive-jdbc-0.11.0
hive-metastore-0.11.0
hive-service-0.11.0
libfb303-0.9.0
libthrift-0.9.0
log4j-1.2.16
slf4j-api-1.6.1
slf4j-log4j12-1.6.1
hive-beeline-0.11.0
httpcore-4.2.5
httpclient-4.2.5
我启动了 HiveSserver2 并转到 Cognos 连接以创建数据源。首先,我给出数据源的名称并选择 jdbc 作为数据源向导。然后我选择 Hive 作为连接字符串属性中的一种类型。 我将以下值赋予连接字符串属性,例如, jdbc:hive2://Hive_Hostname:10000/database_name
驱动程序名称为
org.apache.hive.jdbc.HiveDriver
我还为此提供了用户名和密码。
当我尝试测试连接时,出现以下错误
Connection failed: java.sql.SQLException: Could not establish connection to jdbc:hive2://172.17.13.63:10000/newdb: java.net.ConnectException: Connection refused: connect]
我不知道我在哪里弄错了,我在网上找到的资料很少。请帮帮我。
谢谢。
【问题讨论】:
-
172.17.13.63:10000 上没有任何监听(或者防火墙阻止了您)。
-
感谢您的回复,我检查了防火墙,它在 Ubuntu 和 Windows 都处于非活动状态