OS : Kubuntu 15.10
Neo4J Version : 2.3.1
Java Version : JDK 1.8
There are two ways of running a neo4j instance.
1. Server
2. Local
In server we need to run /bin/neo4j start and the path specified in the server config file needs to be empty, else it will throw error
In local mode i.e shell mode, /bin/neo4j-shell again we can run localy or we can specify the ip:port, unfotunately we cannot specify ip:port with db:path.
I am following this tutorial: http://www.tutorialspoint.com/neo4j/neo4j_native_java_api_example.htm, in the end, for windows there is a GUI where in we can select the database and we can view in Web Gui localhost:7474
Question:
How to start a server locally/remote with WebUI Admin Console on a pre-existing neo4j database?
Edit:
Neo4J.java
package com.tp.neo4j.java.examples;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.factory.GraphDatabaseFactory;
public class Neo4J {
public static void main(String[] args) {
GraphDatabaseFactory dbFactory = new GraphDatabaseFactory();
GraphDatabaseService db= dbFactory.newEmbeddedDatabase("data/graph.db");
try (Transaction tx = db.beginTx()) {
Node javaNode = db.createNode(Tutorials.JAVA);
javaNode.setProperty("TutorialID", "JAVA001");
javaNode.setProperty("Title", "Learn Java");
javaNode.setProperty("NoOfChapters", "25");
javaNode.setProperty("Status", "Completed");
Node scalaNode = db.createNode(Tutorials.SCALA);
scalaNode.setProperty("TutorialID", "SCALA001");
scalaNode.setProperty("Title", "Learn Scala");
scalaNode.setProperty("NoOfChapters", "20");
scalaNode.setProperty("Status", "Completed");
Relationship relationship = javaNode.createRelationshipTo
(scalaNode,TutorialRelationships.JVM_LANGIAGES);
relationship.setProperty("Id","1234");
relationship.setProperty("OOPS","YES");
relationship.setProperty("FP","YES");
tx.success();
}
System.out.println("Done successfully");
}
}
Server properties:
org.neo4j.server.database.location=data/graph.db
Neo4j properties:
allow_store_upgrade=true
remote_shell_port=1337
Embedded Server properties in Java:
GraphDatabaseService db =dbFactory.newEmbeddedDatabase(new File("/opt/neo4j/data/graph.db"));
Steps to reproduce the error:
Run the Java Application. It creates db in the specified path.
Modify the server properties in conf folder to point to the path specified in java
Start neo4j : sudo neo4j start
[Neo4J starts successfully if the db path mentioned in the server properties is empty]
Error
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Starting Neo4j Server.../opt/neo4j/data/log was missing, recreating...
WARNING: not changing user
process [3484]... waiting for server to be ready.... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
Log:
2015-12-29 07:35:55.276+0530 INFO Successfully shutdown Neo4j Server
2015-12-29 07:35:55.277+0530 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#4ae673d' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#4ae673d' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#4ae673d' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:67)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:234)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:97)
at org.neo4j.server.CommunityBootstrapper.start(CommunityBootstrapper.java:48)
at org.neo4j.server.CommunityBootstrapper.main(CommunityBootstrapper.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase#4ae673d' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:462)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:194)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /opt/neo4j/data/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:143)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:43)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
at org.neo4j.server.CommunityNeoServer$1.newGraphDatabase(CommunityNeoServer.java:66)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:95)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource#2895e461' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:462)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:112)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139)
... 10 more
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: '/opt/neo4j/data/graph.db/neostore.nodestore.db' has a store version number that we cannot upgrade from. Expected 'v0.A.3' but file is version '\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00'.
at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:96)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:149)
at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:636)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:527)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 15 more
Note: We can import only csv files, we cannot import a pre-existing neo4j db.
Note: Tried Java Rest Binding, but it seems to have lot issues, Maven issue, dependency issue.
Not really sure what you're asking. You can run Neo4j with the Admin interface on database files on disk by setting the database path in conf/neo4j-server.properties pointing to your database store location.
Answer:
Make sure the jdbc driver version matches your neo4j server version.
Neo4J Server download: Neo4j v2.3.1
POM Dependency
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>2.3.1</version>
</dependency>
Related
I am trying to create Flink JBDC sink to an oracle database. When run locally (from a junit test and minicluster) it works but when deployed in k8s it throws an exception saying it cannot find a suitable Driver. The Classpath is:
Classpath: /flink/lib/flink-cep-scala_2.12-1.13.5-stream1.jar:/flink/lib/flink-connector-jdbc_2.12-1.13.5.jar:/flink/lib/flink-csv-1.13.5-stream1.jar:/flink/lib/flink-json-1.13.5-stream1.jar:/flink/lib/flink-queryable-state-runtime_2.12-1.13.5-stream1.jar:/flink/lib/flink-shaded-netty-tcnative-dynamic-2.0.30.Final-13.0-stream1.jar:/flink/lib/flink-shaded-zookeeper-3.4.14.jar:/flink/lib/flink-table-blink_2.12-1.13.5-stream1.jar:/flink/lib/flink-table_2.12-1.13.5-stream1.jar:/flink/lib/log4j-1.2-api-2.16.0.jar:/flink/lib/log4j-api-2.16.0.jar:/flink/lib/log4j-core-2.16.0.jar:/flink/lib/log4j-slf4j-impl-2.16.0.jar:/flink/lib/ojdbc8-21.5.0.0.jar:/flink/lib/vvp-flink-ha-kubernetes-flink113-1.4-20211013.091138-2.jar:/flink/lib/flink-dist_2.12-1.13.5-stream1.jar:::
I tried multiple things:
Included the driver in the flink/lib directory and the flink-connector-jdbc connector was packaged within the the jar and .withDriverName("oracle.jdbc.OracleDriver") /.withDriverName("oracle.jdbc.driver.OracleDriver")
Included both the driver and the connector into the flink/lib directory and .withDriverName("oracle.jdbc.OracleDriver") / .withDriverName("oracle.jdbc.driver.OracleDriver")
I also tried to change the classloading configuration to classloader.parent-first-patterns.additional: oracle.jdbc.
but nothing seems to be working for me. The exception is:
failure cause: java.io.IOException: unable to open JDBC writer
at org.apache.flink.connector.jdbc.internal.AbstractJdbcOutputFormat.open(AbstractJdbcOutputFormat.java:56)
at org.apache.flink.connector.jdbc.internal.JdbcBatchingOutputFormat.open(JdbcBatchingOutputFormat.java:115)
at org.apache.flink.connector.jdbc.internal.GenericJdbcSinkFunction.open(GenericJdbcSinkFunction.java:49)
at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102)
at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:46)
at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:442)
at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:585)
at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.call(StreamTaskActionExecutor.java:100)
at org.apache.flink.streaming.runtime.tasks.StreamTask.executeRestore(StreamTask.java:565)
at org.apache.flink.streaming.runtime.tasks.StreamTask.runWithCleanUpOnFail(StreamTask.java:650)
at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:540)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:759)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:566)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: No suitable driver found for "jdbc:oracle:thin:#//SOMECONNECTION"
at org.apache.flink.connector.jdbc.internal.connection.SimpleJdbcConnectionProvider.getOrEstablishConnection(SimpleJdbcConnectionProvider.java:126)
at org.apache.flink.connector.jdbc.internal.AbstractJdbcOutputFormat.open(AbstractJdbcOutputFormat.java:54)
... 14 more
What am I missing?
There is no support in Flink 1.13 for Oracle via JDBC, that was only added in Flink 1.15
I'm trying to install create a container that runs a Payaraserver with my JAX-RS application. Getting the server running wasn't too hard, I simply used the official image. However, when I create the Connection Pool I was not able to ping, and I got this error message:
Ping Connection Pool failed for PostgreSQLPool.
Class name is wrong or classpath is not set for :
org.postgresql.ds.PGConnectionPoolDataSource Please check the server.log for more details.
Also, when i tried to upload the .war file (after I had created the DataSource) I got this error message:
Error occurred during deployment: Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.7.7.payara-p3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception:
java.sql.SQLException: Error in allocating a connection. Cause:
org.postgresql.ds.PGConnectionPoolDataSource cannot be cast to javax.sql.DataSource Error Code:
0. Please see server.log for more details.
After a bit of digging I thought that the problem was that I did not have the postgre jdbc driver in the container. I created this Dockerfile:
FROM payara/server-full
COPY postgresql-42.2.18.jar /opt/payara41/glassfish/domains/domain1/lib
, which I thought would add the .jar file to the container. Unfortunately, no change was made. I have the exact same configurations on a local installation of Payara and everything works just fine there.
Is there something that I'm missing? I'm quite new to dockers, so if someone would be able to pint me in the right direction, I would really appreciate it.
I installed neo4j via homebrew, but when I want to start the server by typing
$ neo4j start
I get the following:
Started neo4j (pid 8480). By default, it is available at http://localhost:7474/
There may be a short delay until the server is ready.
See /usr/local/Cellar/neo4j/3.0.3/libexec/logs/neo4j.log for current status.
The content of the log file is added below (I apologize for the layout).[*1]
I'm using neo4j version 3.0.0-M02 and java version jdk1.8.0_20(information is included in .bash_profile). I'd need to have neo4j running on my Mac (OS X 10.11.5) for a project. I also tried installing it by downloading the .dmg file from the neo4js webiste, but again no luck (there I get the error
Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#52c870fe' was successfully initialized, but failed to start. Please see attached cause exception.
Any help on this would be much appreciated.
[*1]
Content of neo4j.log file:
2016-06-25 10:27:34.675+0000 INFO Starting...
2016-06-25 10:27:35.146+0000 INFO Bolt enabled on localhost:7687.
2016-06-25 10:27:35.449+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#17013b6f' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#17013b6f' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#17013b6f' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:87)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:66)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase#17013b6f' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /usr/local/Cellar/neo4j/3.0.3/libexec/data/databases/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
at org.neo4j.server.CommunityNeoServer.lambda$static$31(CommunityNeoServer.java:55)
at org.neo4j.server.CommunityNeoServer$$Lambda$43/1286783232.newGraphDatabase(Unknown Source)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate#4a0448ef' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:416)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:62)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:98)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:503)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:99)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
... 11 more
Caused by: java.lang.NoSuchMethodError: org.apache.lucene.analysis.core.WhitespaceAnalyzer: method <init>()V not found
at org.neo4j.index.impl.lucene.legacy.LuceneDataSource.<clinit>(LuceneDataSource.java:105)
at org.neo4j.index.impl.lucene.legacy.LuceneIndexImplementation.init(LuceneIndexImplementation.java:76)
at org.neo4j.kernel.lifecycle.Lifecycles$1.init(Lifecycles.java:37)
at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.init(Lifecycle.java:63)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:406)
... 20 more
So, the Neo4j Page says to run $NEO4J_HOME/bin/neo4j console. Additionally I would run it as root (using su or sudo). Please check the write permissions of your neo4j folder also and that port 7474 is free to use.
Neo4j usually provides installation scrips. I believe for your version it is bin/neo4j-shared.sh
The stacktrace is quite clear, there's a classpath clash with a Lucene library. That NoSuchMethodError suggests you have another lucene library installed and visible in the classpath. This causes the classloader to load a different version from the library from the one Neo4J needs.
Caused by: java.lang.NoSuchMethodError: org.apache.lucene.analysis.core.WhitespaceAnalyzer: method <init>()V not found
at org.neo4j.index.impl.lucene.legacy.LuceneDataSource.<clinit>(LuceneDataSource.java:105)
at org.neo4j.index.impl.lucene.legacy.LuceneIndexImplementation.init(LuceneIndexImplementation.java:76)
at org.neo4j.kernel.lifecycle.Lifecycles$1.init(Lifecycles.java:37)
at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.init(Lifecycle.java:63)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:406)
... 20 more
A few things to check:
Do you have lucene installed too?
Do you have any lucene libraries in the endorsed folder of the jdk?
Do you have a CLASSPATH variable including a lucene library?
Did you install more than 1 neo4j version from homebrew? (maybe this left old libraries installed)
Try to modify the jvm args neo4j receives, and add -verbose:class to see from where that class is loaded.
I just tried installing neo4j 3.0.3 on my Mac, worked seamlessly:
neo4j-javascript-driver mh$ brew upgrade neo4j
==> Upgrading 1 outdated package, with result:
neo4j 3.0.3
==> Upgrading neo4j
==> Downloading http://dist.neo4j.org/neo4j-community-3.0.3-unix.tar.gz
######################################################################## 100,0%
🍺 /usr/local/Cellar/neo4j/3.0.3: 91 files, 65.1M, built in 38 seconds
Ich:neo4j-javascript-driver mh$ export JAVA_HOME=`java_home -v 1.8`
Ich:neo4j-javascript-driver mh$ killall java
No matching processes belonging to you were found
Ich:neo4j-javascript-driver mh$ neo4j start
Starting Neo4j.
Started neo4j (pid 75890). By default, it is available at http://localhost:7474/
There may be a short delay until the server is ready.
See /usr/local/Cellar/neo4j/3.0.3/libexec/logs/neo4j.log for current status.
Ich:neo4j-javascript-driver mh$ less /usr/local/Cellar/neo4j/3.0.3/libexec/logs/neo4j.log
Ich:neo4j-javascript-driver mh$ less /usr/local/Cellar/neo4j/3.0.3/libexec/logs/debug.log
Ich:neo4j-javascript-driver mh$ neo4j console
Neo4j is already running (pid 75890).
Ich:neo4j-javascript-driver mh$ neo4j stop
Stopping Neo4j.. stopped
Ich:neo4j-javascript-driver mh$ neo4j console
Starting Neo4j.
2016-06-25 16:25:16.926+0000 INFO Starting...
2016-06-25 16:25:17.723+0000 INFO Bolt enabled on localhost:7687.
2016-06-25 16:25:20.667+0000 INFO Started.
2016-06-25 16:25:22.280+0000 INFO Remote interface available at http://localhost:7474/
Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /home/manish/Softwares/neo4j-enterprise-2.1.6/data/graph.db
CausedBy: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#2a792260' was successfully initialized, but failed to start. Please see attached cause exception.
CausedBy: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#23d7c3d2' was successfully initialized, but failed to start. Please see attached cause exception.
CausedBy : No schema index provider org.neo4j.kernel.api.index.SchemaIndexProvider found. Kernel extensions available on classpath: Class path entries: /home/manish/NetBeansProjects/ClassLibOperations/store/ClassLibNeo4jOperations.jar /home/manish/NetBeansProjects/ClassLib2/store/2.jar /home/manish/NetBeansProjects/ClassLibB/store/3.jar /home/manish/NetBeansProjects/ExecuteJarFile/build/classes
I am getting the above exception while executing the line :
database = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH );
The scenario is something like this :
I have a class library for operation with neo4j graph db named ClassLibNeo4jOperations. This class library has all the references required for working with neo4j.
Now I am packaging this ClassLibrary as ClassLibNeo4jOperations.jar and adding it as reference in a Console Application ExecuteJarFile.
Now when i am calling a method of this jar file this line
database = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH ); is executed which throws the above mentioned exception.
The JAR (ClassLibNeo4jOperations.jar) is a fat jar ,created using the method mentioned at How to build fat jar
Make sure you have neo4j-lucene-index.jar on your classpath.
I'm using the following on Windows 7:
neo4j-community-1.9.2
Java 7 Update 25
I have Windows Firewall disabled.
When I start Neo4j.bat, both as Administrator and normally, I get the following message:
c:\Tools\neo4j\bin>Neo4j.bat
28/07/13 9:34:27 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup tim
eout to: 120000ms based on -1
A blank Java console window pops up, no messages, then the window disappears after a minute or so.
When I go to http://localhost:7474/, I just get a server not found error.
If I try to install it as a service, the service wouldn't start.
Any ideas what I need to do to start Neo4j? I see here that Neo4j 1.9 does support Java 7:
http://blog.neo4j.org/2013/03/neo4j-19m05-released-wrapping-up.html
base.bat correctly points to windows-service-wrapper-5.jar, so not the windows-service-wrapper-*.jar problem that some people have had in the past. It would be helpful if it outputted an error message.
I just tried it with neo4j 2.0 milestone, and it didn't make any difference. The Java window pops up with no messages, http://localhost:7474/ gets a server not found error, then the Java window closes after a minute or two.
I added JAVA_HOME and JRE_HOME system variables, made no difference. I think I would get an error if Neo4j was not able to locate Java anyway.
I've fixed it.
With help from Neo4j's Google Group, I looked at the logs in data/logs/*.log and data/graph.db/messages.log, and found the following exception:
Caused by: java.rmi.server.ExportException: Port already in use: 1337; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Once I disabled my other service that uses that port, Neo4j's web admin at http://localhost:7474 worked. I then found out port 1337 is used by Neo4j's remote shell, I disabled it by adding enable_remote_shell = false to neo4j.properties, then I was able to have both Neo4j and my other service running.
I'm using the version 2.2.1 community edition of Neo4j on Windows 7, Java 1.8 update 45
In my case the log file messages.log was under default.graphdb directory. In there, you'll see the root cause of the problem.