eucalyptus-cloud.service 4.4.4 不断因 JVM 内存错误而崩溃

eucalyptus-cloud.service 4.4.4 constantly crashing with JVM memory errors

我正在尝试完成手动安装指南。当我为控制台 (euare-accountcreate) 注册管理员帐户或注册服务 (euserv-register-service) 时,桉树云服务不一致地崩溃并出现相同的 JVM 内存错误。例如,有几次我已经能够注册 UFS 或创建管理员帐户,但是当我继续执行安装中的另一个步骤时,它将失败并且检查服务状态显示它已崩溃。我没有处理 Java 内存错误的经验,可以真正使用一些帮助来了解发生了什么以及如何调查一般的此类错误:

[root@cloud ~]# euserv-describe-services ufs-10.0.0.2

euserv-describe-services: error: connection error (('Connection 
aborted.', BadStatusLine("''",)))
[root@cloud ~]# systemctl status eucalyptus-cloud -l
● eucalyptus-cloud.service - Eucalyptus cloud web services
Loaded: loaded (/usr/lib/systemd/system/eucalyptus-cloud.service; 
enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-10-10 08:45:09 EDT; 
4s ago
Process: 45951 ExecStart=/usr/sbin/eucalyptus-cloud $CLOUD_OPTS 
(code=exited, status=1/FAILURE)
Main PID: 45951 (code=exited, status=1/FAILURE)
CGroup: /system.slice/eucalyptus-cloud.service
       ├─46206 /usr/bin/postgres -D /var/lib/eucalyptus/db/data - 
h0.0.0.0 -p8777
       ├─46207 postgres: logger process                                         
       ├─46209 postgres: checkpointer process                                   
       ├─46210 postgres: writer process                                         
       ├─46211 postgres: wal writer process                                     
       ├─46212 postgres: autovacuum launcher process                            
       └─46213 postgres: stats collector process                                

Oct 10 08:45:08 cloud eucalyptus-cloud[45951]: OpenJDK 64-Bit Server VM 
warning: INFO: os::commit_memory(0x00007f496534b000, 12288, 0) failed; 
error='Cannot allocate memory' (errno=12)
Oct 10 08:45:08 cloud eucalyptus-cloud[45951]: #
Oct 10 08:45:08 cloud eucalyptus-cloud[45951]: # There is insufficient 
memory for the Java Runtime Environment to continue.
Oct 10 08:45:08 cloud eucalyptus-cloud[45951]: # Native memory 
allocation (mmap) failed to map 12288 bytes for committing reserved 
memory.
Oct 10 08:45:08 cloud eucalyptus-cloud[45951]: # An error report file 
with more information is saved as:
Oct 10 08:45:08 cloud eucalyptus-cloud[45951]: # 
/tmp/hs_err_pid45954.log
Oct 10 08:45:09 cloud eucalyptus-cloud[45951]: 2018-10-10 08:45:09 
45951 ERROR 0574 Service exit with a return value of 1.
Oct 10 08:45:09 cloud systemd[1]: eucalyptus-cloud.service: main 
 process exited, code=exited, status=1/FAILURE
 Oct 10 08:45:09 cloud systemd[1]: Unit eucalyptus-cloud.service 
 entered failed state.
 Oct 10 08:45:09 cloud systemd[1]: eucalyptus-cloud.service failed.

编辑以包含一些版本信息:

[root@cloud ~]# cat /etc/centos-release

CentOS Linux release 7.5.1804 (Core) 

[root@cloud ~]# java -version

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

编辑以注意我的困惑点:该系统仅使用了 25G RAM 和 223G 空闲内存。所以我需要帮助来理解 java 是如何 运行 内存不足的。

试试这个修复:

    echo 1999999 > /proc/sys/vm/max_map_count