Server on port 5603?

So when i run kibana (5.4.1) in development more using 'npm start', the APIs that i add to the Hapi.js server object can be accessed via 5603 and not 5601 where actual kibana resides, this behavior is not present when I'm running kibana in production (non dev mode) with my plugins, am I doing something wrong?
Could you explain or point me to some resources explaining this behavior?


Which port is mentioned in your kibana.yml file?
also can you please share the logs after starting the kibana service?

kibana.yml is the standard one, Kibana is being hosted on 5601 and everything is as it should when run from optimized bundle. I am talking about development mode of Kibana in which the my api's are getting hosted on 5603.

In development mode there is a proxy added in front of Kibana to force developers to support base paths that differ from /.

That I'm aware of, and I always account for it using :-
server.config().get('server.basePath') ; //For server side
chrome.getBasePath() //For angularJs

But the APIs which should be :-

Are being hosted on (Only in Dev mode) :-

Going by your comment, I'm getting why it's happening but how to rectify this issue?
The way I set my routing :-

	const basePath = serverConfig.get('server.basePath');
	configurations.apiConfig.listPath = basePath + configurations.apiConfig.listPath || "/someApi";

		method: 'GET',
		path: apiConfig.listPath,
		handler: handleReq

I checked Documents :-
But I don't see them doing it any different or maybe I'm missing something.

If you are registering a route on the server-side using server.route(), you don't need to include the basePath in the path argument. Only when querying the API from the client side or redirecting to another url on the server needs that path to be manually added as a prefix.

Well, my current concern is the port on which it is being hosted. Do you have any idea on why it would host the APIs on 5603?

The setup is such, that in dev mode we start two http servers:

  • A so-called "base path proxy" on port 5601, which acts as a reverse proxy for Kibana with a randomly generated url prefix. That is the reason why, when accessing localhost:5601, you will be redirected to something like localhost:5601/abc/app/kibana.
  • The main Kibana http server on port 5603, which serves the static assets as well as the api routes.

The server on port 5603 is not intended to be accessed directly, but instead through the reverse proxy at 5601. If you think that you don't need the forcing function to support arbitrary base paths, you can disable the random path prefix using the --no-base-path argument to npm start as in npm start -- --no-base-path.

This is also documented in the "Contributing to Kibana" chapter of the documentation.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.