OK, after much config modification (the default 127.0.0.1 bindings don’t allow 
access from another host on my internal network), I was able to test this, and 
indeed the Swagger works in Firefox from another machine not going through the 
proxy.  But without any error messages anywhere, I’m not sure where the 
difference is coming from.  Any ideas where I could look?

thanks,
Adrian


From: [email protected] [mailto:[email protected]] On Behalf Of 
Jochen Schalanda
Sent: 17. toukokuuta 2016 15:10
To: Graylog Users <[email protected]>
Subject: [graylog2] Re: Rest API browser requirements?

Hi Adrian,

is the REST API browser (Swagger UI) working for you if you access it without 
proxy? Is your proxy modifying the responses from Graylog?

Cheers,
Jochen

On Tuesday, 17 May 2016 14:08:39 UTC+2, 
[email protected]<mailto:[email protected]> wrote:
Hello,

I've never been able to get the REST API browser to work in either 1.x or 2.x.  
I'm accessing through a proxy, but both the web UI and API usage work fine.

When I access the browser page at https://xxx.example.com:8081/api-browser

(8081 is my proxied port for the API), I get a kind of table-of-contents page, 
show in the first screenshot.  Notice that I have a login username and password 
on the upper right, even though I am logged into the graylog UI on the same 
browser.  There is no login button though, and entering a username and password 
and pressing enter does nothing.

If I click on any of the items in the table of contents, or any of the links on 
the left side except "Raw", nothing happens.  If I click on "Raw", I sometimes 
get some JSON, and sometimes (after 2.0 upgrade) get an exception 
pretty-printed back from the server, e.g.:

java.net.URISyntaxException: Illegal character in path at index 50: 
http://logger.i.solaforce.com:80/api-docs/streams/{streamid}/alarmcallbacks<http://logger.i.solaforce.com:80/api-docs/streams/%7Bstreamid%7D/alarmcallbacks>

     1: 
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.getRequestUri(GrizzlyHttpContainer.java:491)

     2: 
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:366)

     3: 
org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224)

     4: 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)

     5: 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

     6: 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

     7: java.lang.Thread.run(Thread.java:745)
Root Cause: java.net.URISyntaxException: Illegal character in path at index 50: 
http://logger.i.solaforce.com:80/api-docs/streams/{streamid}/alarmcallbacks<http://logger.i.solaforce.com:80/api-docs/streams/%7Bstreamid%7D/alarmcallbacks>

     1: java.net.URI$Parser.fail(URI.java:2848)

     2: java.net.URI$Parser.checkChars(URI.java:3021)

     3: java.net.URI$Parser.parseHierarchical(URI.java:3105)

     4: java.net.URI$Parser.parse(URI.java:3053)

     5: java.net.URI.(URI.java:588)

     6: 
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.getRequestUri(GrizzlyHttpContainer.java:489)

     7: 
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:366)

     8: 
org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224)

     9: 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)

    10: 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        ... 2 more


I have tried Firefox and Chrome on Windows.  I don't get any Javascript errors 
showing in developer console, nor are there any failed network requests logged. 
 Any idea what is wrong?  Is it simply unsupported to use the API browser 
through a proxy, or through a proxy with different port for the API?
--
You received this message because you are subscribed to a topic in the Google 
Groups "Graylog Users" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/graylog2/RvkTds5dh2c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/da5eec07-a853-4924-95c2-acd3d3b2792c%40googlegroups.com<https://groups.google.com/d/msgid/graylog2/da5eec07-a853-4924-95c2-acd3d3b2792c%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/DB5PR0401MB17815293F4AAE1DD1CE2D92CFA480%40DB5PR0401MB1781.eurprd04.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to