深度安装,PostgreSQL错误 [英] Deepdive installation, PostgreSQL error

查看:95
本文介绍了深度安装,PostgreSQL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人在使用 DeepDive 方面有任何经验吗?它涉及安装Java,Python 2.x,PostgreSQL和SBT,然后安装DeepDive软件包。我对PostgreSQL不太熟悉,但是我想同时学习这些知识。

Does anyone have any experience working with DeepDive? It involves installing Java, Python 2.x, PostgreSQL, and SBT, then the DeepDive package. I'm not very familiar with PostgreSQL, but I'm intending to learn these simultaneously.

我正在使用Ubuntu 12.04和PostgreSQL 9.1。我使用外壳程序 createuser tom 中的命令为PostgreSQL设置了超级用户。值得注意的是,我的Ubuntu用户名也是 tom 。然后,我使用以下命令更改了tom的密码:

I'm working on Ubuntu 12.04 and PostgreSQL 9.1. I made a superuser for PostgreSQL using the command in the shell createuser tom. It's worth noting that my Ubuntu username is also tom. I then changed the password for tom with the following:

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

DeepDive带有一个测试脚本,它给了我以下错误(我不包括所有其他文本,其中不包含错误)。

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).

[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

如果有人可以指出我的方向,我

If anyone can point me in some direction, I'd appreciate it.

好,我解决了部分问题,但这导致了另一个问题。这就是我所做的。 test.sh包含以下行:

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:

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

我更改为

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)

这将继续无限制地进行。关键似乎是第一行,关于两个Actor之间没有传递消息。

And this continues ad infinitum. The key seems to be the first line, about the message not being delivered between the two Actors.

正如我在下面的评论中指出的那样,我检查了postgresql.conf。文件,并取消注释以下行

As I noted in a comment below, I checked out the postgresql.conf file, and uncommented the following line

listen_addresses = 'localhost'
listen on;

它解决了原始错误之一,但没有解决第二个错误。

It resolved one of the original errors, but not the second error.

在Patrick回应的第2项中,以下是pg_hba.conf文件中的参数:

In item 2 of Patrick's response, here are the parameters from the pg_hba.conf file:

# 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?

推荐答案

您提到的错误可能有多种原因:

The error you mention can have multiple causes:


  1. 是否已修改 postgresql.conf 以接受传入的TCP / IP连接?检查 listen_addresses 参数。

  1. Have you modified postgresql.conf to accept incoming TCP/IP connections? Check the listen_addresses parameter.

是否已修改 pg_hba.conf ?在这里,您需要为DeepDive和/或jdbc驱动程序定义设置身份验证方法。

Have you modified pg_hba.conf? Here you need setup an authentication method for DeepDive and/or the jdbc driver definition.

最后,DeepDive是否可以连接到打算与之连接的数据库?您提供了它的凭据(或jdbc驱动程序定义)?

Lastly, can DeepDive connect to the database it intends to connect to with the credentials you have supplied it (or the jdbc driver definition)?

这两个配置文件都在$ PGDATA中目录,通常是/etc/postgresql/9.3/main。

Both of the configuration files are in your $PGDATA directory, typically /etc/postgresql/9.3/main.

请注意, psql 使用unix套接字登录缺省值(除非您指定-h host_ip),并且jdbc使用TCP / IP连接。在TCP / IP上尝试使用psql看看是否可行。如果不是,请先处理1,然后是2。如果是,请先处理2,然后3。

Note that psql logs on using the unix sockets by default (unless you specify -h host_ip) and jdbc uses a TCP/IP connection. Try psql over TCP/IP to see if that works. If not, work on 1, then 2. If it does, work on 2, then 3.

这篇关于深度安装,PostgreSQL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