Influxdb: 404 error on http://localhost:8086

Created on 14 Apr 2014  Â·  39Comments  Â·  Source: influxdata/influxdb

when I want to access http://localhost:8086/ , if returns "404 page not found"。
The administrative interface on http://localhost:8083 is ok.
I installed influxdb on Ubuntu12.04 as the following steps:
wget http://s3.amazonaws.com/influxdb/influxdb_latest_i386.deb
sudo dpkg -i influxdb_latest_i386.deb

what's the problem,thank you!

Most helpful comment

I get 404 error on curl http://localhost:8086 and none on curl http://localhost:8086/ping

The same here

All 39 comments

8086 is the port of the API. If you curl http://localhost:8086/ping you'll get a response back. No HTML pages are served off that port.

I have the same issue. UI works but http api does not. I can ping influxdb using the call you specified, but I get a 404 for all of the apis. Version 0.9.2.

@michaelraney can you provide the full curl command? A 404 indicates you're not hitting a valid endpoint.

I had the same error and solved it by adding influx version on the configuration file:

{
  influxdb: {
    host: '127.0.0.1',
    port: 8086,

    // Here!
    version: 0.9,


    database: 'databaseName',
    username: 'root', 
    password: 'root', 
    flush: {
      enable: true 
    },
    proxy: {
      enable: false,
      suffix: 'raw',
      flushInterval: 1000 
    }
  },
  port: 8125,
  backends: ['./backends/console'],
  debug: true,
  legacyNamespace: false
}

I'm having the same issue. Any idea?

InfluxDB version 0.9, and Ubuntu 15.10 Wily

In influxdb.conf, configuration for HTTP API is the next:

[http]
enabled = true # enabler or not HTTP API - Note CLI connects to the database using HTTP API
bind-address = ":8086" # port used by HTTP API (8086 by default)
auth-enabled = false # to require or not authentication
log-enabled = true # enable or not logging
write-tracing = false # enable or not logging for the write payload (recommended 'false' since it would duplicate every write statement into logs)
pprof-enabled = false # to give detailed performance information
https-enabled = false # enable or not HTTPS
https-certificate = "/etc/ssl/influxdb.pem" # path to certificate file

Hi @JMVM ,
Did you solved that problem?

Hi i am also facing same issue with influxdb 1.1.0 is there any luck?

This error can occur when the database you are trying to connect to is not created yet.

$ influx
> CREATE DATABSE databaseName

