You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, ensure that your Celery and Redis configurations are correctly set up, as they play crucial roles in the PDF export process. Celery manages task scheduling and execution, while Redis acts as the broker and result backend for these tasks [2].
If the error persists, you might want to check the frontend component responsible for handling PDF downloads. The downloadAsPdf function uses the dom-to-pdf library, and any issues during this process could trigger the error message you're seeing. The function also includes error handling to display a warning toast if the PDF download fails [3].
To test the configuration of Celery and Redis, you can follow these steps:
Check Celery Worker Status: Run celery -A your_project_name status in your terminal to ensure that your Celery workers are running and connected.
Test a Simple Celery Task: Create a simple task in your Celery app, such as adding two numbers, and execute it to see if it completes successfully. For example:
This should return 8 if everything is configured correctly.
Check Redis Connection: Use a Redis client like redis-cli to connect to your Redis server and ensure it's running. You can run redis-cli ping and expect a PONG response.
Monitor Logs: Check the logs for both Celery and Redis for any errors or warnings that might indicate configuration issues.
Celery Flower: Consider using Flower, a real-time monitoring tool for Celery, to visualize task execution and worker status. You can start it with celery -A your_project_name flower.
These steps should help you verify that Celery and Redis are configured correctly and functioning as expected. If you encounter any issues, the logs can provide valuable insights into what might be going wrong.
celery -A superset status
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 472, in _reraise_as_library_errors
yield
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 459, in _ensure_connection
return retry_over_time(
File "/usr/local/lib/python3.10/site-packages/kombu/utils/functional.py", line 318, in retry_over_time
return fun(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 934, in _connection_factory
self._connection = self._establish_connection()
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 860, in _establish_connection
conn = self.transport.establish_connection()
File "/usr/local/lib/python3.10/site-packages/kombu/transport/pyamqp.py", line 203, in establish_connection
conn.connect()
File "/usr/local/lib/python3.10/site-packages/amqp/connection.py", line 324, in connect
self.transport.connect()
File "/usr/local/lib/python3.10/site-packages/amqp/transport.py", line 129, in connect
self._connect(self.host, self.port, self.connect_timeout)
File "/usr/local/lib/python3.10/site-packages/amqp/transport.py", line 184, in _connect
self.sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
The ConnectionRefusedError you're encountering typically indicates that Celery is unable to connect to the broker, which in your case is likely Redis. Here are some steps to troubleshoot and resolve this issue:
Verify Redis is Running: Ensure that your Redis server is up and running. You can check this by using the redis-cli ping command, which should return PONG.
Check Broker URL: Confirm that the broker URL in your Celery configuration matches the Redis server's address and port. The default broker URL in Superset is redis://localhost:6379/0[1]. Make sure this is correct and that Redis is accessible at this address.
Firewall and Network: Ensure there are no firewall rules or network issues preventing Celery from connecting to Redis. If Redis is running on a different host, verify that the host is reachable and the port is open.
Redis Logs: Check the Redis logs for any errors or warnings that might indicate why the connection is being refused.
Celery Configuration: Double-check your Celery configuration to ensure it's correctly set up to use Redis as the broker. The configuration should look something like this:
broker_url='redis://localhost:6379/0'
Restart Services: Sometimes, simply restarting the Redis server and Celery workers can resolve transient connection issues.
By following these steps, you should be able to identify and fix the connection issue between Celery and Redis.
@dosu: When I export a dashboard with a large table in the GUI, I get a browser error when exporting the PDF. However, if I limit the number of rows, the export works. So i think, it is not a celery problem. Celery ist just for batch exporting, right?
Could you provide more details about the browser error you're encountering when exporting a large table? Additionally, are there any specific error messages or logs that appear in the browser's developer console when this issue occurs? This information could help in diagnosing the problem further.
Moving this to a Help discussion, as it doesn't seem to be a bug with Superset itself. Note that you can also reach out on #deploying-superset or #ask-ai on Slack, or try the new AI tool on the Superset website.
Activity
dosubot commentedon Mar 27, 2025
Hey @beuks1! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!
I found a similar issue that was previously reported: [4.1.0.rc3] Error to download PDF or Image. This issue was closed after a pull request was merged to fix the problem: fix(Dashboard): Sync/Async Dashboard Screenshot Generation. The solution involved improvements in the screenshot generation process, which might be relevant to your case [1].
Additionally, ensure that your Celery and Redis configurations are correctly set up, as they play crucial roles in the PDF export process. Celery manages task scheduling and execution, while Redis acts as the broker and result backend for these tasks [2].
If the error persists, you might want to check the frontend component responsible for handling PDF downloads. The
downloadAsPdffunction uses thedom-to-pdflibrary, and any issues during this process could trigger the error message you're seeing. The function also includes error handling to display a warning toast if the PDF download fails [3].To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
beuks1 commentedon Mar 27, 2025
@dosu Do you have a tip on how I can test the correct configuration of Celery and Redis?
dosubot commentedon Mar 27, 2025
To test the configuration of Celery and Redis, you can follow these steps:
Check Celery Worker Status: Run
celery -A your_project_name statusin your terminal to ensure that your Celery workers are running and connected.Test a Simple Celery Task: Create a simple task in your Celery app, such as adding two numbers, and execute it to see if it completes successfully. For example:
This should return
8if everything is configured correctly.Check Redis Connection: Use a Redis client like
redis-clito connect to your Redis server and ensure it's running. You can runredis-cli pingand expect aPONGresponse.Monitor Logs: Check the logs for both Celery and Redis for any errors or warnings that might indicate configuration issues.
Celery Flower: Consider using Flower, a real-time monitoring tool for Celery, to visualize task execution and worker status. You can start it with
celery -A your_project_name flower.These steps should help you verify that Celery and Redis are configured correctly and functioning as expected. If you encounter any issues, the logs can provide valuable insights into what might be going wrong.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
beuks1 commentedon Mar 27, 2025
@dosu
celery -A superset status
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 472, in _reraise_as_library_errors
yield
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 459, in _ensure_connection
return retry_over_time(
File "/usr/local/lib/python3.10/site-packages/kombu/utils/functional.py", line 318, in retry_over_time
return fun(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 934, in _connection_factory
self._connection = self._establish_connection()
File "/usr/local/lib/python3.10/site-packages/kombu/connection.py", line 860, in _establish_connection
conn = self.transport.establish_connection()
File "/usr/local/lib/python3.10/site-packages/kombu/transport/pyamqp.py", line 203, in establish_connection
conn.connect()
File "/usr/local/lib/python3.10/site-packages/amqp/connection.py", line 324, in connect
self.transport.connect()
File "/usr/local/lib/python3.10/site-packages/amqp/transport.py", line 129, in connect
self._connect(self.host, self.port, self.connect_timeout)
File "/usr/local/lib/python3.10/site-packages/amqp/transport.py", line 184, in _connect
self.sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
dosubot commentedon Mar 27, 2025
The
ConnectionRefusedErroryou're encountering typically indicates that Celery is unable to connect to the broker, which in your case is likely Redis. Here are some steps to troubleshoot and resolve this issue:Verify Redis is Running: Ensure that your Redis server is up and running. You can check this by using the
redis-cli pingcommand, which should returnPONG.Check Broker URL: Confirm that the broker URL in your Celery configuration matches the Redis server's address and port. The default broker URL in Superset is
redis://localhost:6379/0[1]. Make sure this is correct and that Redis is accessible at this address.Firewall and Network: Ensure there are no firewall rules or network issues preventing Celery from connecting to Redis. If Redis is running on a different host, verify that the host is reachable and the port is open.
Redis Logs: Check the Redis logs for any errors or warnings that might indicate why the connection is being refused.
Celery Configuration: Double-check your Celery configuration to ensure it's correctly set up to use Redis as the broker. The configuration should look something like this:
Restart Services: Sometimes, simply restarting the Redis server and Celery workers can resolve transient connection issues.
By following these steps, you should be able to identify and fix the connection issue between Celery and Redis.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
beuks1 commentedon Mar 28, 2025
@dosu: When I export a dashboard with a large table in the GUI, I get a browser error when exporting the PDF. However, if I limit the number of rows, the export works. So i think, it is not a celery problem. Celery ist just for batch exporting, right?
dosubot commentedon Mar 28, 2025
Could you provide more details about the browser error you're encountering when exporting a large table? Additionally, are there any specific error messages or logs that appear in the browser's developer console when this issue occurs? This information could help in diagnosing the problem further.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
beuks1 commentedon Mar 28, 2025
@dosu
rusackas commentedon Mar 31, 2025
Moving this to a Help discussion, as it doesn't seem to be a bug with Superset itself. Note that you can also reach out on
#deploying-supersetor#ask-aion Slack, or try the new AI tool on the Superset website.