Want to subscribe to topics you're interested in?
Become a Member

Install Centminmod breaks elastic search

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Earl, Mar 12, 2020.

  1. Earl

    Earl New Member

    3
    2
    3
    Sep 17, 2015
    Ratings:
    +2
    Local Time:
    2:17 AM
    I'm trying to setup XenForo on centminmod, but elastic search daemon fails after installing centminmod.

    • CentOS Version: CentOS Linux release 7.7.1908 (Core) 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? No
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      

      Code:
      cat: /etc/centminmod/custom_config.inc: No such file or directory
    This is how you reprouce the issue:
    Simply execute the latest centminmod install script with this command
    Code:
    yum -y update; curl -O https://centminmod.com/betainstaller73.sh && chmod 0700 betainstaller73.sh && bash betainstaller73.sh
    Then install the elastic search using this steps:

    Code:
    cat <<EOF | sudo tee /etc/yum.repos.d/elasticsearch.repo
    [elasticsearch-7.x]
    name=Elasticsearch repository for 7.x packages
    baseurl=https://artifacts.elastic.co/packages/oss-7.x/yum
    gpgcheck=1
    gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
    enabled=1
    autorefresh=1
    type=rpm-md
    EOF
    2.
    Code:
    sudo yum clean all
    sudo yum makecache
    3.
    Code:
    sudo yum -y install elasticsearch-oss
    4.
    Code:
    sudo systemctl enable --now elasticsearch
    And that last command will fail with an error:
    Code:
    Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
    Logs:
    Code:
    [[email protected] ~]# journalctl -xeu elasticsearch
    -- Logs begin at Mon 2020-03-09 17:30:21 UTC, end at Thu 2020-03-12 12:01:06 UTC. --
    Mar 12 12:00:27 sd-120273 systemd[1]: Starting Elasticsearch...
    -- Subject: Unit elasticsearch.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit elasticsearch.service has begun starting up.
    Mar 12 12:00:27 sd-120273 elasticsearch[60058]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: fatal error in thread [main], exiting
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:34)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:33)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:114)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:124)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.node.Node.start(Node.java:787)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:273)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:358)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.cli.Command.main(Command.java:90)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
    Mar 12 12:00:34 sd-120273 elasticsearch[60058]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
    Mar 12 12:00:35 sd-120273 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
    Mar 12 12:00:35 sd-120273 systemd[1]: Failed to start Elasticsearch.
    -- Subject: Unit elasticsearch.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit elasticsearch.service has failed.
    --
    -- The result is failed.
    Mar 12 12:00:35 sd-120273 systemd[1]: Unit elasticsearch.service entered failed state.
    Mar 12 12:00:35 sd-120273 systemd[1]: elasticsearch.service failed.
    
    This doesn't happen if I install elastic search without centminmod.
    Centminmod breaks elasticsearch somehow.

    Can anyone help to make elastic search work with centminmod installed server?
     
  2. Sunka

    Sunka Well-Known Member

    1,126
    311
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +504
    Local Time:
    10:47 PM
    Nginx 1.17.9
    MariaDB 10.3.22
  3. eva2000

    eva2000 Administrator Staff Member

    43,526
    9,875
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,251
    Local Time:
    6:47 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    incorrect Java version ??? Or could be related to needing to set -Djava.io.tmpdir= to a non /tmp directory as Centmin Mod disables /tmp execution permissions for security

    @Sunka ElasticSearch 7 install for CentOS 7 seems to work Install - Xenforo - CentOS 7.x - How To Install Elasticsearch 7.x for Xenforo
     
    • Agree Agree x 1
  4. Earl

    Earl New Member

    3
    2
    3
    Sep 17, 2015
    Ratings:
    +2
    Local Time:
    2:17 AM
    Yup, that's it Thanks @eva2000 & @Sunka very much for helping me.
    Code:
    mkdir /home/elasticsearch
    chown -R elasticsearch:elasticsearch /home/elasticsearch/
    
    and changing -Djava.io.tmpdir value to /home/elasticsearch fixed the problem.
    I didn't have to install any jdk at all.
     
    • Like Like x 2