apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.71k stars 13.85k forks source link

Default port is not changing after setting SUPERSET_WEBSERVER_PORT #23825

Open abhi1045 opened 1 year ago

abhi1045 commented 1 year ago

I'm trying to build a docker image of superset on a non default port. I follow the steps mentioned in at this link and also this link. But the issue is I'm changing the default port to 6011 but it is not changing.

How to reproduce the bug

  1. Go to 'superset_config.py' Add below code snippet
SUPERSET_WEBSERVER_PROTOCOL = "http"
SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"
SUPERSET_WEBSERVER_PORT = 6011
Screenshot 2023-04-26 at 1 51 09 PM

Expected results

When I'm building the docker using following commands

docker build -t superset .

docker run -p 8088:6011 superset

The port "6011" must have listening.

Actual results

Screenshot 2023-04-26 at 1 39 34 PM

It is still running on 8088 port, but should run on 6011 port.

Environment

Checklist

Make sure to follow these steps before submitting your issue - thank you!

sfirke commented 1 year ago

Hello, I believe that variable is no longer used - see this pending PR to update the docs: https://github.com/apache/superset/pull/22849 You might want WEBDRIVER_BASEURL instead.

abhi1045 commented 1 year ago

I have tried set WEBDRIVER_BASEURL in 'superset_config.py'

WEBDRIVER_BASEURL = "http://0.0.0.0:6011"

After that run those steps

docker build -t superset .

docker run -p 5000:6011 superset

Expected results

When, I hit "http://0.0.0.0:5000", the superset application runs.

So, the default port must be changed to port 6011 and I'm redirecting to port 5000, but this is not working.

Actual results

I'm not getting the application running at port 5000.

This is still Listening at: http://0.0.0.0:8088 and I'm not able to access it on either port

sebastianliebscher commented 1 year ago

I can confirm this issue: Changing WEBDRIVER_BASEURL or SUPERSET_WEBSERVER_PORT does not change the port the superset webserver is listening at. Tested for Superset 2.1.0 and latest using docker-compose-non-dev.yml.

The only way I know to change the port is via environment variable SUPERSET_PORT. docker-compose:

    environment:
      SUPERSET_PORT: 6011

docker run:

-e SUPERSET_PORT=6011
rusackas commented 8 months ago

Is this still an issue in 3.x?

sfirke commented 8 months ago

It seems like SUPERSET_PORT is the fix here. I think we're close to closing this. The only thing is how we want to document that. Normally I think of config.py as the default documentation of every Superset config variable. However this variable is not in config.py. Would it get picked up from config.py if we added SUPERSET_PORT=8088 which is present in /docker/.env-non-dev ? Then it might be more apparent to users how to change this. What do you think @sebastianliebscher ?

Someone mentioned this variable today in Slack as being key to their k8s deployment.

rusackas commented 2 months ago

Anyone know the current state of affairs here, or what it'd take to close this?

Maybe @dosu-bot knows?