简体   繁体   English

深度安装,PostgreSQL错误

[英]Deepdive installation, PostgreSQL error

Does anyone have any experience working with DeepDive ? 有没有人有过使用DeepDive的经验? It involves installing Java, Python 2.x, PostgreSQL, and SBT, then the DeepDive package. 它涉及安装Java,Python 2.x,PostgreSQL和SBT,然后安装DeepDive软件包。 I'm not very familiar with PostgreSQL, but I'm intending to learn these simultaneously. 我对PostgreSQL不太熟悉,但是我打算同时学习它们。

I'm working on Ubuntu 12.04 and PostgreSQL 9.1. 我正在使用Ubuntu 12.04和PostgreSQL 9.1。 I made a superuser for PostgreSQL using the command in the shell createuser tom . 我使用外壳程序createuser tom的命令使PostgreSQL成为超级用户。 It's worth noting that my Ubuntu username is also tom . 值得注意的是,我的Ubuntu用户名也是tom I then changed the password for tom with the following: 然后,我使用以下命令更改了tom的密码:

$su - postgres
$psql
--> ALTER USER tom WITH password 'pa$$w0RD';

DeepDive comes with a test script, which gives me the following error (I'm not including all the other text, which doesn't include errors). 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]   ...

Then at the end: 然后最后:

[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

If anyone can point me in some direction, I'd appreciate it. 如果有人可以指出我的方向,我将不胜感激。


OK, I fixed part of the problem, but this led to a different problem. 好的,我修复了部分问题,但这导致了另一个问题。 Here's what I did. 这就是我所做的。 test.sh contains the following lines: test.sh包含以下几行:

export PGUSER=${PGUSER:-`whoami`}
export PGPASSWORD=${PGPASSWORD:-}

which I changed to 我改为

export PGUSER=tom
export PGPASSWORD=pa$$w0rd

Now the test proceeds farther, and gets to the point where it prints the following: 现在测试进行得更远,到达打印以下内容的地步:

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)

And this continues ad infinitum. 这是无限的继续。 The key seems to be the first line, about the message not being delivered between the two Actors. 关键似乎是第一行,这是关于两个Actor之间未传递消息的信息。

As I noted in a comment below, I checked out the postgresql.conf file, and uncommented the following line 正如我在下面的评论中指出的那样,我签出了postgresql.conf文件,并取消了以下行的注释

listen_addresses = 'localhost'
listen on;

It resolved one of the original errors, but not the second error. 它解决了原始错误之一,但没有解决第二个错误。

In item 2 of Patrick's response, here are the parameters from the pg_hba.conf file: 在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

Doesn't the part local all all support all local connections? local all all部分不local all all支持所有本地连接吗?

The error you mention can have multiple causes: 您提到的错误可能有多种原因:

  1. Have you modified postgresql.conf to accept incoming TCP/IP connections? 您是否修改了postgresql.conf以接受传入的TCP / IP连接? Check the listen_addresses parameter. 检查listen_addresses参数。

  2. Have you modified pg_hba.conf ? 您修改了pg_hba.conf吗? Here you need setup an authentication method for DeepDive and/or the jdbc driver definition. 在这里,您需要为DeepDive和/或jdbc驱动程序定义设置身份验证方法。

  3. Lastly, can DeepDive connect to the database it intends to connect to with the credentials you have supplied it (or the jdbc driver definition)? 最后,DeepDive是否可以使用您提供的凭据(或jdbc驱动程序定义)连接到打算连接的数据库?

Both of the configuration files are in your $PGDATA directory, typically /etc/postgresql/9.3/main. 这两个配置文件都在$ PGDATA目录中,通常为/etc/postgresql/9.3/main。

Note that psql logs on using the unix sockets by default (unless you specify -h host_ip) and jdbc uses a TCP/IP connection. 请注意, psql默认情况下使用unix套接字登录(除非您指定-h host_ip),而jdbc使用TCP / IP连接。 Try psql over TCP/IP to see if that works. 在TCP / IP上尝试使用psql看看是否可行。 If not, work on 1, then 2. If it does, work on 2, then 3. 如果不是,则在1上进行2。如果是,则在2上进行3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM