を求めていない...Influxdbは私がraspberrypi上で実行されているLinuxディストリビューションにinfluxdbをインストールしました認証
[email protected]:~ $ influx -version
InfluxDB shell version: 1.1.1
が、私は後
CREATE USER admin WITH PASSWORD 'password' WITH ALL PRIVILEGES
で管理者ユーザーに続いて、DBを作成します私はそれがアクセスされたときにinfluxdbは、ユーザー認証をお願いしたいと
/etc/influxdb/influxdb.conf
:この私にあるinflux.confファイルを編集しますエド(外部または内部のHTTPとコンソール?それはコンソールですか?)私はブラウズし、ファイルの[[http]]ブロックを探します....これは私が持っているものです。
###
### [http]
###
### Controls how the HTTP endpoints are configured. These are the primary
### mechanism for getting data into and out of InfluxDB.
###
# [http]
# Determines whether HTTP endpoint is enabled.
enabled = true
# The bind address used by the HTTP service.
# bind-address = ":8086"
# Determines whether HTTP authentication is enabled.
auth-enabled = true
# The default realm sent back when issuing a basic auth challenge.
# realm = "InfluxDB"
# Determines whether HTTP request logging is enable.d
# log-enabled = true
# Determines whether detailed write logging is enabled.
# write-tracing = false
# Determines whether the pprof endpoint is enabled. This endpoint is used for
# troubleshooting and monitoring.
pprof-enabled = true
# Determines whether HTTPS is enabled.
https-enabled = false
# The SSL certificate to use when HTTPS is enabled.
https-certificate = "/etc/ssl/influxdb.pem"
# Use a separate private key location.
https-private-key = ""
# The JWT auth shared secret to validate requests using JSON web tokens.
shared-sercret = ""
# The default chunk size for result sets that should be chunked.
# max-row-limit = 10000
# The maximum number of HTTP connections that may be open at once. New connections that
# would exceed this limit are dropped. Setting this value to 0 disables the limit.
# max-connection-limit = 0
# Enable http service over unix domain socket
# unix-socket-enabled = false
# The path of the unix domain socket.
# bind-socket = "/var/run/influxdb.sock"
第1および第3のサブグループエントリを変更します。
Finnaly私はinfluxdbサービスを再起動します。
sudo service influxdb restart
問題
1 - (ログイントークンなし)、ネットワーク上の別のコンピュータからデータベースの作成に成功した(そして、それはいけません):
http://192.168.7.125:8086/query?q=CREATE DATABASE test
リターン:
{
"results": [
{}
]
}
は、認証を要求しませんラズベリーCMDLINEにinfluxdb呼び出す:
[email protected]:~ $ influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 1.1.1
InfluxDB shell version: 1.1.1
>
、誰もが私が間違っているのか知っていますか?
EDITさらに
、私はそれを見ることができますは/ var/log/syslogのを確認する: 1 - それは、それが失敗した
[run] 2017/01/17 11:27:36 InfluxDB starting, version 1.1.1, branch master, commit e47c
f1f2e83a02443d7115c54f838be8ee959644
Jan 17 11:27:36 raspberrypi influxd[901]: [run] 2017/01/17 11:27:36 Go version go1.7.4, GOMAXPROCS set to 4
Jan 17 11:27:36 raspberrypi influxd[901]: [run] 2017/01/17 11:27:36 Using configuration at: /etc/influxdb/influxdb.conf
Jan 17 11:27:36 raspberrypi influxd[901]: [store] 2017/01/17 11:27:36 Using data dir: /var/lib/influxdb/data
2 - currectディレクトリからファイルをロードしています認証を開始すると(認証が無効になります)
Jan 17 11:27:37 raspberrypi influxd[901]: [httpd] 2017/01/17 11:27:37 Starting HTTP service
Jan 17 11:27:37 raspberrypi influxd[901]: [httpd] 2017/01/17 11:27:37 Authentication enabled: false
Jan 17 11:27:37 raspberrypi influxd[901]: [httpd] 2017/01/17 11:27:37 Listening on HTTP: [::]:8086
解決策は何ですか?私は本当に言うことができません。 –
[http]には#があります。 –