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

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)

I try...
curl -X GET '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;
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;

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..

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?

1 Like

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

Thanks Steve for your reply,

We like a challenge don't we :slight_smile:

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

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

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.

Hi Steve,

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

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?

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.

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