Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.9.1] Can't connect with admin interface using authentication #3222

Closed
toddboom opened this issue Jul 2, 2015 · 40 comments
Closed

[0.9.1] Can't connect with admin interface using authentication #3222

toddboom opened this issue Jul 2, 2015 · 40 comments
Assignees
Milestone

Comments

@toddboom
Copy link
Contributor

toddboom commented Jul 2, 2015

From the mailing list:

I upgraded to 0.9.1 and now am not able to log via the WebUI on http://localhost:8083 in with my admin UserID.

"Couldn't fetch database list from InfluxDB (http://localhost:8086). Try updating your connection settings and make sure the server is running."

Am able to authenticate from the command line tool 'influx'.
@toddboom toddboom added this to the 0.9.2 milestone Jul 2, 2015
@toddboom toddboom self-assigned this Jul 2, 2015
@mgresser
Copy link

mgresser commented Jul 3, 2015

I've also seen this issue on a clean install so it's not just upgrade related.

@marco-hoyer
Copy link

+1, seems to be broken

@mcrot
Copy link

mcrot commented Jul 3, 2015

+1, I'm having the same issue now

@mcrot
Copy link

mcrot commented Jul 3, 2015

I also couldn't connect via CLI, reinstallation of the Debian package didn't help.
Then I removed the /var/opt/influxdb directory (no valuable data in there so far) and recreated it.
After restart of influxd localhost:8086 was reachable again, Web UI and CLI can connect now.
In the config file I have the standard port, here an excerpt:

###
### [admin]
###
### Controls the availability of the built-in, web-based admin interface.
###

[admin]
  enabled = true
  bind-address = ":8083"

###
### [http]
###
### Controls how the HTTP endpoints are configured. These are the primary
### mechanism for getting data into and out of InfluxDB.
###

[http]
  enabled = true
  bind-address = ":8086"
  auth-enabled = false
  log-enabled = true
  write-tracing = false
  pprof-enabled = false

@edokan
Copy link

edokan commented Jul 3, 2015

Problem is that admin.js successfuly stores and reads user info from localStorage but it does not send them with ajax requests. as a temporary workaround try running this script developer console

$.ajaxSetup({data: {
   "u": function(){ return (connectionSettings.username == "") ? null :connectionSettings.username;  }, 
   "p": function() { return (connectionSettings.password == "") ? null :connectionSettings.password;  } 
}})

@jipperinbham
Copy link
Contributor

I have a pending PR that should address the admin UI and the CLI PR has already been merged into 0.9.2

@toddboom
Copy link
Contributor Author

toddboom commented Jul 4, 2015

Fixed with #3184. Thanks @jipperinbham!

@wolfkiss0929
Copy link

+1, I'm having the same issue now in 0.9.2

@wuhongyuan
Copy link

could anyone tell me how to solve this problem

@wolfkiss0929
Copy link

@wuhongyuan Influxdb server restart, UI Can't connect with admin interface using authentication

@wuhongyuan
Copy link

@wolfkiss0929 restart influxdb can not work

@wolfkiss0929
Copy link

@wuhongyuan CLI can, UI Can't connect with admin interface using authentication. updated my connection settings and the server is running.

@wolfkiss0929
Copy link

@wuhongyuan I installl influxdb-0.9.2_rc1-1.x86_64.rpm

@beckettsean
Copy link
Contributor

@mjdesa can you repro?

@desa
Copy link
Contributor

desa commented Jul 27, 2015

@beckettsean I'm getting

XMLHttpRequest cannot load http://localhost:8086/query?q=SHOW+DATABASES&db=. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8083' is therefore not allowed access. The response had HTTP status code 405.

both with and without auth enabled.

@jipperinbham
Copy link
Contributor

pretty sure this is a CORS issue, the admin UI is running on port 8080 and you're trying to make AJAX calls to a different port, 8086.

The only way to work around this is put a reverse proxy in front of it.

@gunnaraasen
Copy link
Member

PR #3474 should fix the CORS issue.

@beckettsean
Copy link
Contributor

#3475 opened as well

@manuel-huez
Copy link

+1, having the same problem

@gunnaraasen
Copy link
Member

@manuel-huez The fix for this is in HEAD and will be in version 0.9.3, which is scheduled for release on August 13th.

There's also a version 0.9.2.1 (deb & RPM), which includes the fix for this issue as well.

@manuel-huez
Copy link

@gunnaraasen I can't seem to be able to update from the RPM (we're running on CentOS EC2). Do you have any update guide?

@gunnaraasen
Copy link
Member

