# Stuck Installing 7.6 on Raspberry Pi 4 - curl: (7) Failed to connect to 192.168.1.20 port 9200: Connection refused

**URL:** <https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740>\
**Category:** Elasticsearch\
**Created:** [July 18, 2020, 10:50am UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740 "2020-07-18T10:50:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShaunM1976](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@ShaunM1976](https://discuss.elastic.co/u/ShaunM1976)\
**Post date:** [July 18, 2020, 10:50am UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740/1 "2020-07-18T10:50:55Z")

</div>

Hello lovely people, any experienced people out there that can help a newbie?

I'm trying to install elasticsearch on my Pi 4 so I can install Magento 2.4 on it. I'm using a brand new Pi 4 with new installation of Raspbian Buster.

My Pi's IP address on my network is 192.168.1.20

Here's what I've done…

sudo apt-get update  
sudo apt-get install elasticsearch  
sudo /bin/systemctl daemon-reload  
sudo /bin/systemctl enable elasticsearch.service  
service elasticsearch status

I get message….JVM flavor 'sun6' not understood (not sure if this is fatal or not)

 ![IMG_20200718_111056](https://us1.discourse-cdn.com/elastic/original/3X/6/2/624af13fa63ab06208e3e9521ff314340c030b4e.png)

I try...  
curl -X GET '[http://localhost:9200](http://localhost:9200);  
which gives  
curl: (7) Failed to connect to 192.168.1.20 port 9200: Connection refused

Tried editing /etc/elasticsearch/elasticsearch.yml uncommenting and updating  
#network.host: 192.168.0.1  
to  
network.host: 192.168.1.20

curl -X GET '[http://192.168.1.20:9200](http://192.168.1.20:9200);  
still gives  
curl: (7) Failed to connect to 192.168.1.20 port 9200: Connection refused

Tried editing /etc/elasticsearch/elasticsearch.yml again and changing to  
network.host: localhost  
curl -X GET '[http://localhost:9200](http://localhost:9200);

still gives  
curl: (7) Failed to connect to 192.168.1.20 port 9200: Connection refused

I can't find any log files in /var/log/elasticsearch/ - there are no files in there

In /var/lib/dpkg/status I see this..

 ![IMG_20200718_112408](https://us1.discourse-cdn.com/elastic/original/3X/e/3/e3b8fe43ebe60efaac4b12327fab390fc449cf8d.png)

I'm very new to linux, so not sure how to proceed to find out what the actual issue is, so I can then try and fix it.

After 2 days of searching forums for an answer, I'm stuck and would really appreciate any pointers.  
Thank you in advance. x  
Has anyone installed elasticsearch 7.6 on a Pi 4?

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [July 19, 2020, 3:12am UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740/2 "2020-07-19T03:12:09Z")

</div>

If you are new to Linux, making this all work on a Pi might be a challenge, but likely that Java Sun6 error is killing you - first thing is see if ES is running: "ps aux | grep java" to see if any java apps are running; if not, you'll have to figure out why it is not starting, also can check logs such as /var/log/elasticsearch

---

<div class="post-metadata">

**Author:** ![ShaunM1976](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@ShaunM1976](https://discuss.elastic.co/u/ShaunM1976)\
**Post date:** [July 22, 2020, 9:57am UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740/3 "2020-07-22T09:57:37Z")

</div>

Thanks Steve for your reply,

We like a challenge don't we 🙂

Here's what I get on ps aux | grep java...

 ![IMG_20200722_1050511](https://us1.discourse-cdn.com/elastic/original/3X/a/5/a577aa6ae4bc0cec223e5c2d538c67812b835de0.jpeg)

I've checked and the /var/log/elasticsearch directory is empty

Do I have to turn on logging or should it do that automatically?

Thanks in advance,  
Shaun

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [July 22, 2020, 1:24pm UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740/4 "2020-07-22T13:24:57Z")

</div>

So it's not running, and likely not even starting - this would be very hard to diagnose remotely and on such a small machine that it could be many things.

I'd guess the init.d/elasticsearch script is just failing even though it says starting - I'd see if you can find a different java version / provider that the init script likes - you might run java -version to see what you have.

---

<div class="post-metadata">

**Author:** ![ShaunM1976](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@ShaunM1976](https://discuss.elastic.co/u/ShaunM1976)\
**Post date:** [July 24, 2020, 10:23am UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740/5 "2020-07-24T10:23:21Z")

</div>

Hi Steve,

Here's what I get then I type java - version

 ![IMG_20200724_111242_1](https://us1.discourse-cdn.com/elastic/original/3X/0/d/0debb8f795e8570eb3eca2d97e8fcb100b473d92.jpeg)

Is the reason that there are no logs because it's not starting up?

As I said before I'm totally new to Linux, so not sure on how to "see if you can find a different java version / provider that the init script likes" I wouldn't even know where to start!

Am I being naive that because I used the regular sudo apt-get commands to install all of this (as opposed to side-loading things), I assumed that it would just work?

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [July 24, 2020, 10:38am UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740/6 "2020-07-24T10:38:22Z")

</div>

It's really hard to tell, and I've never played with the Pi version so I have no idea how much the same/different it might be but suggest you find a Linux person to help you, as it could be so many things and places. But without a fair amount of Linux troubleshooting, process, path, script, log, etc. skills it's a bit hard to dig into. Maybe others here have more ideas.

---

<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:** [August 21, 2020, 10:38am UTC](https://discuss.elastic.co/t/stuck-installing-7-6-on-raspberry-pi-4-curl-7-failed-to-connect-to-192-168-1-20-port-9200-connection-refused/241740/7 "2020-08-21T10:38:23Z")

</div>

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