CentOS 6.2 failed install with Neo4j Server 1.6.1 Community #156

Closed
lassewesth opened this Issue Nov 12, 2012 · 13 comments

Comments

Projects
None yet
3 participants
Owner

lassewesth commented Nov 12, 2012

@piratadelfuturo: 'When you try to install neo4j in CentOs or any RHEL based distro you get this:

[root@dyn106 bin]# ./neo4j install
Graph-like power should be handled carefully. What user should run Neo4j? [neo4j]
User "neo4j" does not yet exist. Shall I create the account for you? [Yn]Y
Created user "neo4j".
./neo4j: line 349: update-rc.d: command not found
[root@dyn106 bin]# ./neo4j start
WARNING: Detected a limit of 1024 for maximum open files, while a minimum value of 40000 is recommended.
WARNING: Problems with the operation of the server may occur. Please refer to the Neo4j manual regarding lifting this limitation.
Starting Neo4j Server...Exception in thread "main" java.lang.NoClassDefFoundError: org/neo4j/server/storemigration/PreStartupStoreUpgrader
Caused by: java.lang.ClassNotFoundException: org.neo4j.server.storemigration.PreStartupStoreUpgrader
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.neo4j.server.storemigration.PreStartupStoreUpgrader. Program will exit.

Then if you remove the neo4j folder and create a new installation, you can start the server again but if the machine gets shot down suddenly and then you try to restart the server you can't and then you get this error:

[root@dyn098 bin]# ./neo4j start
Starting Neo4j Server...Bad level value for property: org.neo4j.server.level
[root@dyn098 bin]#

in the log:
Feb 27, 2012 10:21:20 AM org.neo4j.server.logging.Logger log
SEVERE:
Throwable occurred: java.lang.IllegalArgumentException
at sun.nio.ch.FileChannelImpl.position(FileChannelImpl.java:278)
at org.neo4j.kernel.impl.storemigration.CurrentDatabase.storeFilesAtCurrentVersion(CurrentDatabase.java:75)
at org.neo4j.server.storemigration.PreStartupStoreUpgrader.run(PreStartupStoreUpgrader.java:79)
at org.neo4j.server.storemigration.PreStartupStoreUpgrader.main(PreStartupStoreUpgrader.java:52)

'

Owner

lassewesth commented Nov 12, 2012


valueCount: 1
values:

Owner

lassewesth commented Nov 12, 2012

@akollegger: Subsequent to the failed install, the neo4j script essentially attempts to run the installed OS service, which hasn't really been installed so it is broken. That's why a fresh download still works: it doesn't know about the attempted service install.

Do you have any suggestions for how to improve/correct the install on CentOS?

Owner

lassewesth commented Nov 12, 2012

@yeysus: Hi. Just in case you still need it, I modified the files bin/neo4j and bin/utils so Neo4j can be installed, run, and removed as a service under CentOS. It should also work with Fedora and Red Hat, and still work with Debian / Ubuntu. Usage: "./bin/neo4j install centos" or "./bin/neo4j remove centos". I installed it from source, Neo4j 1.8.M04, Java 1.7.0_04.
https://gist.github.com/2920283 and https://gist.github.com/2920262

Owner

lassewesth commented Nov 12, 2012

@bytor99999: yeysus. Is your fix in the latest Neo4J Enterprise. I tried to run it with "install centos" but I get the same error. I am just thinking it isn't in Enterprise 1.7.2

Any work-arounds for CentOS for 1.7.2?

Thanks

Mark

Owner

lassewesth commented Nov 12, 2012

@yeysus: > yeysus. Is your fix in the latest Neo4J Enterprise. I tried to run it with "install centos" but I get the same error. I am just thinking it isn't in Enterprise 1.7.2. Any work-arounds for CentOS for 1.7.2?

Hi Mark. I have only tried Neo4j Community Edition, no experience with
the Enterprise edition, and Neo4j 1.8.something. Obvious questions:
You copied my scripts, and substituted the default bin/neo4j and
bin/utils with my scripts? Regards, Jesus

Owner

lassewesth commented Nov 12, 2012

@yeysus: I just (had to use) the scripts again to upgrade to 1.8.M05.

Owner

lassewesth commented Nov 12, 2012

@yeysus: And again to 1.8.M06, community edition. They are fixed with debian/ubuntu.

Owner

lassewesth commented Nov 12, 2012

@bytor99999: No, I haven't used your script yet. I did install, got that error from the op. But I can still run Neo4j Enterprise and I can get to the console/webadmin remotely now. Should I still re-install using your script?

Thanks

Mark

Owner

lassewesth commented Nov 12, 2012

@yeysus: > No, I haven't used your script yet. I did install, got that error from the op. But I can still run Neo4j Enterprise and I can get to the console/webadmin remotely now. Should I still re-install using your script?

Hi Mark. Essentially the official script works until it comes to
configure (add/remove) the daemon to be run at a particular level, or
remove the user, those 3 actions are broken, and what the script does
afterwards (chown user of the data and conf files) as well, because it
stops running. To be on the safe side, I would diff3 my scripts with
your original files for 1.7.x, and add the relevant parts to the
original files. It is not much, the modified scripts still work with
Debian 6.05 and Ubuntu 12.04. You should first "repair" your files,
then uninstall (bin/neo4j remove centos), then install (bin/neo4j
install centos).
Regards,
Jesus

Owner

lassewesth commented Nov 12, 2012

@bytor99999: Thanks, it worked perfectly.

Mark

@lassewesth lassewesth closed this Nov 12, 2012

@lassewesth lassewesth reopened this Nov 12, 2012

yeysus commented Nov 12, 2012

Hi lassewesth. My 2 cents: At least for me, I found the problem "update-rc.d: command not found" only while installing Neo4j 1.8.M04-M06, CentOS 6.3. The Neo4j community version 1.9-M01 runs without my patch under CentOS 6.3 (yum uptodate) and Java 1.7.0_09.

Owner

lassewesth commented Nov 13, 2012

@yeysus Jesus, firstly, sorry about the spam, we just did a merge of our repos, hence you got notified.

As for our packages, I sure hope there is a working package for the final release of Neo4j 1.8 - by now the milestones ones do not matter anymore.

Contributor

jakewins commented Mar 4, 2013

This seems to have been an issue with the two JVMs used previously - one to bootstrap and run pre-startup checks, and one to run the actual server. Now only one JVM is used. If the issue persists on 1.8+ versions of Neo4j, please re-open this issue.

@jakewins jakewins closed this Mar 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment