Elasticsearch stopped with Cassandra

Hi, i have a big problem with Elasticsearch and this is that when i install Cassandra database automaticly Elastic is stopped, then i see that Cassandra is running but Elastic not and later if i stop cassandra my Elasticsearch can start, why this? booth application are incompatible?
'''
● Elasticsearch.service - Elasticsearch
Loaded: loaded (/etc/systemd/system/Elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Mon 2021-09-27 17:46:47 -05; 2min 24s ago
Docs: https://www.elastic.co
Process: 683 ExecStart=/usr/share/Elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elastic>
Main PID: 683 (code=killed, signal=KILL)
Tasks: 0 (limit: 4713)
Memory: 10.3M
CGroup: /system.slice/Elasticsearch.service

Sep 27 17:09:53 hds systemd[1]: Starting Elasticsearch...
Sep 27 17:11:03 hds systemd[1]: Started Elasticsearch.
Sep 27 17:46:47 hds systemd[1]: Elasticsearch.service: Main process exited, code=killed, status=>
Sep 27 17:46:47 hds systemd[1]: Elasticsearch.service: Failed with result 'signal'.
'''

Welcome to our community! :smiley:

You really need to check your Elasticsearch logs directly to see what's happening.
However, we don't recommend running Elasticsearch alongside other resource heavy apps like cassandra.

Hi @warkolm well i'm installing the hive and in the documentation saying that i have that install Elasticsearch and cassandra, this is the message when try restart the services.

● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: signal) since Sun 2021-10-03 17:27:11 UTC; 17s ago
       Docs: https://www.elastic.co
    Process: 143734 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=killed, signal=KILL)
   Main PID: 143734 (code=killed, signal=KILL)

oct 03 17:27:07 hds systemd[1]: Starting Elasticsearch...
oct 03 17:27:11 hds systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL
oct 03 17:27:11 hds systemd[1]: elasticsearch.service: Failed with result 'signal'.
oct 03 17:27:11 hds systemd[1]: Failed to start Elasticsearch.
**# cat /var/log/elasticsearch/elasticsearch.log** 
[2021-10-03T01:30:00,001][INFO ][o.e.x.s.SnapshotRetentionTask] [hds] starting SLM retention snapshot cleanup task
[2021-10-03T01:30:00,000][INFO ][o.e.x.m.MlDailyMaintenanceService] [hds] triggering scheduled [ML] maintenance tasks
[2021-10-03T01:30:00,056][INFO ][o.e.x.s.SnapshotRetentionTask] [hds] there are no repositories to fetch, SLM retention snapshot cleanup task complete
[2021-10-03T01:30:00,062][INFO ][o.e.x.m.a.TransportDeleteExpiredDataAction] [hds] Deleting expired data
[2021-10-03T01:30:00,064][INFO ][o.e.x.m.j.r.UnusedStatsRemover] [hds] Successfully deleted [0] unused stats documents
[2021-10-03T01:30:00,065][INFO ][o.e.x.m.a.TransportDeleteExpiredDataAction] [hds] Completed deletion of expired ML data
[2021-10-03T01:30:00,065][INFO ][o.e.x.m.MlDailyMaintenanceService] [hds] Successfully completed [ML] maintenance task: triggerDeleteExpiredDataTask
**# cat /var/log/elasticsearch/elasticsearch_server.json** 
{"type": "server", "timestamp": "2021-10-03T01:30:00,000Z", "level": "INFO", "component": "o.e.x.m.MlDailyMaintenanceService", "cluster.name": "elasticsearch", "node.name": "hds", "message": "triggering scheduled [ML] maintenance tasks", "cluster.uuid": "0MN-IYgtTJac-d3pV1VBJw", "node.id": "o046776HTMOUYsp_OgJ9tQ"  }
{"type": "server", "timestamp": "2021-10-03T01:30:00,001Z", "level": "INFO", "component": "o.e.x.s.SnapshotRetentionTask", "cluster.name": "elasticsearch", "node.name": "hds", "message": "starting SLM retention snapshot cleanup task", "cluster.uuid": "0MN-IYgtTJac-d3pV1VBJw", "node.id": "o046776HTMOUYsp_OgJ9tQ"  }
{"type": "server", "timestamp": "2021-10-03T01:30:00,056Z", "level": "INFO", "component": "o.e.x.s.SnapshotRetentionTask", "cluster.name": "elasticsearch", "node.name": "hds", "message": "there are no repositories to fetch, SLM retention snapshot cleanup task complete", "cluster.uuid": "0MN-IYgtTJac-d3pV1VBJw", "node.id": "o046776HTMOUYsp_OgJ9tQ"  }
{"type": "server", "timestamp": "2021-10-03T01:30:00,062Z", "level": "INFO", "component": "o.e.x.m.a.TransportDeleteExpiredDataAction", "cluster.name": "elasticsearch", "node.name": "hds", "message": "Deleting expired data", "cluster.uuid": "0MN-IYgtTJac-d3pV1VBJw", "node.id": "o046776HTMOUYsp_OgJ9tQ"  }
{"type": "server", "timestamp": "2021-10-03T01:30:00,064Z", "level": "INFO", "component": "o.e.x.m.j.r.UnusedStatsRemover", "cluster.name": "elasticsearch", "node.name": "hds", "message": "Successfully deleted [0] unused stats documents", "cluster.uuid": "0MN-IYgtTJac-d3pV1VBJw", "node.id": "o046776HTMOUYsp_OgJ9tQ"  }
{"type": "server", "timestamp": "2021-10-03T01:30:00,065Z", "level": "INFO", "component": "o.e.x.m.a.TransportDeleteExpiredDataAction", "cluster.name": "elasticsearch", "node.name": "hds", "message": "Completed deletion of expired ML data", "cluster.uuid": "0MN-IYgtTJac-d3pV1VBJw", "node.id": "o046776HTMOUYsp_OgJ9tQ"  }
{"type": "server", "timestamp": "2021-10-03T01:30:00,065Z", "level": "INFO", "component": "o.e.x.m.MlDailyMaintenanceService", "cluster.name": "elasticsearch", "node.name": "hds", "message": "Successfully completed [ML] maintenance task: triggerDeleteExpiredDataTask", "cluster.uuid": "0MN-IYgtTJac-d3pV1VBJw", "node.id": "o046776HTMOUYsp_OgJ9tQ"  }

Please tell me if this possible that the service started.

There is nothing on those logs that tell why Elasticsearch is not starting, do you have anything else in the logs?

Also, look at the system log to see why the systemd service for Elasticsearch is not starting, it should be in /var/log/messages for red hat based systems and, I think, /var/log/syslog for debian based systems.

What are the specs of your server? As warkolm said, it is not recommend to run Elasticsearch alongside other heavy apps and Cassandra is pretty heavy to be run alongside Elasticsearch.

Depending on the specs of your server you won't be able to run both services in the same machine.