3

I installed the Influxdb version (InfluxDB v1.7.7)

I just installed and i tried to start the infludb without changing anything in the configuration file...

I used influxd to start the influxdb

But i couldn't start...am getting the error as below....Please help me

 8888888           .d888 888                   8888888b.  888888b.
   888            d88P"  888                   888  "Y88b 888  "88b
   888            888    888                   888    888 888  .88P
   888   88888b.  888888 888 888  888 888  888 888    888 8888888K.
   888   888 "88b 888    888 888  888  Y8bd8P' 888    888 888  "Y88b
   888   888  888 888    888 888  888   X88K   888    888 888    888
   888   888  888 888    888 Y88b 888 .d8""8b. 888  .d88P 888   d88P
 8888888 888  888 888    888  "Y88888 888  888 8888888P"  8888888P"

2019-07-11T07:17:02.124129Z     info    InfluxDB starting       {"log_id": "0GZz7YB0000", "version": "1.7.7", "branch": "1.7", "commit": "f8fdf652f348fc9980997fe1c972e2b79ddd13b0"}
2019-07-11T07:17:02.124155Z     info    Go runtime      {"log_id": "0GZz7YB0000", "version": "go1.11", "maxprocs": 4}
2019-07-11T07:17:02.225149Z     info    Using data dir  {"log_id": "0GZz7YB0000", "service": "store", "path": "/var/lib/influxdb/data"}
2019-07-11T07:17:02.225206Z     info    Compaction settings     {"log_id": "0GZz7YB0000", "service": "store", "max_concurrent_compactions": 2, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
2019-07-11T07:17:02.225229Z     info    Open store (start)      {"log_id": "0GZz7YB0000", "service": "store", "trace_id": "0GZz7Y_G000", "op_name": "tsdb_open", "op_event": "start"}
2019-07-11T07:17:02.225320Z     info    Open store (end)        {"log_id": "0GZz7YB0000", "service": "store", "trace_id": "0GZz7Y_G000", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "0.094ms"}
run: open server: open tsdb store: mkdir /var/lib/influxdb/data/_internal/_series: permission denied

sudo influxd

 8888888           .d888 888                   8888888b.  888888b.
   888            d88P"  888                   888  "Y88b 888  "88b
   888            888    888                   888    888 888  .88P
   888   88888b.  888888 888 888  888 888  888 888    888 8888888K.
   888   888 "88b 888    888 888  888  Y8bd8P' 888    888 888  "Y88b
   888   888  888 888    888 888  888   X88K   888    888 888    888
   888   888  888 888    888 Y88b 888 .d8""8b. 888  .d88P 888   d88P
 8888888 888  888 888    888  "Y88888 888  888 8888888P"  8888888P"

2019-07-11T09:57:11.220614Z     info    InfluxDB starting       {"log_id": "0G_7I1i0000", "version": "1.7.7", "branch": "1.7", "commit": "f8fdf652f348fc9980997fe1c972e2b79ddd13b0"}
2019-07-11T09:57:11.220640Z     info    Go runtime      {"log_id": "0G_7I1i0000", "version": "go1.11", "maxprocs": 4}
2019-07-11T09:57:11.321428Z     info    Using data dir  {"log_id": "0G_7I1i0000", "service": "store", "path": "/var/lib/influxdb/data"}
2019-07-11T09:57:11.321462Z     info    Compaction settings     {"log_id": "0G_7I1i0000", "service": "store", "max_concurrent_compactions": 2, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
2019-07-11T09:57:11.321474Z     info    Open store (start)      {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "op_event": "start"}
2019-07-11T09:57:11.322432Z     info    Reading file    {"log_id": "0G_7I1i0000", "engine": "tsm1", "service": "cacheloader", "path": "/var/lib/influxdb/wal/_internal/monitor/2/_00001.wal", "size": 10413807}
2019-07-11T09:57:11.322610Z     info    Opened file     {"log_id": "0G_7I1i0000", "engine": "tsm1", "service": "filestore", "path": "/var/lib/influxdb/data/_internal/monitor/1/000000001-000000001.tsm", "id": 0, "duration": "0.121ms"}
2019-07-11T09:57:11.326176Z     info    Opened shard    {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "index_version": "inmem", "path": "/var/lib/influxdb/data/_internal/monitor/1", "duration": "4.013ms"}
2019-07-11T09:57:11.853856Z     info    Opened shard    {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "index_version": "inmem", "path": "/var/lib/influxdb/data/_internal/monitor/2", "duration": "531.737ms"}
2019-07-11T09:57:11.854060Z     info    Open store (end)        {"log_id": "0G_7I1i0000", "service": "store", "trace_id": "0G_7I26G000", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "532.586ms"}
2019-07-11T09:57:11.854108Z     info    Opened service  {"log_id": "0G_7I1i0000", "service": "subscriber"}
2019-07-11T09:57:11.854124Z     info    Starting monitor service        {"log_id": "0G_7I1i0000", "service": "monitor"}
2019-07-11T09:57:11.854137Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "build"}
2019-07-11T09:57:11.854148Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "runtime"}
2019-07-11T09:57:11.854158Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "network"}
2019-07-11T09:57:11.854176Z     info    Registered diagnostics client   {"log_id": "0G_7I1i0000", "service": "monitor", "name": "system"}
2019-07-11T09:57:11.854198Z     info    Starting precreation service    {"log_id": "0G_7I1i0000", "service": "shard-precreation", "check_interval": "10m", "advance_period": "30m"}
2019-07-11T09:57:11.854213Z     info    Starting snapshot service       {"log_id": "0G_7I1i0000", "service": "snapshot"}
2019-07-11T09:57:11.854227Z     info    Starting continuous query service       {"log_id": "0G_7I1i0000", "service": "continuous_querier"}
2019-07-11T09:57:11.854243Z     info    Starting HTTP service   {"log_id": "0G_7I1i0000", "service": "httpd", "authentication": false}
2019-07-11T09:57:11.854254Z     info    opened HTTP access log  {"log_id": "0G_7I1i0000", "service": "httpd", "path": "stderr"}
2019-07-11T09:57:11.854354Z     info    Listening on HTTP       {"log_id": "0G_7I1i0000", "service": "httpd", "addr": "[::]:8086", "https": false}
2019-07-11T09:57:11.854377Z     info    Starting retention policy enforcement service   {"log_id": "0G_7I1i0000", "service": "retention", "check_interval": "30m"}
2019-07-11T09:57:11.854856Z     info    Storing statistics      {"log_id": "0G_7I1i0000", "service": "monitor", "db_instance": "_internal", "db_rp": "monitor", "interval": "10s"}
2019-07-11T09:57:11.855369Z     info    Listening for signals   {"log_id": "0G_7I1i0000"}
2019-07-11T09:57:11.855607Z     info    Sending usage statistics to usage.influxdata.com        {"log_id": "0G_7I1i0000"}
Shwettha RR
  • 151
  • 2
  • 5
  • 12
  • You need to run is as root. sudo or su - to login as root from your shell. – Paul Dawson Jul 11 '19 at 08:04
  • @Alfred E. Noobman Thank u for reply....Can u please find the output above in the question section when i run sudo influxd ..... It's keep on listening....In browser its not accesssible – Shwettha RR Jul 11 '19 at 09:55
  • Which OS are you using? – Paul Dawson Jul 11 '19 at 11:19
  • @Alfred E. Noobman Centos 7 – Shwettha RR Jul 12 '19 at 05:25
  • @Alfred E. Noobman Pls help me....I am struggling with this – Shwettha RR Jul 12 '19 at 05:26
  • @AlfredE.Noobman That is about the least reasonable suggestion for running a database server I _ever_ heard. `sudo` is by no means the equivalent of putting down your foot and saying „I *really* mean it“, but it has rather severe implications, namely that should someone be able to hijack the server, he or she would execute commands with euid 0. The _obvious_ problem here was that OP started it under his user account, whereas it should be started _by_ root either using systemd (as you correctly described in your answe) or by using `sudo -u influxdb influxd` manually. – Markus W Mahlberg Jul 12 '19 at 07:31

