Deepdive installation, PostgreSQL error - 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.
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?

The error you mention can have multiple causes:
Have you modified postgresql.conf to accept incoming TCP/IP connections? Check the listen_addresses parameter.
Have you modified pg_hba.conf? Here you need setup an authentication method for DeepDive and/or the jdbc driver definition.
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.

Related

Need help connecting to libera chat

I am having trouble connecting to libera.chat and irc.libera.chat using Konversation Version 1.8.21123 on Jammy Jellyfish (fully updated). I have worked through the steps given on https://userbase.kde.org/Konversatio...tication#step5 and still cannot connect. The repeating log is shown below.
[12:44] [Info] Looking for server irc.libera.chat (port 6697)...
[12:44] [Info] Server found, connecting...
[12:44] [Info] Negotiating capabilities with server...
[12:44] [Notice] -lithium.libera.chat- *** Checking Ident
[12:44] [Notice] -lithium.libera.chat- *** Looking up your hostname...
[12:44] [Notice] -lithium.libera.chat- *** Couldn't look up your hostname
[12:45] [Notice] -lithium.libera.chat- *** No Ident response
[12:45] [Capabilities] account-notify away-notify chghost extended-join multi-prefix sasl=PLAIN,ECDSA-NIST256P-CHALLENGE,EXTERNAL tls account-tag cap-notify echo-message server-time solanum.chat/identify-msg solanum.chat/oper solanum.chat/realhost
[12:45] [Info] Requesting capabilities: account-notify away-notify chghost extended-join multi-prefix sasl cap-notify server-time
[12:45] [Info] SASL capability acknowledged by server, attempting SASL PLAIN authentication...
[12:45] [Error] SASL authentication attempt failed.
[12:45] [Info] Closing capabilities negotiation.
[12:45] [Error] Connection to server irc.libera.chat (port 6697) lost: The TLS/SSL connection has been closed.
[12:45] [Info] Trying to reconnect to irc.libera.chat (port 6697) in 10 seconds.
[12:45] [Info] Looking for server irc.libera.chat (port 6697)...​ <-- Log repeats from this line.
Is there something blatant that I have overlooked ?
Is there some web page that I need to visit in order to register my ident/hostname/whatever (!) ?
Stuart
​

Kaa, My first application - can't retrieve collected data

