Reputation: 687
I am running Neo4j in embedded mode on a remote Linux server... everything works well except the ability to connect to the web interface /host:7474/webadmin/
Using Neo4j 1.8.2 Major Stable Version
Relevant POM artifacts:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.2.0.RELEASE</version>
<exclusions>
<exclusion>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>1.8.2</version>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>org.mortbay.jetty</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>1.8.2</version>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
<classifier>static-web</classifier>
</dependency>
Neo4j config XML file:
<context:annotation-config />
<context:spring-configured />
<bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase">
<constructor-arg value="#{props['neo4j.location']}" />
<constructor-arg>
<map>
<entry key="enable_remote_shell" value="true" />
</map>
</constructor-arg>
</bean>
<neo4j:config graphDatabaseService="graphDatabaseService" />
<bean id="serverWrapper" class="org.neo4j.server.WrappingNeoServerBootstrapper"
init-method="start" destroy-method="stop">
<constructor-arg ref="graphDatabaseService" />
</bean>
<tx:annotation-driven mode="aspectj"
transaction-manager="transactionManager" />
<neo4j:repositories base-package="com.writelife.server.graph.repository"
repository-impl-postfix="CustomImpl" />
neo4j-server.properties file:
# location of the database directory
org.neo4j.server.database.location=data/graph.db
org.neo4j.server.webserver.address=0.0.0.0
org.neo4j.server.webserver.port=7474
# Turn https-support on/off
org.neo4j.server.webserver.https.enabled=true
# https port (for all data, administrative, and UI access)
org.neo4j.server.webserver.https.port=7473
# Certificate location (auto generated if the file does not exist)
org.neo4j.server.webserver.https.cert.location=conf/ssl/snakeoil.cert
# Private key location (auto generated if the file does not exist)
org.neo4j.server.webserver.https.key.location=conf/ssl/snakeoil.key
org.neo4j.server.webserver.https.keystore.location=data/keystore
org.neo4j.server.webadmin.rrdb.location=data/rrd
org.neo4j.server.webadmin.data.uri=/db/data/
# REST endpoint of the administration API (used by Webadmin)
org.neo4j.server.webadmin.management.uri=/db/manage/
# Low-level graph engine tuning file
org.neo4j.server.db.tuning.properties=conf/neo4j.properties
org.neo4j.server.http.log.enabled=false
org.neo4j.server.http.log.config=conf/neo4j-http-logging.xml
DB location on the file system:
/opt/neo4j-community-1.8.2/data/graph.db
Can someone explain me what am I doing wrong? How can I monitor the web interface in that consultation?
Thanks
Upvotes: 1
Views: 1870
Reputation: 41676
Did you follow the instructions here?
http://docs.neo4j.org/chunked/stable/server-embedded.html
I think the neo4j-server.properties are not used. The properties you pass in to the graphdatabase are used for the database only not for the web-ui / http-server on top of that.
I think you can pass them in to the WrappingNeoServerBootstrapper
Seems to be working with a Server-Configurator. There is a also a property-file based Server configurator PropertyFileConfigurator
which is passed the neo4j-server.properties
file as a File
object in its constructor.
I think your maven config misses the static resources too.
<dependencies>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>org.neo4j.app</groupId>
<artifactId>neo4j-server</artifactId>
<classifier>static-web</classifier>
<version>1.8.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>neo4j-snapshot-repository</id>
<name>Neo4j Maven 2 snapshot repository</name>
<url>http://m2.neo4j.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
Upvotes: 2