# Elasticsearch.service failing on Debian

**URL:** <https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366>\
**Category:** Elasticsearch\
**Created:** [July 12, 2022, 1:31am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366 "2022-07-12T01:31:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 1:31am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/1 "2022-07-12T01:31:33Z")

</div>

My operating system is Debian 11 (Bullseye), it runs on a Pentium E5800

I've installed JDK/Java 11 (and set the path), apt-transport-https, the Elasticsearch keys and repo, and have updated my system multiple times. I've also tried rebooting the machines, but I have had no luck.

I'm able to start elasticsearch.service, but after ~30 seconds it always fails. When I look at the service status, I see the following log:

```auto
root@debian11:~# sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-07-11 21:16:36 EDT; 44s ago
       Docs: http://www.elastic.co
    Process: 983 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
   Main PID: 983 (code=exited, status=1/FAILURE)
        CPU: 30.973s

Jul 11 21:16:15 freedom systemd[1]: Started Elasticsearch.
Jul 11 21:16:17 freedom elasticsearch[983]: OpenJDK Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Jul 11 21:16:17 freedom elasticsearch[983]: OpenJDK Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=0
Jul 11 21:16:36 freedom systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jul 11 21:16:36 freedom systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Jul 11 21:16:36 freedom systemd[1]: elasticsearch.service: Consumed 30.973s CPU time.

```

Here are the contents of "/var/lib/elasticsearch/my-elasticsearch.log", it should be noted that "my-elasticsearch" is the clustername: [https://pastebin.com/Vfun3s92](https://pastebin.com/Vfun3s92)

Please let me know your thoughts on this.

Edit: Edit: I also attempted to uninstall and reinstall it, but with no luck. I initially installed version 6.x, but then I installed 8.x. Here's what I used for instructions: [How To Install And Setup Elasticsearch Engine On Linux - YouTube](https://www.youtube.com/watch?v=63nS1Z-pIfI)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 3:22am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/2 "2022-07-12T03:22:10Z")

</div>

Hi @kamie Welcome to the community.

Couple things...

> [@kamie](#):
>
> I also attempted to uninstall and reinstall it, but with no luck. I initially installed version 6.x, but then I installed 8.x

That is probably one of the issues... If you actually installed 6.8 started it then 8.0 on top of it that is probably the issue..

Unless your purged / manually cleaned up all the directories then the install you can't install 8.0 directly over 6.8.

So you will need to do that ... Completely clean up clean up all the directories [see here](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html#deb-layout)

2nd I would recommend following [our documents](https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html) not a you tube video.

3rd your paste bin is empty as far as I can tell.

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 5:17am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/3 "2022-07-12T05:17:40Z")

</div>

Much appreciated. Are there only packages for amd64, or is there anything that will work with i386?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 5:39am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/4 "2022-07-12T05:39:05Z")

</div>

The deb from here

`https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.2-amd64.deb`

Should work on x86\_64 architectures. I do not think that is your problem.

You could always just download the `tar.gz` in a fresh directory and try it that way... see [here](https://www.elastic.co/guide/en/elasticsearch/reference/8.3/targz.html)

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 5:41am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/5 "2022-07-12T05:41:45Z")

</div>

Once I get to entering `sudo dpkg -i elasticsearch-8.3.2-amd64.deb`

It gives me this output.

```auto
dpkg: error processing archive elasticsearch-8.3.2-amd64.deb (--install):
 package architecture (amd64) does not match system (i386)
Errors were encountered while processing:
 elasticsearch-8.3.2-amd64.deb

```

Is it ok for me to proceed, or do I need to find another way now?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 5:49am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/6 "2022-07-12T05:49:09Z")

</div>

Apologies / Interesting it has been a loong time since I have see that... sorry I was not thinking / looking clearly yes, unfortunately i386 is only 32bit processor it is not x86\_64 hmmm... all our releases are for 64bit now.

You could try docker but I am not sure about that either.... I think you are going to need a little bit new server.

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 5:51am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/7 "2022-07-12T05:51:20Z")

</div>

Oddly enough, it returns i386 as it's architecture but it supports 64 bit operating systems, so I guess it's technically i398/i686.

If the amd64 architecture won't work, will the archived package also suffer the same trouble?

Edit: Looking on the wiki, it is indeed x86\_64, fortunately

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 5:54am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/8 "2022-07-12T05:54:13Z")

</div>