I'm doing my first kaa application, i have a stuck at Retrieve collected data step.
I have build my client project, kaa-app run as below:
viettq#viettq:~/Documents/workspace/kaa_example/build$
viettq#viettq:~/Documents/workspace/kaa_example/build$
viettq#viettq:~/Documents/workspace/kaa_example/build$
viettq#viettq:~/Documents/workspace/kaa_example/build$
viettq#viettq:~/Documents/workspace/kaa_example/build$
viettq#viettq:~/Documents/workspace/kaa_example/build$
viettq#viettq:~/Documents/workspace/kaa_example/build$ ./kaa-app
Default sample period: 1 seconds
Sampled temperature: 33
2017/02/17 2:29:10 [WARNING] [kaa_bootstrap_manager.c:612] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
2017/02/17 2:29:10 [ERROR] [kaa_tcp_channel.c:307] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
2017/02/17 2:29:10 [ERROR] [kaa_client.c:240] (-7) - Failed to process OUT event for the client socket 3
Sampled temperature: 30
Sampled temperature: 32
Sampled temperature: 26
2017/02/17 2:29:13 [WARNING] [kaa_bootstrap_manager.c:612] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
2017/02/17 2:29:13 [ERROR] [kaa_tcp_channel.c:307] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
2017/02/17 2:29:13 [ERROR] [kaa_client.c:240] (-7) - Failed to process OUT event for the client socket 3
Sampled temperature: 31
Sampled temperature: 32
Sampled temperature: 31
Some data send to kaa sandbox server.
My ssh to kaa sandbox server as below:
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$
kaa#kaa-sandbox.kaaproject.org:~$ mongo kaa
MongoDB shell version: 2.6.1
connecting to: kaa
> db.logs_80610364736216152939.find()
> db.logs_80610364736216152939.find()
> db.logs_80610364736216152939.find()
>
[2]+ Stopped mongo kaa
kaa#kaa-sandbox.kaaproject.org:~$ mongo kaa
MongoDB shell version: 2.6.1
connecting to: kaa
> db.logs_80610364736216152939.find()
>
>
>
Nothing in mongoDB shell.
I done everything full compilance the Kaa official tutorial
http://kaaproject.github.io/kaa/docs/v0.10.0/Programming-guide/Your-first-Kaa-application/
But i retrieve nothing from mongoDB shell.
Please help me slove it.
Thank advance!
From the logs you provided:
2017/02/17 2:29:10 [WARNING] [kaa_bootstrap_manager.c:612] (-7) - Could not find next Bootstrap access point (protocol: id=0x56C8FF92, version=1)
2017/02/17 2:29:10 [ERROR] [kaa_tcp_channel.c:307] (-7) - Kaa TCP channel [0x929A2016] error notifying bootstrap manager on access point failure
2017/02/17 2:29:10 [ERROR] [kaa_client.c:240] (-7) - Failed to process OUT event for the client socket 3
The application can`t send information to Kaa Sandbox server. Check that you correctly created all schemas and log appender. Check that you can connect to the server.
Please also check the Sandbox configuration for the Kaa host on the Management page. There should be set the PC host (which runs the Kaa Sandbox VM) machine's IP address accessible from the host you are running the application.
Note that each time the Kaa host setting is changed, you should re-generate Kaa SDK and re-build your application with that new SDK files. Otherwise, the application might fail connecting to the Kaa operations service.

Packaging cygnus-common results in an empty jar

I'm trying to install cygnus-common following this guide but the creation of the cygnus-common jar (incl. dependencies) always results in an empty jar. Apache-Flume installed without any issues. I've tried increasing the memory for the Maven JVM as per the guide but this hasn't helped.
~/fiware-cygnus/cygnus-common$ mvn clean compile exec:exec
assembly:single
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cygnus-common 1.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # cygnus-common ---
[INFO] Deleting /home/cygnus/fiware-cygnus/cygnus-common/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # cygnus-common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # cygnus-common ---
[INFO] Compiling 50 source files to /home/cygnus/fiware-cygnus/cygnus-common/target/classes
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) # cygnus-common ---
[INFO]
[INFO] --- maven-assembly-plugin:2.6:single (default-cli) # cygnus-common ---
[INFO] Building jar: /home/cygnus/fiware-cygnus/cygnus-common/target/cygnus-common-1.1.0-jar-with-dependencies.jar
Killed
Here's the resultant file
~/fiware-cygnus/cygnus-common$ ls -lrth target/
total 12K
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 generated-sources
drwxrwxr-x 3 cygnus cygnus 4.0K Jun 13 14:57 classes
drwxrwxr-x 2 cygnus cygnus 4.0K Jun 13 14:57 archive-tmp
-rw-rw-r-- 1 cygnus cygnus 0 Jun 13 14:58 cygnus-common-1.1.0-jar-with-dependencies.jar
A similar question was asked before with no resolution documented. The only suggestions given for that question was either lack of disk space, memory or permissions. Disk space is definitely not an issue, I have increased the memory for the Maven JVM and the user has the correct permissions.
EDIT:
So I ran the mvn compile in debug mode as suggested by #frb and it was memory issue
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 257024000 bytes for committing reserved memory.
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_linux.cpp:2827), pid=48868, tid=140567873734400
[1]: http://fiware-cygnus.readthedocs.io/en/latest/cygnus-common/installation_and_administration_guide/install_from_sources/index.html#section3 "guide"
using top I was able to see that the memory usage was over 70% when the process got killed. The system has ~1.7Gb which is well above the stated requirements, and it is a 64bit system.
I had the system memory increased to 3Gb and the build succeeded so perhaps the hardware requirements should be updated?
Increasing the system memory to 3Gb fixed this issue and the jar was created successfully.

Openshift Minecraft Server timeout

I recently made an Minecraft Server on Openshift with this Tutorial.
After I made the port forwarding, I was able do get a Connection in Minecraft to my Server. But I cannot login! It simply ends with the Message: Timed-Out.
In the Server logs I only see, what I know: I lost my connection. Here are the logs:
2016-01-01 17:29:17 [INFO] Starting minecraft server version 1.
2016-01-01 17:29:17 [INFO] Loading properties
2016-01-01 17:29:17 [INFO] Default game type: SURVIVAL
2016-01-01 17:29:17 [INFO] Generating keypair
2016-01-01 17:29:18 [INFO] Starting Minecraft server on 127.2.1
2016-01-01 17:29:18 [INFO] Preparing level "world"
2016-01-01 17:29:18 [INFO] Preparing start region for level 0
2016-01-01 17:29:20 [INFO] Preparing spawn area: 52%
2016-01-01 17:29:20 [INFO] Done (1.911s)! For help, type "help"
2016-01-01 17:30:41 [SEVERE] Reached end of stream
2016-01-01 17:30:41 [INFO] /127.2.105.129:29361 lost connection
java.io.IOException: Bad packet id 72
at ei.a(SourceFile:193)
at ci.i(SourceFile:250)
at ci.c(SourceFile:16)
at cj.run(SourceFile:94)
2016-01-01 18:10:21 [INFO] /127.2.105.129:32075 lost connection
java.io.IOException: Bad packet id 72
at ei.a(SourceFile:193)
at ci.i(SourceFile:250)
at ci.c(SourceFile:16)
at cj.run(SourceFile:94)
2016-01-01 18:10:21 [INFO] /127.2.105.129:32098 lost connection
java.io.IOException: Bad packet id 72
at ei.a(SourceFile:193)
at ci.i(SourceFile:250)
at ci.c(SourceFile:16)
at cj.run(SourceFile:94)
java.io.IOException: Bad packet id 72 deals will a malformed packet. I've read where it could mean anything from not specifying the correct port to trying to connect with incompatible mod versions.
In your case, it looks like you are explicitly defining the server-ip in your server.properties. In the starting logs:
2016-01-01 17:29:18 [INFO] Starting Minecraft server on 127.2.1
127.2.1 is not a valid address, so it makes sense to me that packet transmission would be malformed. Leave this field blank (as it is by default) or provide a valid IPv4 address.
I feel pretty confident that is what is going on because the tutorial your provided makes you set this field as well.
Bad packet id 72 means that you are trying to login to a server that's port isn't configured correctly. in the log, you have mentioned 2016-01-01 17:29:18 [INFO] Starting Minecraft server on 127.2.1.
solution:
(I have configured my test server to similar to yours)
1. go to server.properties and in server-ip:section, remove the content after that. That will make it the default ip
go to your router home page and port forward the server to 25565
it should now work
Good luck on your new server! :)

iRODS configuration - Could not start iRODS server during

I've installed postgres as database and then iRODS in Ubuntu 14.04. Then I start its configuration
sudo /var/lib/irods/packaging/setup_irods.sh
After the configuration phase, when iRODS starts the updtating, the first 4 steps go well
Stopping iRODS server...
-----------------------------
Running irods_setup.pl...
Step 1 of 4: Configuring database user...
Updating user's .pgpass...
Skipped. File already uptodate.
Step 2 of 4: Creating database and tables...
Checking whether iCAT database exists...
[mydb] on [localhost] found.
Updating user's .odbc.ini...
Creating iCAT tables...
Skipped. Tables already created.
Testing database communications...
Step 3 of 4: Configuring iRODS server...
Updating /etc/irods/server_config.json...
Updating /etc/irods/database_config.json...
Step 4 of 4: Configuring iRODS user and starting server...
Updating iRODS user's ~/.irods/irods_environment.json...
Starting iRODS server...
but at the end I get this error
Could not start iRODS server.
Starting iRODS server...
Traceback (most recent call last):
File "/var/lib/irods/iRODS/scripts/python/get_db_schema_version.py", line 77, in <module>
current_schema_version = get_current_schema_version(cfg)
File "/var/lib/irods/iRODS/scripts/python/get_db_schema_version.py", line 61, in get_current_schema_version
'get_current_schema_version: failed to find result line for schema_version\n\n{}'.format(format_cmd_result(result)))
RuntimeError: get_current_schema_version: failed to find result line for schema_version
return code: [0]
stdout:
stderr:
ERROR: relation "r_grid_configuration" does not exist
LINE 1: ...option_value from R_GRID_CON...
^
Confirming catalog_schema_version... Success
Validating [/var/lib/irods/.irods/irods_environment.json]... Success
Validating [/etc/irods/server_config.json]... Success
Validating [/etc/irods/hosts_config.json]... Success
Validating [/etc/irods/host_access_control_config.json]... Success
Validating [/etc/irods/database_config.json]... Success
(1) Waiting for process bound to port 5432 ... [-]
(2) Waiting for process bound to port 5432 ... [-]
(4) Waiting for process bound to port 5432 ... [-]
Port 5432 In Use ... Not Starting iRODS Server
Install problem:
Cannot start iRODS server.
Found 0 processes:
There are no iRODS servers running.
Abort.
Have you any ideas on what went wrong?
Because I don't have enough reputation to comment:
Which version of iRODS are you using?
This portion of the output:
Creating iCAT tables...
Skipped. Tables already created.
combined with this portion:
ERROR: relation "r_grid_configuration" does not exist
suggests that the setup ran before, but only partially completed, leaving the system in a broken state. I would recommend reinstallating from scratch, which includes:
Uninstalling the iRODS icat and db plugin packages:
sudo dpkg -P irods-icat irods-database-plugin-postgres
note: make sure to use the -P, so that the configuration files are removed from dpkg's database.
Dropping and remaking the database
Deleting the following directories:
sudo rm -rf /tmp/irods /etc/irods /var/lib/irods
Reinstalling the packages and running sudo /var/lib/irods/packaging/setup_irods.sh
This portion of the output:
(1) Waiting for process bound to port 5432 ... [-]
(2) Waiting for process bound to port 5432 ... [-]
(4) Waiting for process bound to port 5432 ... [-]
Port 5432 In Use ... Not Starting iRODS Server
suggests that you are using port 5432 as your iRODS server port. This will conflict with the default Postgres port. I recommend using the default iRODS server port of 1247. This value was queried during setup as:
iRODS server's port [1247]:
and is recorded in /etc/irods/server_config.json under the zone_port entry.
iRODS-Chat:
It may be easier to continue this on the iRODS-Chat google group. Repairing installs can require back-and-forth communication, which may not be inline with standard stackoverflow usage.