@manuel-huez 0.9.2.1 is a drop in replacement for 0.9.2.

To update to 0.9.2.1, download the RPM file and run RPM with the -U option (very similar to the install instructions on the download page).

If that doesn't work, please open a new issue with some more info about the update failure.

@manuel-huez
Copy link

@gunnaraasen I am now running 0.9.2.1:

[ec2-user@ip- ~]$ sudo /etc/init.d/influxdb version
InfluxDB v0.9.2 (git: 6c0a91f775f9fc0e625d17ffa04a3fe86945ba09)

But the problem is still present, ie the admin panel can't connect to the influxdb server.

@ericjmiller
Copy link

I am also having this issue in 0.9.2.1

@XWTiger
Copy link

XWTiger commented Aug 5, 2015

i have the same problem

@gunnaraasen
Copy link
Member

@manuel-huez @ericjmiller @XWTiger When you open up the browser console, is the response code 400 or 401? Also, what is the JSON error message in the response?

@manuel-huez
Copy link

@gunnaraasen: I'm getting this:

XMLHttpRequest cannot load http://<serverip>.compute-1.amazonaws.com:8086/query?q=SHOW+DATABASES&db=. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://<serverip>.compute-1.amazonaws.com:8083' is therefore not allowed access. The response had HTTP status code 405.

@cmelian
Copy link

cmelian commented Aug 5, 2015

Same connection problems here.

@gunnaraasen
Copy link
Member

@manuel-huez took another look at your version output above and it looks like you're still running 0.9.2. The following commands will upgrade 0.9.2.1 on CentOS.

wget https://s3.amazonaws.com/influxdb/influxdb-0.9.2.1-1.x86_64.rpm
sudo rpm -Uvh influxdb-0.9.2.1-1.x86_64.rpm

@cmelian I'm still having trouble reproducing the error. Can you send me the output of influxd version?

@cmelian
Copy link

cmelian commented Aug 5, 2015

@gunnaraasen the error is with a fresh install with stable 0.9.2
After installing nightly version, I'm able to connect to admin web interface.

InfluxDB v0.9.3-nightly-affd0b1 (git: affd0b1)

@manuel-huez
Copy link

@gunnaraasen Is this 0.9.2.1-1 version new? I swear I had installed the newest version of influxdb yesterday, and had the 0.9.2.1 running on the machine.

It is now working with the 0.9.2.1-1, thank you.

@gunnaraasen
Copy link
Member

Great! The 0.9.2.1 version was released specifically to fix this issue. It wasn't publicized much beyond this thread and we don't typically release minor-minor releases. Sorry for the confusion!

@drb-digital
Copy link

Is there a debian packacge available as well? I can see only a rpm-file on https://s3.amazonaws.com/influxdb/ Because the problem still exists in my installation of 0.9.2.1 for Debian.

@cobyism
Copy link

cobyism commented Aug 7, 2015

@DennisBauer Debian package was linked to further up—the URL is:
http://influxdb.s3.amazonaws.com/influxdb_0.9.2.1_amd64.deb

@drb-digital
Copy link

@cobyism But this links to 0.9.2.1 and not to 0.9.2.1-1.....I installed the package you linked and still can't use the admin interface due to the same error message

@cobyism
Copy link

cobyism commented Aug 7, 2015

¯\_(ツ)_/¯ Installing the 0.9.2.1 package seemed to fix all the issues I was having. I half-presumed the 0.9.2.1-1 was a typo in the name of the RPM package, but I could be wrong.

@AnuRam123
Copy link

I have the same problem using
version 0.9.4.2
I installed the latest version and am trying to access the admin web ui using http://myserverip:8083 and am unable to access the ui. I am able to use CLI to create a db

@yaronr
Copy link

yaronr commented Feb 20, 2016

+1

@dragonxtek
Copy link

I have the same problem but with version 1.2.2
I can't connect throught the browser. Port 8083 send a reset connection

sudo hping3 -c 1 --syn -p 8083 localhost
HPING localhost (lo 127.0.0.1): S set, 40 headers + 0 data bytes
len=40 ip=127.0.0.1 ttl=64 DF id=28025 sport=8083 flags=RA seq=0 win=0 rtt=3.9 ms

But I still use it throught CLI

influx
Connected to http://localhost:8086 version 1.2.2
InfluxDB shell version: 1.2.2
> show databases
name: databases
name
----
_internal

@jwilder
Copy link
Contributor

jwilder commented Mar 21, 2017

@dragonxtek The admin interface was deprecated in 1.1.0 and is disabled by default.

@influxdata influxdata locked and limited conversation to collaborators Mar 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests