-
Notifications
You must be signed in to change notification settings - Fork 31
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
Could not get stream throughput #25
Comments
Node version v6.9.1, using package version 1.0.0 |
I think know the reason for your problem. graylog-dashboard.js forces the URL to have :12900 in it (see line 92)
This is a problem since I (and you probably too) have the Graylog API available at the URL https://graylog.example.com/api/. This can be seen when you add a little debug to the Error message:
So the fix for this is to simply comment out line 92 :) |
Or add port 443 to your path. Thanks, I'll see what I can do to make this
simpler.
…On Jan 12, 2017 6:34 AM, "Philipp Ruland" ***@***.***> wrote:
I think know the reason for your problem. graylog-dashboard.js forces the
URL to have :12900 in it (see line 92)
// Make sure we have a port (default REST API port is 12900)
if (!/:\d+$/.test(config.serverURL)) *config.serverURL += ':12900'*;
// Make sure config.serverURL has a trailing slash. (computers.)
if (config.serverURL[config.serverURL.length - 1] !== '/')
config.serverURL += '/';
return config
});
This is a problem since I (and you probably too) have the Graylog API
available at the URL https://graylog.example.com/api/. This can be seen
when you add a little debug to the Error message:
Error: Could not get streams.
-->url: https://graylog.example.com/api/:12900/streams
-->response:
Error: Bad status code: 404 Not Found [object Object]
at request.getAsync.then (/usr/lib/node_modules/graylog-cli-dashboard/lib/
graylog-api.js:99:13)
at tryCatcher (/usr/lib/node_modules/graylog-cli-dashboard/node_modules/bluebird/js/release
util.js:16:23)
So the fix for this is to simply comment out line 92 :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABJFP7Uce-Lt0EUxeKLf7dHm-C47F7Z0ks5rRh3TgaJpZM4KydN9>
.
|
Well, that didn't fix it for me. It surprised me too, because the if statement is searching for :. I had to comment out that line to get it to work. |
Oh yeah; it's not assuming a path at all... the regex is looking for It appears there are two configuration options for the API now as of 2.1; separate port, or same port separated by path. I won't have time for a bit to work on this; would be happy to accept a PR. To be honest, just removing this attempt to be smart would be fine, so long as there's a better error message for when we 404 (something like |
I'll make a proper fix and open a PR :) |
@DerPhlipsi I don't think it is the problem with the server configuration, because if it was then the OP would get a failure on the very first api call made (get /streams), and it would probably be a connection failure. @xavierhardy : It's worth running a reverse proxy (e.g. nginx) in front of graylog to find out exactly what the api call is which is failing, and if possible to find out the response details. It might (or might not) be the same problem I've reported in #28. |
When opening a valid stream (I get another error when using an invalid title), I get the following error. The dashboard is not even displayed.
The text was updated successfully, but these errors were encountered: