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

Anyone konw how to open 16686 port? #139

Closed
wolfelven opened this issue Dec 18, 2017 · 10 comments
Closed

Anyone konw how to open 16686 port? #139

wolfelven opened this issue Dec 18, 2017 · 10 comments

Comments

@wolfelven
Copy link

When I use npm start web-ui,but the port is 3000. In README.md ,use commond
ssh -fN -L 16686:$BACKEND_HOST:$BACKEND_PORT $BACKEND_PORT.
But i got an error in jaeger-ui under npm。
Error:Proxy error: Could not proxy request /api/traces?end=1513594957800000&limit=20&lookback=1h&maxDuration&minDuration&service=Elven_Trace&start=1513591357798000 from localhost:16686 to http://localhost:16686.
Commond:ssh -fN -L 16686:localhost:3000 myhostname@localhost

@saminzadeh
Copy link
Member

The UI is hosted on Port 3000 in development which points to the jaeger query service (running independently) on port 16686 (if you are running the default configuration from https://github.com/jaegertracing/jaeger.)

Refer to the Getting Started page. Might be easier to use the docker all in package:
http://jaeger.readthedocs.io/en/latest/getting_started/

@wolfelven
Copy link
Author

Sorry, I don't use docker to run jaeger Components, runned by theirself's main.go. the jaeger query service on port 16686, but UI's port is port 3000? So I can't understand how to use commond ssh?

@yurishkuro
Copy link
Member

There is no port 3000 anymore. The query service runs on 16686. The UI in dev mode also goes to that port

./package.json:6:  "proxy": "http://localhost:16686",

If you run Jaeger all-in-one locally, you don't need to do an ssh tunnel, only if you're testing against remote query service.

@wolfelven
Copy link
Author

I know proxy port is 16686, But I use npm start UI according to README.md, the port is 3000. so how to change?? And I use Cassandra storage

@yurishkuro
Copy link
Member

  1. run jaeger backend, e.g. from all-in-one image, or from source go run ./cmd/standalone/main.go --span-storage.type=memory. The query service will be running on 16668
  2. run UI npm start. It will open the browser to localhost:3000 where UI webserver will be running.
  3. the webserver will proxy all /api calls to :16686

You don't need any additional configuration, changes, tunnels.

@wolfelven
Copy link
Author

So for example, When i click view trace json, the router path is http://localhost:3000/api/traces/1d44c3f7add2a818, and html got 404 error. If i change port 3000 to 16686, like http://localhost:16686/api/traces/1d44c3f7add2a818, the html is correct.
And the package.json proxy is 16686.

@yurishkuro
Copy link
Member

ah, that's true. Although that's probably the only view that doesn't work.

@tiffon any idea why? When I look in the inspector, then the trace view page sends the API request to the same :3000 port and works fine, but if I open that link in a new browser then I don't get the JSON, I get redirected to /search.

@tiffon
Copy link
Member

tiffon commented Dec 19, 2017

@yurishkuro Yes, it's a result of this code block:

https://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/WebpackDevServerUtils.js#L319

        // For single page apps, we generally want to fallback to /index.html.
        // However we also want to respect `proxy` for API calls.
        // So if `proxy` is specified as a string, we need to decide which fallback to use.
        // We use a heuristic: if request `accept`s text/html, we pick /index.html.
        // Modern browsers include text/html into `accept` header when navigating.
        // However API calls like `fetch()` won’t generally accept text/html.
        // If this heuristic doesn’t work well for you, use a custom `proxy` object.
        context: function(pathname, req) {
          return (
            mayProxy(pathname) &&
            req.headers.accept &&
            req.headers.accept.indexOf('text/html') === -1
          );
        },

I created PR #141 to resolve this. (It's pretty inconvenient.)

@worldsayshi
Copy link

I'm baffled by this. I'm just trying to test jaeger for the first time and nothing seems to work. I run:

$ docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp   -p5778:5778 -p16686:16686 -p14268:14268 -p9411:9411 jaegertracing/all-in-one:latest

As written here: https://jaeger.readthedocs.io/en/latest/getting_started/#all-in-one-docker-image

But there is nothing on port 16686.

$ curl http://localhost:16686/
curl: (52) Empty reply from server

@worldsayshi
Copy link

worldsayshi commented Feb 10, 2018

Ok, so I restarted my machine and now it works perfectly. X-files soundtrack playing

I guess there was some other important port being hogged by a zombie process.

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

5 participants