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

Doesn't support urls not under '/' #365

Closed
n3g opened this issue Aug 18, 2017 · 1 comment
Closed

Doesn't support urls not under '/' #365

n3g opened this issue Aug 18, 2017 · 1 comment
Assignees

Comments

@n3g
Copy link

n3g commented Aug 18, 2017

Hi,
I'm using a JMX wrapper jmxtrans that uses this library to push data to influx.
Unfortunately my influxdb is not mapped under '/', so the URL is something like https://xyz.com/influx/. I tracked down the issue until this library, which appears to use all URLs directly under '/'.
Example in InfluxDBService.java line 40:

  @GET("/query")
  public Call<QueryResult> query(@Query(U) String username, @Query(P) String password, @Query(DB) String db,
      @Query(EPOCH) String epoch, @Query(value = Q, encoded = true) String query);

This causes the library to fail because it defaults to '/' urls (which don't exist in my case):

java.lang.RuntimeException: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /query was not found on this server.</p>
</body></html>

I couldn't find a way around this.
Thanks for any help!

@vicctor
Copy link

vicctor commented Dec 16, 2017

I fixed this issue for my own purposes in my fork https://github.com/vicctor/influxdb-java
Pull request is set to influxdada. I'm not sure if I fixed all possible cases, at least all what I need works now. My problem was that I wish to put the influxdb behind nginx, so all my services will be accessible over one TCP port.

@fmachado fmachado self-assigned this Dec 16, 2017
@majst01 majst01 closed this as completed in 109bac4 Jun 5, 2018
majst01 added a commit that referenced this issue Jun 5, 2018
fix #365 - fix problem of connecting to the influx api with URL which…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants