You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/08/29 04:30:50 UTC
[GitHub] [incubator-hugegraph] dnsisme opened a new issue, #1954: Failed to start hugeGraphServer,requires at least 128m free memory
dnsisme opened a new issue, #1954:
URL: https://github.com/apache/incubator-hugegraph/issues/1954
### Bug Type (问题类型)
server status (启动/运行异常)
### Before submit
- [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
### Environment (环境信息)
- Server Version: hugegraph-tools-1.16.0
- Backend: RocksDB x nodes, HDD
- OS: 8 CPUs, 31 G, CentOS Linux release 7.6.1810
- Data Size: xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
### Expected & Actual behavior (期望与实际表现)
```
During my installation, I failed to start the service. The download address of the installation package is:
wget https://github.com/hugegraph/hugegraph-tools/releases/download/v1.6.0/hugegraph-tools-1.6.0.tar.gz --no-check-certificate
setup scripts:
1)wget https://github.com/hugegraph/hugegraph-tools/releases/download/v1.6.0/hugegraph-tools-1.6.0.tar.gz --no-check-certificate
2)tar zxvf hugegraph-tools-1.6.0.tar.gz
3)cd hugegraph-tools-1.6.0
4)bin/hugegraph deploy -v 0.6 -p services
Start command
bin/hugegraph deploy -v 0.6 -p services
Startup error
Warning: please set JAVA_HOME variable, otherwise some libraries related to https may be missing
Initing HugeGraph Store...
2022-08-29 11:21:48 671 [main] [INFO ] com.baidu.hugegraph.cmd.InitStore [] - Init graph with config file: conf/hugegraph.properties
2022-08-29 11:21:48 778 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Opening backend store 'rocksdb' for graph 'hugegraph'
2022-08-29 11:21:48 815 [main] [INFO ] com.baidu.hugegraph.backend.store.rocksdb.RocksDBStore [] - Opening RocksDB with data path: rocksdb-data/schema
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/librocksdbjni5488875565228343916.so: /tmp/librocksdbjni5488875565228343916.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64-bit .so on a AARCH64-bit platform)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:78)
at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:56)
at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:64)
at org.rocksdb.RocksDB.<clinit>(RocksDB.java:35)
at org.rocksdb.Options.<clinit>(Options.java:25)
at com.baidu.hugegraph.backend.store.rocksdb.RocksDBStdSessions.mergeOldCFs(RocksDBStdSessions.java:195)
at com.baidu.hugegraph.backend.store.rocksdb.RocksDBStdSessions.<init>(RocksDBStdSessions.java:87)
at com.baidu.hugegraph.backend.store.rocksdb.RocksDBStore.newSessions(RocksDBStore.java:212)
at com.baidu.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:159)
at com.baidu.hugegraph.backend.store.rocksdb.RocksDBStore.open(RocksDBStore.java:140)
at com.baidu.hugegraph.backend.tx.AbstractTransaction.<init>(AbstractTransaction.java:72)
at com.baidu.hugegraph.backend.tx.IndexableTransaction.<init>(IndexableTransaction.java:30)
at com.baidu.hugegraph.backend.tx.SchemaTransaction.<init>(SchemaTransaction.java:54)
at com.baidu.hugegraph.backend.cache.CachedSchemaTransaction.<init>(CachedSchemaTransaction.java:49)
at com.baidu.hugegraph.HugeGraph.openSchemaTransaction(HugeGraph.java:199)
at com.baidu.hugegraph.HugeGraph.access$300(HugeGraph.java:74)
at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.schemaTransaction(HugeGraph.java:612)
at com.baidu.hugegraph.HugeGraph$TinkerpopTransaction.doOpen(HugeGraph.java:530)
at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.open(AbstractTransaction.java:95)
at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:208)
at org.apache.tinkerpop.gremlin.structure.Transaction$READ_WRITE_BEHAVIOR$1.accept(Transaction.java:205)
at org.apache.tinkerpop.gremlin.structure.util.AbstractThreadLocalTransaction.doReadWrite(AbstractThreadLocalTransaction.java:92)
at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.readWrite(AbstractTransaction.java:146)
at com.baidu.hugegraph.HugeGraph.initBackend(HugeGraph.java:178)
at com.baidu.hugegraph.cmd.InitStore.initGraph(InitStore.java:100)
at com.baidu.hugegraph.cmd.InitStore.main(InitStore.java:86)
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://:8080/graphs)................The operation timed out when attempting to connect to http://:8080/graphs
See /data/work/hugegraph/hugegraph-tools-1.6.0/services/hugegraph-0.6.1/logs/hugegraph-server.log for HugeGraphServer log output.
Failed to start HugeGraphServer, please check the logs under '/data/work/hugegraph/hugegraph-tools-1.6.0/services/hugegraph-0.6.1/logs' for details
[root@ecs-56b9-0001 hugegraph-tools-1.6.0]# cat /data/work/hugegraph/hugegraph-tools-1.6.0/services/hugegraph-0.6.1/logs/hugegraph-server.log
Failed to start HugeGraphServer, requires at least 512m free memory
Failed to start HugeGraphServer, requires at least 256m free memory
Failed to start HugeGraphServer, requires at least 256m free memory
Failed to start HugeGraphServer, requires at least 128m free memory
After changing the MEM value according to the online tutorial, the same error will be reported
MIN_MEM=$((1*512))
MIN_MEM=$((1*256))
MIN_MEM=$((1*128))
hugegraph-server.sh context:
[root@ecs-56b9-0001 hugegraph-tools-1.6.0]# cat /data/work/hugegraph/hugegraph-tools-1.6.0/services/hugegraph-0.6.1/bin/hugegraph-server.sh
#!/bin/bash
abs_path() {
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
echo "$( cd -P "$( dirname "$SOURCE" )" && pwd )"
}
BIN=`abs_path`
TOP="$(cd $BIN/../ && pwd)"
. $BIN/util.sh
# The maximum and minium heap memory that service can use
MAX_MEM=$[32*1024]
MIN_MEM=$((1*256))
EXPECT_JDK_VERSION=1.8
# ${BASH_SOURCE[0]} is the path to this file
SOURCE="${BASH_SOURCE[0]}"
# Set $BIN to the absolute, symlinkless path to $SOURCE's parent
while [ -h "$SOURCE" ]; do
BIN="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$BIN/$SOURCE"
done
BIN="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Set $CFG to $BIN/../conf/
cd -P $BIN/../conf
CFG=$(pwd)
# Set $LIB to $BIN/../lib
cd -P $BIN/../lib
LIB=$(pwd)
# Set $LIB to $BIN/../ext
cd -P $BIN/../ext
EXT=$(pwd)
# Initialize classpath to $CFG
CP="$CFG"
# Add the slf4j-log4j12 binding
CP="$CP":$(find -L $LIB -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
# Add the jars in $BIN/../lib that start with "hugegraph"
CP="$CP":$(find -L $LIB -name 'hugegraph*.jar' | sort | tr '\n' ':')
# Add the remaining jars in $BIN/../lib.
CP="$CP":$(find -L $LIB -name '*.jar' \
\! -name 'hugegraph*' \
\! -name 'slf4j-log4j12*.jar' | sort | tr '\n' ':')
# Add the jars in $BIN/../ext (at any subdirectory depth)
CP="$CP":$(find -L $EXT -name '*.jar' | sort | tr '\n' ':')
# (Cygwin only) Use ; classpath separator and reformat paths for Windows ("C:\foo")
[[ $(uname) = CYGWIN* ]] && CP="$(cygpath -p -w "$CP")"
export CLASSPATH="${CLASSPATH:-}:$CP"
# Change to $BIN's parent
cd $BIN/..
export HUGEGRAPH_LOGDIR="$BIN/../logs"
if [ ! -d $HUGEGRAPH_LOGDIR ]; then
mkdir $HUGEGRAPH_LOGDIR
fi
# Find Java
if [ "$JAVA_HOME" = "" ] ; then
JAVA="java -server"
else
JAVA="$JAVA_HOME/bin/java -server"
fi
JAVA_VERSION=`$JAVA -version 2>&1 | awk 'NR==1{gsub(/"/,""); print $3}' \
| awk -F'_' '{print $1}'`
if [[ $? -ne 0 || $JAVA_VERSION < $EXPECT_JDK_VERSION ]]; then
echo "Please make sure that the JDK is installed and the version >= $EXPECT_JDK_VERSION" \
>> $HUGEGRAPH_LOGDIR/hugegraph-server.log
exit 1
fi
# Set Java options
if [ "$JAVA_OPTIONS" = "" ] ; then
XMX=`calc_xmx $MIN_MEM $MAX_MEM`
if [ $? -ne 0 ]; then
echo "Failed to start HugeGraphServer, requires at least ${MIN_MEM}m free memory" \
>> $HUGEGRAPH_LOGDIR/hugegraph-server.log
exit 1
fi
JAVA_OPTIONS="-Xms256m -Xmx${XMX}m -javaagent:$LIB/jamm-0.3.0.jar"
fi
# Execute the application and return its exit code
set -x
ARGS="$@"
if [ $# = 0 ] ; then
ARGS="conf/gremlin-server.yaml conf/rest-server.properties"
fi
exec $JAVA -Dname="HugeGraphServer" -Dhugegraph.logdir="HUGEGRAPH_LOGDIR" \
-Dlog4j.configurationFile=conf/graph-server-log4j.xml \
$JAVA_OPTIONS -cp $CP:$CLASSPATH com.baidu.hugegraph.dist.HugeGraphServer $ARGS
```
### Vertex/Edge example (问题点 / 边数据举例)
_No response_
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-hugegraph] imbajin commented on issue #1954: Failed to start hugeGraphServer,requires at least 128m free memory
Posted by GitBox <gi...@apache.org>.
imbajin commented on issue #1954:
URL: https://github.com/apache/incubator-hugegraph/issues/1954#issuecomment-1230037255
A little confuse about the error info:
1. the main problem is linked to `hugegraph-tools`? or `hugegraph-server`? (or both?) now the message is mixed and could u please simplify it?
2. try the latest server/tool version in release page
3. try to set your `JAVA_HOME` env
4. `free -m` to show/check the free memory (to ensure why it alert memory insufficient?)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-hugegraph] dnsisme commented on issue #1954: Failed to start hugeGraphServer,requires at least 128m free memory
Posted by GitBox <gi...@apache.org>.
dnsisme commented on issue #1954:
URL: https://github.com/apache/incubator-hugegraph/issues/1954#issuecomment-1231091437
1.the main problem is linked to hugegraph-tools
2.I tried to install the latest tool version:hugegraph-tools-1.6.0
3.after set my JAVA_HOME env
![image](https://user-images.githubusercontent.com/88881577/187340849-92153a87-820b-48d1-a7fc-53143bdb7440.png)
4.the results of free -m
![image](https://user-images.githubusercontent.com/88881577/187340969-b301bd14-925e-401a-9797-c406543c27ec.png)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org