1

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.

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

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:

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.

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.

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?

Frakcool
  • 10,915
  • 9
  • 50
  • 89
  • Possible duplocate: http://stackoverflow.com/questions/2942485/psql-fatal-ident-authentication-failed-for-user-postgres – harmic Mar 18 '14 at 02:39
  • Are you running PostgreSQL on the same machine as where you are connecting from? If so, then it should work. Can you log on using `psql -d (db name) -h 127.0.0.1 -U tom -W` where the db name is the name of the DeepDive database? – Patrick Mar 19 '14 at 02:42
  • This line works: `psql -d deepdive_test -h 127.0.0.1 -U tom -W` – pedro pablo león jaramillo Mar 19 '14 at 02:51
  • And I forgot to mention: Yes, I'm running on the same machine as I'm connecting from. Everything is installed on one single machine. – pedro pablo león jaramillo Mar 19 '14 at 02:57
  • Then your PostgreSQL installation is fine and you most likely have a DeepDive configuration issue – Patrick Mar 19 '14 at 03:36
  • You should use PostgreSQL 9.3. See: http://stackoverflow.com/questions/22548147/a-guide-for-deepdive-installation-on-ubuntu-12-04 – Shaform Mar 24 '14 at 11:39
  • Thanks for posting that Shaform! Actually, I figured out that I needed PostgreSQL because of an error about JSON that 9.1 was throwing. Then I wrote up the whole process, and posted it at the link you provided. – pedro pablo león jaramillo Mar 25 '14 at 12:24

1 Answers1

0

The error you mention can have multiple causes:

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

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

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

Both of the configuration files are in your $PGDATA directory, typically /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. 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.

Patrick
  • 29,357
  • 6
  • 62
  • 90
  • Oops - I have postgresql 9.1 - corrected this in the OP. `listen_addresses = 'localhost' `was commented out. I uncommented it. `listen on;` – pedro pablo león jaramillo Mar 19 '14 at 02:03
  • That should not make any difference on connection problems. – Patrick Mar 19 '14 at 02:05
  • OK, I tried step 1, but it doesn't make a difference in the *new* second problem. I have never touched pg_hba.conf, and I'm not really sure where to go with that part. – pedro pablo león jaramillo Mar 19 '14 at 02:18
  • If you connect on the machine where PostgreSQL is located you should have a `127.0.0.1/32` IP mask. If on a local network then it should be `192.168.0.0/24`, assuming your local subnet is `192.168.0.*`. – Patrick Mar 19 '14 at 02:45
  • I added the following to the postgresql.conf file: `listen_addresses = 'localhost 127.0.0.1 192.168.1.10'` And then tested the following in the shell `psql -h 127.0.0.1 -p 5433 -U postgres -W` This gives me the error that the connection is refused, and asks if the server is accepting connections to port 5433. I can try to enable this port in the firewall soon. – pedro pablo león jaramillo Mar 19 '14 at 02:55
  • The default port is 5432 so unless you changed that to 5433 during installation you should use 5432. Note that localhost is the same as 127.0.0.1 on all networked equipment: that is an internet standard – Patrick Mar 19 '14 at 03:35
  • I'm giving this the accepted answer, since part of the problem was with connection issues. Now that I finally got DeepDive to pass it's test error-free, I'm going to write up a thorough Ubuntu installation guide. – pedro pablo león jaramillo Mar 20 '14 at 19:02