3 Answers3

2

run: open server: open tsdb store: mkdir /var/lib/influxdb/data/_internal/_series: permission denied

Your user don't have access to this path. That is causing the problem. Usually /var/lib path is owned by root user. So if your user has sudo permission, executing start up command using sudo should resolve this issue.

Check influxDB config file to manipulate the data path of InfluxDB as per your need. Config file path is normally /etc/influxdb/influxdb.conf.

Your second problem is accessing the DB using browser.

Check http configuration within influxdb.conf file:

[http]
  enabled = true
  bind-address = ":8086"
  auth-enabled = false
  log-enabled = true
  write-tracing = false
  pprof-enabled = false
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"
  ### Use a separate private key location.
  # https-private-key = ""
  max-row-limit = 10000
  realm = "InfluxDB"
  • Make sure you are using correct port.
  • Check there is no other process currently holding that port other than influxdb.
  • Make sure there is no firewall stopping you from accessing that port.
darkDragon
  • 455
  • 3
  • 12
1

Run the DB as a service (not from the command line) and check the status:

sudo service influxdb start
sudo serivce influxdb status

Or if your operating system is using systemd (CentOS 7+, RHEL 7+):

sudo systemctl start influxdb
sudo systemctl status influxdb

Then connect to localhost on port 8088 with your browser

http://localhost:8086

To view the configuration:

influxd config

The configuration file is located at:

/etc/influxdb/influxdb.conf

Follow the documenation:

https://docs.influxdata.com/influxdb/v1.7/administration/config/

Paul Dawson
  • 1,332
  • 14
  • 27
0

My influxdb was starting just fine as root, and the directory was owned by influxdb, just the wrong influxdb user. I had copied the database files from an old install, which had a different influxdb user

root@host# ls /var/lib/influxdb/data/_internal/_series
00  01  02  03  04  05  06  07
root@host# ls -alh /var/lib/influxdb/data/_internal/_series
total 40K
drwxr-xr-x 10 influxdb influxdb 4.0K May 21 10:45 .
drwx------  4      129      135 4.0K Sep 12  2021 ..
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 00
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 01
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 02
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 03
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 04
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 05
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 06
drwxr-xr-x  2 influxdb influxdb 4.0K May 21 10:45 07
root@host# ls -alhd /var/lib/influxdb/data/_internal/_series
drwxr-xr-x 10 influxdb influxdb 4.0K May 21 10:45 /var/lib/influxdb/data/_internal/_series
root@host# ls -alhd /var/lib/influxdb/data/_internal/
drwx------ 4 129 135 4.0K Sep 12  2021 /var/lib/influxdb/data/_internal/
root@host# ls -alhd /var/lib/influxdb/data/
drwxr-xr-x 4 129 135 4.0K Sep 12  2021 /var/lib/influxdb/data/
root@host# ls -alhd /var/lib/influxdb/
drwxr-xr-x 5 129 135 4.0K Sep 12  2021 /var/lib/influxdb/

The new user id should be 116, not 129 as listed in the last few ls -alh. Fixed with:

   root@host# chown -R influxdb:influxdb /var/lib/influxdb/
   root@host# systemctl reset-failed influxdb
Stephen
  • 1,603
  • 16
  • 19