2015-11-29 106 views
1

雖然我在/neo4j/versions/2.1/neo4j-2.1/bin中運行sh neo4j console。我收到以下錯誤:在openshift中安裝neo4j

WARNING: Max 16384 open files allowed, minimum of 40 000 recommended. See the Neo4j manual. 
Starting Neo4j Server console-mode... 
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 -XX:-OmitStackTraceInFastThrow 
2015-11-29 11:58:24.427+0000 INFO [API] Setting startup timeout to: 120000ms based on -1 
Exception in thread "main" org.apache.commons.configuration.ConversionException: 'org.neo4j.server.webserver.port' doesn't map to an Integer object 
    at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:845) 
    at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:819) 
    at org.neo4j.server.Bootstrapper.webServerPort(Bootstrapper.java:239) 
    at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:130) 
    at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:63) 
Caused by: org.apache.commons.configuration.ConversionException: Could not convert "${OPENSHIFT_NEO4J_DB_PORT}" to java.lang.Integer 
    at org.apache.commons.configuration.PropertyConverter.toNumber(PropertyConverter.java:413) 
    at org.apache.commons.configuration.PropertyConverter.toInteger(PropertyConverter.java:260) 
    at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:841) 
    ... 4 more 
Caused by: java.lang.NumberFormatException: For input string: ""${OPENSHIFT_NEO4J_DB_PORT}"" 
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) 
    at java.lang.Integer.parseInt(Integer.java:481) 
    at java.lang.Integer.<init>(Integer.java:677) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
    at org.apache.commons.configuration.PropertyConverter.toNumber(PropertyConverter.java:409) 
    ... 6 more 

回答

2

好像你把一個shell變量Caused by: java.lang.NumberFormatException: For input string: ""${OPENSHIFT_NEO4J_DB_PORT}"" 中的Neo4j的neo4j-server.properties這是不支持的。

嘗試修改你的配置腳本,而更換口內嵌在配置文件中,就像這樣:

sed -i -e "s|org.neo4j.server.webserver.port=.*|org.neo4j.server.webserver.port=${OPENSHIFT_NEO4J_DB_PORT}|g" $NEO4J_HOME/conf/neo4j-server.properties