lensesio/schema-registry-ui

CONNECTIVITY ERROR in schema-registry-ui

Opened this issue · 4 comments

Hi, I built schema-registry-ui from source and started it through npm start in a remote machine. Then I opened a ssh tunnel to port 8080 and therefore the UI is available at localhost:8080.

I enabled CORS in schema-registry.properties:
access.control.allow.methods=GET,POST,PUT,OPTIONS
access.control.allow.origin=*

The configurations in env.js are as follow:
var clusters = [
{
NAME:"kafka-cluster",
SCHEMA_REGISTRY: "http://xxx.xxx.xxx.xxx:8081",
PROXY: true,
COLOR: "#141414",
readonlyMode: true
}
];

Then, I also changed the host field in the devServer on file webpack.config.js to the proper hostname.
In my cluster SASL authentication is enabled (so also in schema registry).

When I start schema-registry-ui I get CONNECTIVITY ERROR after few seconds. In the error console of my browser I get the following:

[Info] Starting schema-registry controller
[Debug] curl -X GET http://xxx.xxx.xxx.xxx:8081/config
[Info] Starting schema-registry controller - home (app.d31b2028cdc50b340add.bundle.js, line 1276)
[Info] Starting schema-registry controller : list ( initializing subject cache ) (app.d31b2028cdc50b340add.bundle.js, line 1301)
[Debug] curl -X GET http://xxx.xxx.xxx.xxx:8081/subjects/
[Error] Failure with : "Get global config rejection : null -1"
failure (app.d31b2028cdc50b340add.bundle.js:1112)
processQueue (vendor.d31b2028cdc50b340add.bundle.js:88107)
(anonymus function) (vendor.d31b2028cdc50b340add.bundle.js:88123)
$digest (vendor.d31b2028cdc50b340add.bundle.js:89228)
$apply (vendor.d31b2028cdc50b340add.bundle.js:89522)
done (vendor.d31b2028cdc50b340add.bundle.js:83503)
completeRequest (vendor.d31b2028cdc50b340add.bundle.js:83712)
requestError (vendor.d31b2028cdc50b340add.bundle.js:83650)
[Error] Failed to load resource: The request waiting time has expired. (config, line 0)
[Error] Failed to load resource: The request waiting time has expired. (subjects, line 0)

If I execute the curl commands in the remote machine they work properly.

From what I saw from previous issues, this issue is usually due to disabled CORS or to the PROXY parameter set to false (which I believe to be the default option); however this isn't the case.

Is the problem related to the fact that I connect to the remote machine through ssh or that SASL authentication is enabled? Please help me with this.

Thanks in advance.

Hello @aresim95! it seems possible that SASL authentication blocks the request. Can you run a CURL to GET http://xxx.xxx.xxx.xxx:8081/api/config and see if that is returning a response?

PROXY: "true" to the environment variables did the trick! Thanks.

Hello
Can I please get the steps for the above? Also how can I connect to schema-registry from schema-registry-ui via basic authentication?

Thanks
Matt