Influxdb 2.0 cannot run "influxd" command without getting an error

Hello

I am very new to influxdb, I set up a AWS ec2 linux VM(ubuntu 20.04) and installed influxdb(2.0) onto it. I was following the official docs guidelines and I got up to the point where I had to check the status and got confirmation that it is running. However, when trying to run the “influxd” command I get this error: Error: listen tcp :8086: bind: address already in use.

I have no idea how to fix this, I have tried uninstalling and re-installing, but even after uninstalling I could still run influxd, so I am not sure that it worked correctly. I have also tried changing the default port using:
influxd --http-bind-address=:8087
. This did not seem to work either, if anyone could please give some advice I would greatly appreciate it…have spent hours trying to fix this to no avail

Could it be that you confuse influxd (controls the influxdb daemon) and influx (the command line interface)?

https://docs.influxdata.com/influxdb/v2.0/tools/clis/

I am not sure, was following the steps shown here:Get started with InfluxDB | InfluxDB OSS 2.0 Documentation
and I got to the point where I had to enter influxd, which is where the error occurs

@Franky1 I may have misunderstood, but I think I was supposed to start the influxdb daemon

Have you set up the systemd service?
If yes, then the influxd deamon should already be running?
I also find the documentation a bit confusing at this point. :thinking:
But that would also explain that then always comes “already in use”?

@Franky1 I think so, I ran
wget https://dl.influxdata.com/influxdb/releases/influxdb2-2.0.4-amd64.deb ,then
sudo dpkg -i influxdb2-2.0.4-amd64.deb and then
sudo service influxdb start
Restarted my service then ran
sudo service influxdb status, to which I got the response active (running)
Tried the next step, which I assume is to run the influxd daemon, which is where I am getting my error

Can you execute influx (command line interface) commands against the database, after the step with service influxdb status ?
Then InfluxDB is already running.

@Franky1


Here is a screenshot of what happens when I execute influx, not sure if it Is running or not

Can you access the ui or run the cli to finish the setup?

https://docs.influxdata.com/influxdb/v2.0/get-started/#set-up-influxdb-through-the-ui

https://docs.influxdata.com/influxdb/v2.0/get-started/#set-up-influxdb-through-the-influx-cli

@Franky1 Haven’t tried the cli, but tried the UI way by connecting to my public ipv4 address ie xx.xxx.xx.xx:8086, but I get a this site can’t be reached error…so I am not sure if it is my AWS ec2 server that I setup wrong or my influxdb

when I try pinging the ip address of the server, there is 100% packet loss so It seems that my ec2 server might be the problem? Not sure what I did wrong though :sweat_smile:

Edit: It seems this is normal and most likely not an indication that the server is not working correctly

Yes, that’s right, I forgot, you are on AWS… :smirk:
I assume that you cannot access your EC2 machine without further configuration.
With AWS, there are “access rules” everywhere…

I would continue with the CLI approach to complete the database setup.

@Franky1 Any idea how I could try to access the UI? I saw a video of it and it looks like it would be easier to setup than via the CLI. I ran influx setup and managed to create a profile via the CLI.

I installed grafana and cannot access their UI page either…so it must be something I setup wrong on my ec2 server, might just delete the instance and start over

I have no experience with EC2 instances.
But since you are on AWS, you definitely need to set some security rules/groups.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html

Otherwise just google for it, shouldn’t be that hard to find something about it… many should have this problem…

I have added some security groups, opened port for HTTP access, SSH access and port 3000( port needed for grafana I believe), however it is not working. I have tried many hours of googling and am still busy, but have yet to find a solution :grimacing:

I have solved the issue it seems, can now access both the grafana and influxdb UI. Thanks for your help, hopefully I can continue with my project now :smiley:

Edit: reached max number of replies for the day (I had to allow access to port 8080 in the security group)

What was the problem?
Maybe the next one can benefit from it?

I had to allow access to port 8080 in the security group