# Error on sudo systemctl enable --now elasticsearch

**URL:** <https://discuss.elastic.co/t/error-on-sudo-systemctl-enable-now-elasticsearch/252199>\
**Category:** Elasticsearch\
**Created:** [October 15, 2020, 1:07pm UTC](https://discuss.elastic.co/t/error-on-sudo-systemctl-enable-now-elasticsearch/252199 "2020-10-15T13:07:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![robin76](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@robin76](https://discuss.elastic.co/u/robin76)\
**Post date:** [October 15, 2020, 1:07pm UTC](https://discuss.elastic.co/t/error-on-sudo-systemctl-enable-now-elasticsearch/252199/1 "2020-10-15T13:07:59Z")

</div>

Hi, I am new here.  
I am trying to install elasticsearch on my Centos 7.8 to support Magento 2.4]  
I followed all instruction but on enabling it with command

```auto
sudo systemctl enable --now elasticsearch

```

I have this error

Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

Then searching on journalctl -xe

```auto
Firewall: TCP_IN Blocked IN=enp2s0f0 OUT= MAC=ac:1f:6b:81:37:10:60:9c:9f:bd:2c:90:08:00 SRC=79.124.62.34 DST=134.119.190.175 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=54398 PROTO=TCP S

```

Which ports do I have to open on Firewall if this is the problem? Opening port I have this other error:

```auto
ott 15 14:06:41 systemd[1]: Unit elasticsearch.service entered failed state.
ott 15 14:06:41 systemd[1]: elasticsearch.service failed.
ott 15 14:06:41 polkitd[885]: Unregistered Authentication Agent for unix-process:5706:7660871 (system bus name :1.19303, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale it_IT.UTF-8) (disconnected from bus)
ott 15 14:06:41 sudo[5704]: pam_unix(sudo:session): session closed for user root

```

Do you have any idea of how to proceed?  
Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 15, 2020, 1:21pm UTC](https://discuss.elastic.co/t/error-on-sudo-systemctl-enable-now-elasticsearch/252199/2 "2020-10-15T13:21:41Z")

</div>

> [@robin76](#):
>
> Which ports do I have to open on Firewall

I don't know if it's the problem but at least if your node needs to communicate with other nodes, open `9300`.  
Or with another machine where the application is running, open `9200`.

Could you share the full elasticsearch logs?

---

<div class="post-metadata">

**Author:** ![robin76](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@robin76](https://discuss.elastic.co/u/robin76)\
**Post date:** [October 23, 2020, 8:21am UTC](https://discuss.elastic.co/t/error-on-sudo-systemctl-enable-now-elasticsearch/252199/3 "2020-10-23T08:21:18Z")

</div>

Hi, here it is:  
Il risultato è failed.

ott 23 09:19:11 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) systemd[1]: **Unit elasticsearch.service entered failed state.**

ott 23 09:19:11 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) systemd[1]: **elasticsearch.service failed.**

ott 23 09:19:11 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) polkitd[885]: **Unregistered Authentication Agent for unix-process:8678:75056179 (system bus name :1.188968, object path /org/freedeskt**

ott 23 09:19:11 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) sudo[8674]: pam\_unix(sudo:session): session closed for user root

ott 23 09:19:12 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) dovecot[12639]: pop3-login: Login: user=[xxxxxxxxxxxxxx@xxxxxxxxxxxxxx.it](mailto:xxxxxxxxxxxxxx@xxxxxxxxxxxxxx.it), method=PLAIN, rip=209.85.219.9, lip=134.119.190.175, mpid=9071, sessio

ott 23 09:19:12 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) kernel: **Firewall: _TCP\_IN Blocked_ IN=enp2s0f0 OUT= MAC=ac:1f:6b:81:37:10:60:9c:9f:bd:2c:90:08:00 SRC=195.211.253.86 DST=134.119.190.**

ott 23 09:19:12 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) dovecot[12639]: pop3(ordini@xxxxxxxxxxxxxx.it)\<9071\>: Disconnected: Logged out top=0/0, retr=0/0, del=0/2, size=64212, b

ott 23 09:19:20 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) kernel: **Firewall: _TCP\_IN Blocked_ IN=enp2s0f0 OUT= MAC=ac:1f:6b:81:37:10:60:9c:9f:bd:2c:90:08:00 SRC=79.124.62.34 DST=134.119.190.17**

ott 23 09:19:20 [xxxxxxxxxxxxxx.com](http://xxxxxxxxxxxxxx.com) dovecot[12639]: pop3-login: Login: user=[info@xxxxxxxxxxxxxx.it](mailto:info@xxxxxxxxxxxxxx.it), method=PLAIN, rip=209.85.222.140, lip=134.119.190.175, mpid=9073, sessio

lines 2401-2467/2467 (END)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 23, 2020, 9:30am UTC](https://discuss.elastic.co/t/error-on-sudo-systemctl-enable-now-elasticsearch/252199/4 "2020-10-23T09:30:02Z")

</div>

This is not elasticsearch logs. Could you go to the elasticsearch logs dir and share the logs please?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 20, 2020, 9:30am UTC](https://discuss.elastic.co/t/error-on-sudo-systemctl-enable-now-elasticsearch/252199/5 "2020-11-20T09:30:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
