GithubHelp home page GithubHelp logo

Comments (10)

gevorg15 avatar gevorg15 commented on May 27, 2024 2

I just rebuilt the container and it seems to be working now. I was using a container that was built about 2 months ago. Now its accessing the correct URIs via /api/ on the ui.

thanks for helping me troubleshoot this!

from schema-registry-ui.

andmarios avatar andmarios commented on May 27, 2024 1

Maybe your k8s doesn't serve Schema Registry UI from the address root?
The PROXY option can work only if you serve Schema Registry UI from /.
For example it will work if kubernetes serves it from http://my.address.url/ but not if it serves it from http://my.address.url/schema-registry-ui.

The reason for this is that in order to proxy requests to Schema Registry we have to remove the non schema registry specific part of the URL (/api/schema-registry). If you don't serve under / we don't have a way to know what you added.

Another possibility is that you run the Schema Registry with a self issued certificate. In that case set the env variable INSECURE_PROXY=1.

from schema-registry-ui.

gevorg15 avatar gevorg15 commented on May 27, 2024 1

@andmarios Awesome! Looking forward to it!

from schema-registry-ui.

andmarios avatar andmarios commented on May 27, 2024

Did you include a scheme for your schema registry? I.e you should use http://address instead of just address.

Let's debug a bit. Following the instructions below, you (a) will find the ID of the Schema Registry UI container, (b) enter into it, (c) check you have set the correct variables, (d) install curl, (e) check that schema registry is accessible.

$ docker ps
$ docker exec -it [container_id] sh
/ # printenv
/ # apk add --no-cache curl
/ # curl "$SCHEMAREGISTRY_URL"

If all went well, the last command should return {}. Also make sure $SCHEMAREGISTRY_URL starts with the http scheme.

from schema-registry-ui.

gevorg15 avatar gevorg15 commented on May 27, 2024

Yes, i'm passing in the full URL. I have the schema registry UI working in our dev environment because we allow direct access to the schema registry but we don't allow it in prod. Kafka topics ui works in prod because the proxy option seems to be working as expected but the schema registry proxy doesn't seem to proxy all requests through the container. Its trying to access the schema registry directly to pull the config and the subjects.

Here are some of the environment variables in the container and the curl output showing that the container itself is able to connect to the registry.

SCHEMA_REGISTRY_UI_PORT_8000_TCP=tcp://172.30.137.48:8000                                                                                                                   
SCHEMAREGISTRY_URL=https://hostname-removed-but-is-valid                                                                                            
SCHEMA_REGISTRY_UI_SERVICE_PORT=8000                                                                                                                                        
SCHEMA_REGISTRY_UI_PORT=tcp://172.30.137.48:8000                                                                                                                            
HOSTNAME=schema-registry-ui-4-fzf0s                                                                                                                                                                                                              
SCHEMA_REGISTRY_UI_PORT_8000_TCP_ADDR=172.30.137.48                                                                                                                         
SCHEMA_REGISTRY_UI_PORT_8000_TCP_PORT=8000                                                                                                                                  
SCHEMA_REGISTRY_UI_SERVICE_PORT_SCHEMA_REGISTRY_UI=8000                                                                                                                                                                                                                                                     
SCHEMA_REGISTRY_UI_PORT_8000_TCP_PROTO=tcp                                                                                                                                  
SCHEMA_REGISTRY_UI_SERVICE_HOST=172.30.137.48

curl https://hostname-removed-but-is-valid

The container is running on kubernetes.

# printenv | grep -i proxy                                                                                                                                                
PROXY=true                                                                                                                                                                  

from schema-registry-ui.

gevorg15 avatar gevorg15 commented on May 27, 2024

Its served under /.

Firebug shows its trying to access the schema registry directly and not on /api/schema-registry of the schema registry ui.

Its setup the same exact way as the kafka topics ui and the proxying there works.

The certs are not self signed. But regardless if they were or not, the URL shown in firebug in my browser when accessing the UI says its trying to load content directly from the schema registry url which is incorrect. That means the proxy option isn't working.

from schema-registry-ui.

gevorg15 avatar gevorg15 commented on May 27, 2024

screen shot 2017-11-02 at 3 49 27 pm

Here is what i see in my browser. the schema registry is at https://stage-confluent-registry.... and the UI is at https://schema-registry-ui-stage-ds....

Its trying to access the config from the actual schema registry url which will never load due to network limitations in place. The schema registry UI container, however, can access the schema registry.

from schema-registry-ui.

andmarios avatar andmarios commented on May 27, 2024

It is very funny. Could you check that caddy (the web server inside the container) is set correctly?

docker exec [container_id] cat /caddy/Caddyfile

You should see something like:

0.0.0.0:8000
tls off

root /schema-registry-ui
log /access.log
proxy /api/schema-registry https://stage-confluent-registry {
    without /api/schema-registry

}

I can't figure out why your browser tries to connect directly to the schema registry. Maybe it is a cache issue? If you are on Chrome, try to open the developer console (CTRL+SHIFT+i) and then press refresh. This will clear the cache.

from schema-registry-ui.

andmarios avatar andmarios commented on May 27, 2024

Glad we tackled it!

Btw, bit of a shameless plug, but in the next few days we will release our enterprise solution for managing Kafka. It will be proprietary (we will keep working on the open source UIs of course) but you may want to have a look. We will give free licenses to developers.
More on our site: https://www.landoop.com/

Cheers!

from schema-registry-ui.

andmarios avatar andmarios commented on May 27, 2024

Thanks!

from schema-registry-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.