influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.66k stars 3.54k forks source link

Can't login as root / root as on Mac OS X Yosemite via a fresh brew install influxdb #1238

Closed tobilg closed 9 years ago

tobilg commented 9 years ago

I was trying to install InfluxDB 0.8.7 on my Mac OS X Yosemite machine via homebrew, as outlined in http://influxdb.com/docs/v0.8/introduction/installation.html

brew install influxdb

Run influxdb -config=/usr/local/etc/influxdb.conf

Issues:

On startup, I get an error that the process can't write to the actual folder. After adding the /tmp path, the db starts up without having to use sudo.

I'm using file = "/tmp/influxdb.log" instead of the standard file = "influxdb.log" in the influxdb.conf.

I can't login using the specified root / root credentials (see http://influxdb.com/docs/v0.8/introduction/getting_started.html), I receive a Couldn't authenticate user: Invalid username/password error.

toddboom commented 9 years ago

@tobilg There are two possibilities here:

1) Make sure you're not providing a database name when you're trying to authenticate, since the root user is a cluster admin and doesn't need one

2) It's possible that you're also running into write permission issues on the raft folder as well, and the server wasn't able to write the data about the users to disk.

Let me know if either of those helps!

tobilg commented 9 years ago

Thanks for the fast feedback.

Regarding 1)

I'm not using a database name, it's left blank.

Regarding 2)

I'm just sticking to the installation procedures outlined on the installation docs linked above. I was positive that the brew package would run out of the box, as all other that I'm using, too. The logfile configuration doesn't seem correct as well.

Let me know if I can add some more debug/log info to make the problem-solving easier.

[2014/12/16 17:39:46 CET] INFO Redirectoring logging to /tmp/influxdb.log [2014/12/16 17:39:46 CET] INFO Starting Influx Server 0.8.7 bound to 127.0.0.1... [2014/12/16 17:39:46 CET] INFO Opening database at /usr/local/var/influxdb/data [2014/12/16 17:39:46 CET] INFO Opening wal in /usr/local/var/influxdb/wal [2014/12/16 17:39:46 CET] INFO Ssl will be disabled since the ssl port or cer$ [2014/12/16 17:39:46 CET] INFO Initializing Raft HTTP server [2014/12/16 17:39:46 CET] INFO Raft Server Listening at 127.0.0.1:8090 [2014/12/16 17:39:46 CET] INFO Initializing Raft Server: http://tobilg$ [2014/12/16 17:39:46 CET] INFO Recovering the cluster configuration [2014/12/16 17:39:46 CET] INFO Checking whether 18f59a5 is the local$ [2014/12/16 17:39:46 CET] INFO Recovered from log [2014/12/16 17:39:46 CET] INFO Waiting for local server to be added [2014/12/16 17:39:46 CET] INFO Setting server id to 1 and recovering [2014/12/16 17:39:48 CET] INFO (raft:18f59a5) Selected as leader. $

toddboom commented 9 years ago

@tobilg Can you do a ls -l /usr/local/var/influxdb/raft/ and paste the output here?

tobilg commented 9 years ago

Output is:

-rw------- 1 tobilg admin 28 16 Dez 17:39 conf -rw------- 1 tobilg admin 1465 16 Dez 17:40 log -rw-r--r-- 1 tobilg admin 7 16 Mai 2014 name drwx------ 3 tobilg admin 102 17 Okt 11:48 snapshot

toddboom commented 9 years ago

@tobilg It looks like the file called name has a date of May 2014. If this was a fresh installation, I would have expected all of the files to have a December 2014 timestamp. I'm guessing you had a previous installation of InfluxDB from earlier this year on which the password was changed.

To fix this, stop the server, remove everything in /usr/local/var/influxdb/ and start it back up. This should put you into a clean state.

tobilg commented 9 years ago

I removed everything. Now it's working. Strange, because there were earlier versions installed, but I never really used it, and surely never changed the password. Whatever .-) Thanks for your help!