Literally. It appears that there are already many people with similar problems. Maybe a question similar to my problem. But I don't find a solution yet, so I write it in detail.
I installed nexus on the Centos7 server as described in tutorial. The tutorial records the execStart
and execStop
commands in the service file incorrectly. I fixed it anyway. However, running Nexus will terminate immediately.
There were some answers to the previous question.
However, the immediate termination is not resolved.
I think the only hint is the following. The official document contains information about the pid file.
If the service pid file cannot be written the service startup will silently fail, without any logging statements written to the nexus.log.
I cannot find the nexus.log
file. This means that the pid file cannot be created according to the above information. But it's just jvm.log
only exists. After connecting to the nexus account(created to run Nexus) and manually creating the file in /tmp
folder, it was possible to create and delete without any permission issues. However, if I manually turn on Nexus in that account, it will also shut down immediately.
How can you fix it? I'm waiting for help.
I discovered that error logs were piled up in the Nexus installation folder while I was looking at the Nexus related logs. The file name is as follows: hs_err_pid19999.log
(Only the numbers are different.)
In the log, I found the following message.
There is insufficient memory for the Java Runtime Environment to continue. Native memory allocation (mmap) failed to map 1890254848 bytes for committing reserved memory.
Possible solutions:
- Decrease Java heap size (-Xmx/-Xms)
- Decrease number of Java threads
- Decrease Java thread stack sizes (-Xss)
My Xmx
, Xms
, and XX
were 2703m
. And my server had 2GB of RAM. I modified them to 512m
. And now, solve the problem. I hope it will be a problem for people in the same situation.