neo4j-contrib / neo4j-puppet

Puppet module for installing Neo4j on Linux systems
30 stars 17 forks source link

err: /Stage[main]/Neo4j::Ubuntu/Package[neo4j]/ensure #8

Closed drzax closed 11 years ago

drzax commented 11 years ago

I'm getting an error running the init.pp

The output below is from the second attempt to run puppet apply. First attempt using the go script has the same outcome (but obviously a more verbose log). I've chosen not to accept the Oracle license in this instance, but I also get an error when accepting the agreement.

Running on a clean Digital Ocean Ubuntu 12.04 x64 VM.

root@neo4j:/var/tmp# puppet apply neo4j/tests/init.pp --modulepath .
notice: /Stage[main]/Neo4j::Ubuntu/Exec[apt-get update]/returns: executed successfully
err: /Stage[main]/Neo4j::Ubuntu/Package[neo4j]/ensure: change from absent to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install neo4j' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
neo4j is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 132 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up neo4j (1.9.2) ...
Running in headless (-h) mode
Installing with user neo4j
neo4j-service already installed.
WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
Using additional JVM arguments:  -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...process [5963]... waiting for server to be ready.. Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
invoke-rc.d: initscript neo4j-service, action "start" failed.
dpkg: error processing neo4j (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 neo4j
E: Sub-process /usr/bin/dpkg returned an error code (1)

notice: /Stage[main]/Neo4j::Ubuntu/Exec[bump the minimum heap size]: Dependency Package[neo4j] has failures: true
warning: /Stage[main]/Neo4j::Ubuntu/Exec[bump the minimum heap size]: Skipping because of failed dependencies
notice: /Stage[main]/Neo4j::Ubuntu/Exec[bump the maximum heap size]: Dependency Package[neo4j] has failures: true
warning: /Stage[main]/Neo4j::Ubuntu/Exec[bump the maximum heap size]: Skipping because of failed dependencies
notice: /Stage[main]/Neo4j::Ubuntu/File[neo4j config file]: Dependency Package[neo4j] has failures: true
warning: /Stage[main]/Neo4j::Ubuntu/File[neo4j config file]: Skipping because of failed dependencies
notice: /Stage[main]/Neo4j::Ubuntu/Exec[restart neo4j]: Dependency Package[neo4j] has failures: true
warning: /Stage[main]/Neo4j::Ubuntu/Exec[restart neo4j]: Skipping because of failed dependencies
notice: /Stage[main]/Neo4j::Ubuntu/Service[neo4j-service]: Dependency Package[neo4j] has failures: true
warning: /Stage[main]/Neo4j::Ubuntu/Service[neo4j-service]: Skipping because of failed dependencies
notice: Finished catalog run in 8.63 seconds
simpsonjulian commented 11 years ago

Hey @drzax

Here's what happened: Starting Neo4j Server...process [3671]... waiting for server to be ready.. Failed to start within 120 seconds. Neo4j Server may have failed to start, please check the logs. invoke-rc.d: initscript neo4j-service, action "start" failed.

What's in the /var/log/neo4j/console.log file?

pranaydoshi commented 11 years ago

I also got a similar issue.... here's the output of my /var/log/neo4j/console.log file -

10/17/13 8:16:41 PM org.neo4j.server.CommunityBootstrapper WARNING: WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7. 10/17/13 8:16:42 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup timeout to: 120000ms based on -1 10/17/13 8:16:42 PM org.neo4j.server.database.Database SEVERE: Failed to start database. 10/17/13 8:16:42 PM org.neo4j.server.CommunityBootstrapper SEVERE: Bad value '-3M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]? 10/17/13 8:16:42 PM org.neo4j.server.CommunityBootstrapper SEVERE: Failed to start Neo Server on port [7474]

pranaydoshi commented 11 years ago

With puppet, for me and the OP, the problem is that the http://jce_policy-6.zip/ url doesn't work, I think:

notice: /Stage[main]/Neo4j::Java/Exec[install OAB repo]/returns: [x] Downloading jce_policy-6.zip : failed notice: /Stage[main]/Neo4j::Java/Exec[install OAB repo]/returns: [i] Showing the last 5 lines from the logfile (/var/tmp/oab-java.sh.log)... notice: /Stage[main]/Neo4j::Java/Exec[install OAB repo]/returns: [x] Downloading jce_policy-6.zip : --2013-10-16 08:12:34-- http://jce_policy-6.zip/ notice: /Stage[main]/Neo4j::Java/Exec[install OAB repo]/returns: Resolving jce_policy-6.zip (jce_policy-6.zip)... failed: Name or service not known. notice: /Stage[main]/Neo4j::Java/Exec[install OAB repo]/returns: wget: unable to resolve host address `jce_policy-6.zip' notice: /Stage[main]/Neo4j::Java/Exec[install OAB repo]/returns14187's retcode: 4 notice: /Stage[main]/Neo4j::Java/Exec[install OAB repo]/returns: failed

simpsonjulian commented 11 years ago

Hey @pranaydoshi, could you perhaps open another issue? Your issue may not be the same as @drzax's: maybe there are two issues. Thanks!

pranaydoshi commented 11 years ago

Sure

drzax commented 11 years ago

I think there probably are two issues. One issue when accepting Oracle's licence agreement an one when not.

In the case of not accepting Oracles licence agreement:

As you point out, @simpsonjulian, neo4j didn't start. I have presumed that was due to earlier problems in the process. Namely:

err: /Stage[main]/Neo4j::Ubuntu/Package[neo4j]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install neo4j' returned 100: Reading package lists...

I think this then cascades through the process to result in:

Errors were encountered while processing:
 neo4j
E: Sub-process /usr/bin/dpkg returned an error code (1)

The content of /var/log/neo4j/console.log:

root@neo4j:~# cat /var/log/neo4j/console.log
10/17/13 10:14:15 PM org.neo4j.server.CommunityBootstrapper WARNING: WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
10/17/13 10:14:15 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup timeout to: 120000ms based on -1
10/17/13 10:14:15 PM org.neo4j.server.database.Database SEVERE: Failed to start database.
10/17/13 10:14:15 PM org.neo4j.server.CommunityBootstrapper SEVERE: Bad value '-6M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
10/17/13 10:14:15 PM org.neo4j.server.CommunityBootstrapper SEVERE: Failed to start Neo Server on port [7474]

There are also quite a few warnings about strange looking security certificate errors. e.g:

Warning: there was a problem reading the certificate file /etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.pem. Message:
  /etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.pem (No such file or directory)
simpsonjulian commented 11 years ago

I'll try and reproduce this asap.

simpsonjulian commented 11 years ago

How much ram does the VM have?

drzax commented 11 years ago

512MB

simpsonjulian commented 11 years ago

Okay. Can you show me /etc/neo4j/neo4j.properties please?

drzax commented 11 years ago
root@neo4j:~# cat /etc/neo4j/neo4j.properties
# Default values for the low-level graph engine
#neostore.nodestore.db.mapped_memory=25M
#neostore.relationshipstore.db.mapped_memory=50M
#neostore.propertystore.db.mapped_memory=90M
#neostore.propertystore.db.strings.mapped_memory=130M
#neostore.propertystore.db.arrays.mapped_memory=130M

# Enable this to be able to upgrade a store from 1.4 -> 1.5 or 1.4 -> 1.6
#allow_store_upgrade=true

# Enable this to specify a parser other than the default one. 1.5, 1.6, 1.7 are available
#cypher_parser_version=1.6

# Keep logical logs, helps debugging but uses more disk space, enabled for
# legacy reasons To limit space needed to store historical logs use values such
# as: "7 days" or "100M size" instead of "true"
keep_logical_logs=true

# Autoindexing

# Enable auto-indexing for nodes, default is false
#node_auto_indexing=true

# The node property keys to be auto-indexed, if enabled
#node_keys_indexable=name,age

# Enable auto-indexing for relationships, default is false
#relationship_auto_indexing=true

# The relationship property keys to be auto-indexed, if enabled
#relationship_keys_indexable=name,age
drzax commented 11 years ago

I bumped the memory to 2GB in case that was an issue, but got the same result.

simpsonjulian commented 11 years ago

How much free memory do you have on the machine?

I baked in a minimum 1GB heap size into this puppet module.

By the time you've taken into account the default heap size, mapped memory for I/O (which is what's in the config file) and all, I think you might be short on RAM.

The module is now fixed and deploys neo4j 1.9.4 on AWS.

I'd be happy to take the memorysize_mb fact and derive some of the configuration values from that, but run out of time today. PR's welcome.

I'm thinking that I'll probably rely on some of the puppetlabs modules in future, like stdlib, in case anybody wants to submit a PR.

drzax commented 11 years ago

@simpsonjulian—It looks like there definitely was a memory issue. Bumped to 4GB and init.pp applies cleanly.

Thank you for your assistance. Much appreciated.

simpsonjulian commented 11 years ago

No problem, @drzax - enjoy walking the graph!