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

config show - Unable to connect to database #61

Open
123BLiN opened this issue Apr 18, 2016 · 3 comments
Open

config show - Unable to connect to database #61

123BLiN opened this issue Apr 18, 2016 · 3 comments

Comments

@123BLiN
Copy link

123BLiN commented Apr 18, 2016

Hello,

I'm very sorry to disturb, it should be something very simple, but I spent an hour with no success.
My config:

<?xml version="1.0" encoding="utf-8"?>
<Influx-Capacitor>
  <Database Type="InfluxDB" Enabled="true">
    <Url>http://influxdb_domain_name:8086</Url>
    <Username>capacitor</Username>
    <Password>capacitor</Password>
    <Name>my_db</Name>
    <RequestTimeoutMs>15000</RequestTimeoutMs>
  </Database>
</Influx-Capacitor>

when I try to test it in console with config show I always get:
Unable to connect to database
however I'm able to query influxdb with curl:

>Invoke-WebRequest http://influxdb_domain_name:8086/query?q='SHOW DATABASES'
StatusCode        : 200
StatusDescription : OK
Content           : {"results":[{"series":[{"name":"databases","columns":["name"],"values":[["general"],["my_db"]]}]}]}
RawContent        : HTTP/1.1 200 OK

I have:
Influx-capacitor 1.0.17, influxdb 0.9.6.1, windows 2012R2

Any advice would be greatly appreciated.

@poxet
Copy link
Owner

poxet commented Apr 22, 2016

It all looks right to me. I cannot see any issue. And there should be support for version 0.9.6 too. Not sure what to do about this. :/

@skonet
Copy link

skonet commented Apr 24, 2016

Hello,
I had the same problem, and was able to run from console "config server". This command created the right entry in database.xml, which looks like this:

http://localhost:8086 dbadmin EAAAAMRCMidx19g0BiQJTlHQyjsmXvN1SqW25kzNMtoTNAPm perfmon

This works, but - despite the documentation - password is somewhat encoded (encrypted?) !?
Hope this helps!
Stéphane.

@skonet
Copy link

skonet commented Apr 24, 2016

Sorry for the copy-paste-code mistake, the database.xml looks like:
<?xml version="1.0" encoding="utf-16"?> <Influx-Capacitor> <Database> <Url>http://localhost:8086</Url> <Username>dbadmin</Username> <Password>EAAAAMRCMidx19g0BiQJTlHQyjsmXvN1SqW25kzNMtoTNAPm</Password> <Name>perfmon</Name> </Database> </Influx-Capacitor>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants