Unleash / helm-charts

Contains helm-charts for Unleash
Apache License 2.0
41 stars 56 forks source link

Setting UNLEASH_URL and BASE_PATH causes CLBO error #99

Closed chriswk closed 10 months ago

chriswk commented 10 months ago

Describe the bug

Okay so I was able to get Unleash up and running. However, when I am setting a context path as / in ingress rule, it is accessible but not when it is set to /unleash.

This works: ` hosts:

host:
paths:
    path: /
    pathType: Prefix`

But not this

`hosts:

host:
paths:
    path: /unleash
    pathType: Prefix`

My UNLEASH_URL is set to /unleash

When I set the context path to /unleash I get 404 error for /static/style-770afaee.css net::ERR_ABORTED 404 (Not Found) and /static/index-17d74ac9.js net::ERR_ABORTED 404 (Not Found)


So I tried setting BASE_URI_PATH in the env variable. But then I am getting below error in pod logs and it goes into CrashLoopBackOff state.

Steps to reproduce the bug

No response

Expected behavior

Unleash should start and serve on /unleash

Logs, error output, etc.

[ERROR] TypeError [ERR_INVALID_URL]: Invalid URL at new NodeError (node:internal/errors:405:5) at new URL (node:internal/url:611:13) at findRootUrl (/unleash/node_modules/unleash-server/dist/lib/openapi/index.js:213:21) at createOpenApiSchema (/unleash/node_modules/unleash-server/dist/lib/openapi/index.js:222:17) at new OpenApiService (/unleash/node_modules/unleash-server/dist/lib/services/openapi-service.js:16:102) at createServices (/unleash/node_modules/unleash-server/dist/lib/services/index.js:161:28) at createApp (/unleash/node_modules/unleash-server/dist/lib/server-impl.js:69:52) at Object.start (/unleash/node_modules/unleash-server/dist/lib/server-impl.js:163:27)

Screenshots

No response

Additional context

No response

Unleash version

No response

Subscription type

None

Hosting type

None

SDK information (language and version)

No response

chriswk commented 10 months ago

Hi @jaiswalshikha - Reading over your error report. It seems like you've set UNLEASH_URL to just /unleash. UNLEASH_URL needs to be the full valid URL (as in https://my.domain.com/unleash) BASE_URI_PATH needs to be the path of the URL. (in this example it would need to be /unleash).

The last error message seems to point towards UNLEASH_URL not being a valid URL and then this will fail the way you're seeing in your logs.

nunogois commented 10 months ago

Closed due to lack of feedback.