有没有人有使用DeepDive的经验?它涉及安装Java,Python 2.x,PostgreSQL和SBT,然后是DeepDive软件包。我对PostgreSQL不太熟悉,但我打算同时学习它们。
我正在研究Ubuntu 12.04和PostgreSQL 9.1。我使用shell createuser tom
中的命令为PostgreSQL创建了一个超级用户。值得注意的是,我的Ubuntu用户名也是 tom 。然后我用以下内容更改了tom的密码:
$su - postgres
$psql
--> ALTER USER tom WITH password 'pa$$w0RD';
DeepDive附带一个测试脚本,它给出了以下错误(我不包括所有其他文本,不包含错误)。
[info] LogisticRegressionApp:
[info] - should work *** FAILED ***
[info] org.postgresql.util.PSQLException: FATAL: password authentication failed for user "tom"
[info] at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:398)
[info] at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:173)
[info] at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
[info] at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:136)
[info] at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
[info] at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
[info] at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)
[info] at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
[info] at org.postgresql.Driver.makeConnection(Driver.java:393)
[info] at org.postgresql.Driver.connect(Driver.java:267)
[info] ...
然后在结束时:
[info] Tests: succeeded 68, failed 2, canceled 0, ignored 0, pending 3
[info] *** 2 TESTS FAILED ***
[error] Failed tests:
[error] org.deepdive.test.integration.LogisticRegressionApp
[error] org.deepdive.test.unit.InferenceManagerSpec
[error] Error during tests:
[error] org.deepdive.test.unit.PostgresInferenceDataStoreSpec
[error] org.deepdive.test.unit.PostgresExtractionDataStoreSpec
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 10 s, completed Mar 17, 2014 8:51:47 PM
如果有人能指出我某个方向,我会很感激。
好的,我解决了部分问题,但这导致了一个不同的问题。这就是我做的。 test.sh包含以下行:
export PGUSER=${PGUSER:-`whoami`}
export PGPASSWORD=${PGPASSWORD:-}
我改为
export PGUSER=tom
export PGPASSWORD=pa$$w0rd
现在测试进行得更远,并且达到打印以下内容的程度:
06:49:40.953 [default-dispatcher-7][$a][LocalActorRef] INFO Message [org.deepdive.calibration.CalibrationDataWriter$WriteCalibrationData] from Actor[akka://deepdive/temp/$a] to Actor[akka://deepdive/user/inferenceManager/$a#-1669803870] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
06:49:40.955 [default-dispatcher-7][$a][LocalActorRef] INFO Message [akka.actor.PoisonPill$] from Actor[akka://deepdive/user/inferenceManager#-354953956] to Actor[akka://deepdive/user/inferenceManager/$a#-1669803870] was not delivered. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
06:49:40.957 [default-dispatcher-5][inferenceManager][InferenceManager$PostgresInferenceManager] INFO Starting
06:49:40.958 [default-dispatcher-6][factorGraphBuilder][FactorGraphBuilder$PostgresFactorGraphBuilder] INFO Starting
06:50:06.679 [TaskManagerSpec-scheduler-1][akka://TaskManagerSpec/user/$$d][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
06:50:06.699 [TaskManagerSpec-scheduler-1][akka://TaskManagerSpec/user/$$e][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
06:50:06.709 [TaskManagerSpec-scheduler-1][akka://TaskManagerSpec/user/$$f][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
06:50:06.738 [TaskManagerSpec-scheduler-1][akka://TaskManagerSpec/user/$$g][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
06:50:06.759 [TaskManagerSpec-scheduler-1][akka://TaskManagerSpec/user/$$h][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
06:50:06.780 [TaskManagerSpec-scheduler-1][akka://TaskManagerSpec/user/$$i][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
06:50:06.799 [TaskManagerSpec-scheduler-1][akka://TaskManagerSpec/user/$$j][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
06:50:07.396 [default-dispatcher-5][taskManager][TaskManager] INFO Memory usage: 233/982MB (max: 982MB)
这无休止地无止境。关键似乎是第一行,关于两个演员之间没有传递的信息。
正如我在下面的评论中提到的,我查看了postgresql.conf文件,并取消注释了以下行
listen_addresses = 'localhost'
listen on;
它解决了原始错误之一,但没有解决第二个错误。
在Patrick的回复的第2项中,以下是pg_hba.conf文件中的参数:
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
部分local all all
不支持所有本地连接吗?
答案 0 :(得分:0)
您提到的错误可能有多种原因:
您是否修改过postgresql.conf
以接受传入的TCP / IP连接?检查listen_addresses
参数。
您是否修改了pg_hba.conf
?在这里,您需要为DeepDive和/或jdbc驱动程序定义设置身份验证方法。
最后,DeepDive可以使用您提供的凭据(或jdbc驱动程序定义)连接到要连接的数据库吗?
两个配置文件都在$ PGDATA目录中,通常是/etc/postgresql/9.3/main。
请注意,psql
默认使用unix套接字登录(除非指定-h host_ip),jdbc使用TCP / IP连接。尝试使用TCP / IP上的psql来查看是否有效。如果没有,则工作1,然后2.如果是,则工作2,然后工作3。