(from https://docs.influxdata.com/influxdb/v1.1/introduction/getting_started/)

Hi !

I am using InfluxDB shell version: 1.1.0 in docker , server ubuntu 16.04.

I get 404 error on curl http://localhost:8086 and none on curl http://localhost:8086/ping .

In the logs I see :

[snapshot] 2016/12/25 09:18:31 Starting snapshot service
[admin] 2016/12/25 09:18:31 Starting admin service
[admin] 2016/12/25 09:18:31 DEPRECATED: This plugin is deprecated as of 1.1.0 and will be removed in a future release
[continuous_querier] 2016/12/25 09:18:31 Starting continuous query service
[httpd] 2016/12/25 09:18:31 Starting HTTP service
[httpd] 2016/12/25 09:18:31 Authentication enabled: false
[retention] 2016/12/25 09:18:31 Starting retention policy enforcement service with check interval of 30m0s
[graphite] 2016/12/25 09:18:31 Starting graphite service, batch size 5000, batch timeout 1s
[monitor] 2016/12/25 09:18:31 'graphite:tcp::2003' registered for diagnostics monitoring
[monitor] 2016/12/25 09:18:31 Storing statistics in database '_internal' retention policy 'monitor', at interval 10s
2016/12/25 09:18:31 Sending usage statistics to usage.influxdata.com
[run] 2016/12/25 09:18:31 Listening for signals

I get 404 error on curl http://localhost:8086 and none on curl http://localhost:8086/ping

The same here

Is the issue resolved ? I get the same error. Any help would be much appreciated.

curl: (7) Failed to connect to localhost port 8086: Connection refused

In newer versions of InfluxDB, you need to enable the admin service.
Open /etc/influxdb/influxb.conf and search for 8083

[admin]
  # Determines whether the admin service is enabled.
  enabled = true

  # The default bind address used by the admin service.
  bind-address = ":     8083"

Restart InfluxDB after modifying the file and visit the URL/IP appending the configured port.

hi,
I use influxdb version 1.2.2
when I want to access http://localhost:8086/ , if returns "404 page not found"。
when I want to access http://localhost:8083/ , if returns "Unable to connect"。
can you help me?

n3rve solution works perfect.. Thanks...

[admin] section on 1.3 versione is deprecated

I'm getting the same error on version 1.3

Any news on the above, getting the same error.

Why are you trying to curl without a path? The reason it's a 404 is because there's nothing at that path, which is expected behavior.

@florianjosefreheis The Admin UI was taken out in 1.3 in favor of Chronograf, which has all the features of the old admin UI and more. It's also open source: https://docs.influxdata.com/chronograf/v1.3/

Chronograf is great, but Influx is refusing all HTTP connections, including on 8083. Chronograf can't communicate to it either.

@natejgardner that's must be something separate. Have you checked your logs? Best place to ask is at the community site: community.influxdata.com

Hey. This is the error that I'm also have been strugling with, a minute ago. But now I got my influxdb running.
What I have done is :

  1. Open sudo nano /etc/influxdb/influxb.conf
  2. Search for [http]
  3. Uncomment the line bind-address = ":8086"
  4. Uncomment the line auth-enabled=true (check the spelling for true. It may be ture sometimes )
  5. Save the file and run the following lines in command prompt:
    sudo systemctl start influxdb
    sudo systemctl status influxdb
    You should get something similar to the following:
    influxdb.service - InfluxDB is an open-source, distributed, time series database
    Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
    Active: active (running) since Wed 2017-10-04 00:04:53 IST; 9s ago
    Docs: https://docs.influxdata.com/influxdb/
    Main PID: 8382 (influxd)
    Tasks: 10
    Memory: 9.2M
    CPU: 61ms
    CGroup: /system.slice/influxdb.service
    └─8382 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Starting precreation service with check
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Starting snapshot service service=snaps
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Starting continuous query service servi
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Starting HTTP service service=httpd
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Authentication enabled:true service=htt
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Listening on HTTP:[::]:8086 service=htt
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Starting retention policy enforcement s
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Listening for signals
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Sending usage statistics to usage.influ
Oct 04 00:04:53 mani-desktop influxd[8382]: [I] 2017-10-03T18:34:53Z Storing statistics in database '_intern

If it doesn't happen , contact me with your influxdb.conf

I'm getting the same error on version 1.3

@Manikandan25 -
Still the same issue i'm on influxdb 1.4.2-1 centos7
the influxdb.conf is the generic one, it doens't have the [admin] part
I've changed the lines as you said
this is the status appearing on the service printout:
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Starting precreation service with check interval of 10m0s, advance period o...ecreation
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Starting snapshot service service=snapshot
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Starting continuous query service service=continuous_querier
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Starting HTTP service service=httpd
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Authentication enabled:true service=httpd
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Storing statistics in database '_internal' retention policy 'monitor', at i...e=monitor
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Listening on HTTP:[::]:8086 service=httpd
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Starting retention policy enforcement service with check interval of 30m0s ...retention
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Listening for signals
Dec 17 16:50:39 sensu influxd[32557]: [I] 2017-12-17T14:50:39Z Sending usage statistics to usage.influxdata.com
Hint: Some lines were ellipsized, use -l to show in full.
"

still getting 404 page not found error.
any ideas?

I also have the same error. Tried for over 3 hours now, can't get it to work. :(

Any Ideas?

Guys, just do a simple install of influxdb.
dont even touch the /etc/influxdb/influxb.conf

i only had these

[meta]
dir = "/var/lib/influxdb/meta"
[data]
dir = "/var/lib/influxdb/data"
wal-dir = "/var/lib/influxdb/wal"

and then just type the command

influx -precision rfc3339

influxdb 1.4 onwards comes with this cli

Yea, started using the cli.
but would really loved to have some Gui.

Chronograf is now the GUI for the entire stack. https://docs.influxdata.com/chronograf/v1.4/

In newer versions of InfluxDB, you need to enable the admin service.
Open /etc/influxdb/influxb.conf and search for 8083

[admin]
  # Determines whether the admin service is enabled.
  enabled = true

  # The default bind address used by the admin service.
  bind-address = ":     8083"

Restart InfluxDB after modifying the file and visit the URL/IP appending the configured port.

i think that's a typo....

/etc/influxdb/influxb.conf
/etc/influxdb/influxdb.conf <---- d was left out

I had the same issue from docker.

The reason is, when you are making port forwarding in docker:

8888:8888 for cronograf
8086:8086 for influxdb api

It's a communication between you and the container.

If you are calling API like localhost/ping from your browser it's work because the communication is between your computer and the container only. But when cronograf is making query to influxdb, it's between 2 container inside docker so make sur that the two services are in the same network.

By default from your browser if you want to contact a container you need to call localhost then the port you want. From a container, to contact an other container you have to call the name of the container then the port (this is work only if they are in the same network). In my case it was http://influxdb:8086

had the same problem, then discovered it required https and all worked fine. Interested to know if this works for everyone

getting the same ... anyone can help?
When doing nmap ican see that 8086 us not http port how can i fix this
8086/tcp filtered d-s-n
8083/tcp filtered us-srv
8080/tcp filtered http-proxy

8080 is a HTTP of openhab that is working for me ...

Had the same problem, noticed that no matter I put there in the port and host I got the same error. I removed the datasource and created again with the same data and it worked.

when I want to access http://localhost:8086/ , if returns "404 page not found"。None of the above solution work for me on windows 10.

when I want to access http://localhost:8086/ , if returns "404 page not found"。None of the above solution work for me on windows 10.

Same

Make sure to run Version 2+ in your docker/compose
You can check with:
docker ps

Otherwise change your config to:

influxdb:
    image: quay.io/influxdb/influxdb:v2.0.1 #influxdb alone is not the latest version
    container_name: influxdb
    ports:
        - 8086:8086

https://docs.influxdata.com/influxdb/v2.0/get-started/#set-up-influxdb-through-the-ui ->so this section is wrong? I cannot access localhost:8086 for setting up an initial user etc.?

same as @Synergia503 I come from your documentation. after running a docker instance by following compose it solved the problem

  influxdb:
    image: quay.io/influxdb/influxdb:v2.0.3
    container_name: influxdb
    ports:
      - "8086:8086"
    volumes:
      - "./influxdb:/var/lib/influxdb"
Was this page helpful?
0 / 5 - 0 ratings

Related issues

udf2457 picture udf2457  Â·  3Comments

Witee picture Witee  Â·  3Comments

affo picture affo  Â·  3Comments

deepujain picture deepujain  Â·  3Comments

ricco24 picture ricco24  Â·  3Comments