> [@kamie](#):
>
> If the amd64 architecture won't work, will the archived package also suffer the same trouble?

I don't know give it a try and report back...

How did you originally get it installed at the top? I am confused? 🙂

```auto
root@debian11:~# sudo systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-07-11 21:16:36 EDT; 44s ago
       Docs: http://www.elastic.co
...

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 12, 2022, 5:56am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/9 "2022-07-12T05:56:54Z")

</div>

Elasticsearch requires a 64-bit operating system.

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 6:07am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/10 "2022-07-12T06:07:12Z")

</div>

It's a 64 bit OS, I think the pentium 5800 works for i386 and i686

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 6:13am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/11 "2022-07-12T06:13:35Z")

</div>

I originally followed a youtube video here: [How To Install And Setup Elasticsearch Engine On Linux - YouTube](https://www.youtube.com/watch?v=63nS1Z-pIfI)

They guy in the video did it a very different way from the documentation.

Basically, the only major difference was the use of add-apt-repository which I used to install a package at [https://artifacts.elastic.co/packages/6.x/apt](https://artifacts.elastic.co/packages/6.x/apt) as stable main.

From there I installed elasticsearch (`sudo apt install elasticsearch`), which installed it as a service managed by systemctl on my Debian machine.

To correct my command line input you quoted, it should say `sudo systemctl status elasticsearch.service`

After I checked the status and waited a few seconds, I received the above error. It's the same output from the log file, which for whatever reason seems to have been deleted by pastebin moderation.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 6:18am UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/12 "2022-07-12T06:18:16Z")

</div>

Try the tar.gz and report back

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 4:43pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/13 "2022-07-12T16:43:40Z")

</div>

I used the instructions here:

When I got to running `./bin/elasticsearch`, I received an error saying that the file ./bin/elasticsearch doesn't exist. Thoughts?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 5:23pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/14 "2022-07-12T17:23:31Z")

</div>

@kamie if you want our help we need details.. otherwise we are just guessing...

> [@kamie](#):
>
> I used the instructions here:

What instructions?

Can you show the exact command, path and output I can not help without seeing details.

Is the file there? did you check? Is it executable, with the correct permissions? What directory did you run the command from?

can you run and `ls -l` on the `./bin` directory

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 7:13pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/15 "2022-07-12T19:13:12Z")

</div>

Apologies, I'm not sure why it didn't show, here they are again [Install Elasticsearch from archive on Linux or MacOS | Elasticsearch Guide [8.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.3/targz.html#targz-enable-indices)

To summarize, I executed the following commands in the root dir:

```auto
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.2-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.3.2-linux-x86_64.tar.gz.sha512
shasum -a 512 -c elasticsearch-8.3.2-linux-x86_64.tar.gz.sha512 
tar -xzf elasticsearch-8.3.2-linux-x86_64.tar.gz
cd elasticsearch-8.3.2/

```

When inspecting the ./bin dir, it doesn't look like there are any directories called "elasticsearch"

I can see there is a directory called `~/elasticsearch-8.3.2` . There is, however, a ./bin/elasticsearch inside of this directory. When I run `./bin/elasticsearch` in the directory, I receive the same error messages here:

```auto
./bin/elasticsearch-cli: line 14: /root/elasticsearch-8.3.2/jdk/bin/java: cannot execute binary file: Exec format error
./bin/elasticsearch-cli: line 14: /root/elasticsearch-8.3.2/jdk/bin/java: Success

```

Thanks

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 7:17pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/16 "2022-07-12T19:17:06Z")

</div>

> [@kamie](#):
>
> ```auto
> ./bin/elasticsearch-cli: line 14: /root/elasticsearch-8.3.2/jdk/bin/java: cannot execute binary file: Exec format error
> 
> ```

Yes, so that means the elasticsearch binary will not run on / is not compatible that OS / HW combination.

Back to what @Christian_Dahlqvist said you are going to need true 64bit OS / Server.

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 8:12pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/17 "2022-07-12T20:12:01Z")

</div>

That's weird, because the Pentium specs say that it has a 64 bit instruction set ([Intel® Pentium® Processor E5800](https://www.intel.com/content/www/us/en/products/sku/42802/intel-pentium-processor-e5800-2m-cache-3-20-ghz-800-mhz-fsb/specifications.html)).

On top of that, the OS I installed was specifically for 64 bit processors (i686 specifically), running `dpkg --print-architecture` confirms this.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 8:15pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/18 "2022-07-12T20:15:53Z")

</div>

I am not sure what to tell you...  
`cannot execute binary file: Exec format error`  
means the binary is not compatible.

BTW it is complaining that the `java` version that is packaged along with elasticsearch is not compatible.

`/root/elasticsearch-8.3.2/jdk/bin/java: cannot execute binary file: Exec format error`

---

<div class="post-metadata">

**Author:** ![kamie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamie/32/98989_2.png) [@kamie](https://discuss.elastic.co/u/kamie)\
**Post date:** [July 12, 2022, 8:22pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/19 "2022-07-12T20:22:10Z")

</div>

I had Java 11 installed to this machine before installing elasticsearch, would this perhaps be the problem? I'd rather avoid uninstalling it unless we're 100% certain that this is the root cause, since there are other java-dependent applications running in the background at the moment.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 12, 2022, 8:32pm UTC](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366/20 "2022-07-12T20:32:46Z")

</div>

I am not 100% sure of anything.

Elasticsearch is using the pre-packaged java that comes with elasticsearch... so the error above should not have anything to do with any other java installed.

[Next page](https://discuss.elastic.co/t/elasticsearch-service-failing-on-debian/309366.md?page=2)
