Comments (4)
Could be an issue with the worker's webdriver config or something. Unclear from the logs as to what the initial cause of the 308 is.
from superset.
Could be an issue with the worker's webdriver config or something. Unclear from the logs as to what the initial cause of the 308 is.
I also considered this possibility, but the reports are being sent correctly, and they utilize the webdriver. For example:
[2024-02-21 09:32:00,077: INFO/ForkPoolWorker-1] Scheduling alert test_report eta: 2024-02-21 09:32:00
Executing alert/report, task id: 4a38bbbe-0f97-4031-afb1-6829668a754b, scheduled_dttm: 2024-02-21T09:32:00
[2024-02-21 09:32:00,082: INFO/ForkPoolWorker-1] Executing alert/report, task id: 4a38bbbe-0f97-4031-afb1-6829668a754b, scheduled_dttm: 2024-02-21T09:32:00
session is validated: id 9, executionid: 4a38bbbe-0f97-4031-afb1-6829668a754b
[2024-02-21 09:32:00,083: INFO/ForkPoolWorker-1] session is validated: id 9, executionid: 4a38bbbe-0f97-4031-afb1-6829668a754b
Running report schedule 4a38bbbe-0f97-4031-afb1-6829668a754b as user admin
[2024-02-21 09:32:00,116: INFO/ForkPoolWorker-1] Running report schedule 4a38bbbe-0f97-4031-afb1-6829668a754b as user admin
Report sent to email, notification content is {'notification_type': 'Report', 'notification_source': <ReportSourceFormat.DASHBOARD: 'dashboard'>, 'notification_format': 'PNG', 'chart_id': None, 'dashboard_id': 3, 'owners': [Superset Admin]}
[2024-02-21 09:32:14,119: INFO/ForkPoolWorker-1] Report sent to email, notification content is {'notification_type': 'Report', 'notification_source': <ReportSourceFormat.DASHBOARD: 'dashboard'>, 'notification_format': 'PNG', 'chart_id': None, 'dashboard_id': 3, 'owners': [Superset Admin]}
Anyway, I'll also include the configuration of the superset worker:
supersetWorker:
affinity: {}
autoscaling:
enabled: false
maxReplicas: 100
minReplicas: 1
targetCPUUtilizationPercentage: 80
command:
- /bin/sh
- -c
- |
# Install chrome webdriver
# See https://github.com/apache/superset/blob/4fa3b6c7185629b87c27fc2c0e5435d458f7b73d/docs/src/pages/docs/installation/email_reports.mdx
apt-get update
apt-get install wget unzip zip -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt-get install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb
wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.85/linux64/chromedriver-linux64.zip
#unzip chromedriver_linux64.zip
#chmod +x chromedriver
#mv chromedriver /usr/bin
unzip chromedriver-linux64.zip
chmod +x chromedriver-linux64/chromedriver
mv chromedriver-linux64/chromedriver /usr/bin
apt-get autoremove -yqq --purge
apt-get clean
#rm -f google-chrome-stable_current_amd64.deb chromedriver-linux64.zip
# Run
. {{ .Values.configMountPath }}/superset_bootstrap.sh; celery --app=superset.tasks.celery_app:app worker
containerSecurityContext: {}
deploymentAnnotations: {}
deploymentLabels: {}
extraContainers: []
forceReload: false
initContainers:
- command:
- /bin/sh
- -c
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -wait "tcp://$REDIS_HOST:$REDIS_PORT"
-timeout 120s
envFrom:
- secretRef:
name: '{{ tpl .Values.envFromSecret . }}'
image: '{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}'
imagePullPolicy: '{{ .Values.initImage.pullPolicy }}'
name: wait-for-postgres-redis
livenessProbe:
exec:
command:
- sh
- -c
- celery -A superset.tasks.celery_app:app inspect ping -d celery@$HOSTNAME
failureThreshold: 3
initialDelaySeconds: 120
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 60
podAnnotations: {}
podLabels: {}
podSecurityContext: {}
readinessProbe: {}
replicaCount: 1
resources: {}
startupProbe: {}
strategy: {}
topologySpreadConstraints: []
and the worker's startup logs:
Saving to: ‘chromedriver-linux64.zip’
Archive: chromedriver-linux64.zip
inflating: chromedriver-linux64/LICENSE.chromedriver
inflating: chromedriver-linux64/chromedriver
logging was configured successfully
2024-02-21 09:21:34,875:INFO:superset.utils.logging_configurator:logging was configured successfully
2024-02-21 09:21:34,878:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
/usr/local/lib/python3.9/site-packages/flask_limiter/extension.py:293: UserWarning: Using the in-memory storage for tracking rate limits as no storage was explicitly specified. This is not recommended for production use. See: https://flask-limiter.readthedocs.io#configuring-a-storage-backend for documentation about configuring the storage backend.
warnings.warn(
/usr/local/lib/python3.9/site-packages/celery/platforms.py:840: SecurityWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!
Please specify a different user using the --uid option.
User information: uid=0 euid=0 gid=0 egid=0
warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
-------------- celery@superset-worker-7db568d57c-dht8w v5.2.2 (dawn-chorus)
--- ***** -----
-- ******* ---- Linux-3.10.0-1160.71.1.el7.x86_64-x86_64-with-glibc2.36 2024-02-21 09:21:36
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: __main__:0x7f0fd54bbb20
- ** ---------- .> transport: redis://superset-redis-headless:6379/0
- ** ---------- .> results: redis://superset-redis-headless:6379/0
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
from superset.
UPDATE:
Finally, I found that the redirection was due to the WEBDRIVER_BASEURL not being configured at the service level.
WEBDRIVER_BASEURL = "http://{{ template "superset.fullname" . }}:8088/"
However, I now encounter receiving 400 errors due to missing CSRF when trying to warm up the cache, both from the worker and externally using the API.
{'errors': [{'message': '400 Bad Request: The CSRF session token is missing.', 'error_type': 'GENERIC_BACKEND_ERROR', 'level': 'error', 'extra': {'issue_codes': [{'code': 1011, 'message': 'Issue 1011 - Superset encountered an unexpected error.'}]}}]}
If I disable CSRF:
WTF_CSRF_ENABLED = False
it returns 302:
[2024-02-29 17:00:00,368: INFO/ForkPoolWorker-2] fetch_url[356f2e18-4069-4f16-a8aa-d3bee8323296]: Fetching http://superset:8088/api/v1/chart/warm_up_cache with payload {"chart_id": 49}
[2024-02-29 17:00:00,377: ERROR/ForkPoolWorker-3] fetch_url[ba8a1804-8ea0-460a-8892-da8f8fa9b733]: Error warming up cache!
Traceback (most recent call last):
File "/app/superset/tasks/cache.py", line 242, in fetch_url
response = request.urlopen( # pylint: disable=consider-using-with
File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/local/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/local/lib/python3.9/urllib/request.py", line 555, in error
result = self._call_chain(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 726, in http_error_302
new = self.redirect_request(req, fp, code, msg, headers, newurl)
File "/usr/local/lib/python3.9/urllib/request.py", line 664, in redirect_request
raise HTTPError(req.full_url, code, msg, headers, fp)
urllib.error.HTTPError: HTTP Error 302: FOUND
[2024-02-29 17:00:00,378: ERROR/ForkPoolWorker-2] fetch_url[356f2e18-4069-4f16-a8aa-d3bee8323296]: Error warming up cache!
Traceback (most recent call last):
File "/app/superset/tasks/cache.py", line 242, in fetch_url
response = request.urlopen( # pylint: disable=consider-using-with
File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/local/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/local/lib/python3.9/urllib/request.py", line 555, in error
result = self._call_chain(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 726, in http_error_302
new = self.redirect_request(req, fp, code, msg, headers, newurl)
File "/usr/local/lib/python3.9/urllib/request.py", line 664, in redirect_request
raise HTTPError(req.full_url, code, msg, headers, fp)
urllib.error.HTTPError: HTTP Error 302: FOUND
Related errors reported before: #24717 (comment) #24579 (comment)
from superset.
I'm experiencing the same issue.
from superset.
Related Issues (20)
- Crossfilter scoping on tabs is ignored and enabled after reload
- isFrontendRoute in routes.tsx ignores parameters
- Time column/range dashboard filter doesn't work with bar chart with timestamp column on x-axis
- Superset init without example data, throws code 500 in sqltab page due to no database found
- When added to a dashboard, Mapbox map charts do not show any data until the user interacts with the map HOT 2
- [SIP-123] Proposal replacement of data table components with ag-grid HOT 14
- gauge chart should allow in customize to configure legend position and alignment HOT 1
- [SIP-124] Add a text filter working as "like" to allow user to filter as dashboard_filter (generic solution) or as table_filter (specific solution) HOT 8
- Select component fires onChange when selected value has not changed
- Snowflake connection is not working HOT 2
- Descending order not functioning as expected in Stacked mode in Superset HOT 1
- When trying to duplicate a dataset, the "Fatal error" appears
- Not accepting `*` in a database account password HOT 2
- Some permissions seem unnecessary because they are associated with essential functions HOT 1
- Some permission on Dashboard seem unnecessary because they are associated with essential functions HOT 1
- Charts based on Virtual Datasets Names in `UTF-8`
- CSS Color attribute not working
- Superset Dashboard with native filter does not correctly update when opened
- Datetime values are returned as 0NaN-NaN-NaN outside of a certain range
- pkg-config not found on docker compose build HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superset.