GitHub user Kranthi32 added a comment to the discussion: Production deployment
issue in
still i am facing issue , i am using this yaml but still facing same issue
.please support
# Disable internal PostgreSQL
postgresql:
enabled: false
# Use external PostgreSQL with direct password
externalDatabase:
type: postgresql
host: appsqlsscind10.postgres.database.azure.com
port: 5432
database: superset
user: adminusr
password: P@$$w0rd'
extraArgs: "?sslmode=require"
# Superset config overrides (ONLY ONE BLOCK!)
configOverrides:
superset_config.py: |
ENABLE_PROXY_FIX = True
SECRET_KEY = 'OG6tANx8xP8QAo9sabJAwUAjUs2OO7hEPmTqjgxqnj5TnjLouQP1tULQ'
from flask_caching import Cache
RESULTS_BACKEND = Cache(
config={
'CACHE_TYPE': 'RedisCache',
'CACHE_DEFAULT_TIMEOUT': 300,
'CACHE_KEY_PREFIX': 'superset_results',
'CACHE_REDIS_URL': 'redis://superset-redis-master:6379/0'
}
)
# Bootstrap to install system packages
bootstrapScript: |
#!/bin/bash
apt update && apt install -y gcc libpq-dev python3-dev pkg-config
pip install psycopg2-binary
# Init configuration
init:
extraPipPackages:
- psycopg2-binary
createAdmin: true
adminUser:
username: admin
firstname: Superset
lastname: Admin
email: [email protected]
password: C@reS0ft
loadExamples: false
extraEnv:
- name: DB_HOST
value: appsqlsscind01.private.postgres.database.azure.com
- name: DB_PORT
value: "5432"
# PostgreSQL wait logic
initContainer:
enabled: true
command:
- "/bin/sh"
- "-c"
- |
echo "Waiting for PostgreSQL at $DB_HOST:$DB_PORT..."
until nc -z $DB_HOST $DB_PORT; do
echo "Waiting...";
sleep 2;
done
echo "PostgreSQL is available."
# DB host/port in containers
supersetNode:
extraEnv:
- name: DB_HOST
value: appsqlsscind01.private.postgres.database.azure.com
- name: DB_PORT
value: "5432"
worker:
extraEnv:
- name: DB_HOST
value: appsqlsscind01.private.postgres.database.azure.com
- name: DB_PORT
value: "5432"
resources:
limits:
memory: 2Gi
cpu: 1000m
requests:
memory: 1Gi
cpu: 500m

log:
kubectl logs superset-init-db-9dfrj -n default -c superset-init-db
Found but failed to import local superset_config
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 57, in __init__
import redis
ModuleNotFoundError: No module named 'redis'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/superset/config.py", line 956, in <module>
import superset_config # pylint: disable=import-error
File "/app/pythonpath/superset_config.py", line 39, in <module>
key_prefix='superset_results',
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 59, in __init__
raise RuntimeError("no redis module found")
RuntimeError: no redis module found
Failed to create app
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 57, in __init__
import redis
ModuleNotFoundError: No module named 'redis'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/superset/app.py", line 59, in create_app
app.config.from_object(config_module)
File "/usr/local/lib/python3.7/site-packages/flask/config.py", line 174, in
from_object
obj = import_string(obj)
File "/usr/local/lib/python3.7/site-packages/werkzeug/utils.py", line 568, in
import_string
__import__(import_name)
File "/app/superset/config.py", line 956, in <module>
import superset_config # pylint: disable=import-error
File "/app/pythonpath/superset_config.py", line 39, in <module>
key_prefix='superset_results',
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 59, in __init__
raise RuntimeError("no redis module found")
RuntimeError: no redis module found
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 57, in __init__
import redis
ModuleNotFoundError: No module named 'redis'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts',
'superset')())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in
__call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1254, in
invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1297, in
resolve_command
cmd = self.get_command(ctx, cmd_name)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 542, in
get_command
rv = info.load_app().cli.get_command(ctx, name)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 381, in
load_app
app = call_factory(self, self.create_app)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 119, in
call_factory
return app_factory()
File "/app/superset/app.py", line 69, in create_app
raise ex
File "/app/superset/app.py", line 59, in create_app
app.config.from_object(config_module)
File "/usr/local/lib/python3.7/site-packages/flask/config.py", line 174, in
from_object
obj = import_string(obj)
File "/usr/local/lib/python3.7/site-packages/werkzeug/utils.py", line 568, in
import_string
__import__(import_name)
File "/app/superset/config.py", line 956, in <module>
import superset_config # pylint: disable=import-error
File "/app/pythonpath/superset_config.py", line 39, in <module>
key_prefix='superset_results',
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 59, in __init__
raise RuntimeError("no redis module found")
RuntimeError: no redis module found
Upgrading DB schema...
Found but failed to import local superset_config
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 57, in __init__
import redis
ModuleNotFoundError: No module named 'redis'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/superset/config.py", line 956, in <module>
import superset_config # pylint: disable=import-error
File "/app/pythonpath/superset_config.py", line 39, in <module>
key_prefix='superset_results',
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 59, in __init__
raise RuntimeError("no redis module found")
RuntimeError: no redis module found
Failed to create app
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 57, in __init__
import redis
ModuleNotFoundError: No module named 'redis'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/superset/app.py", line 59, in create_app
app.config.from_object(config_module)
File "/usr/local/lib/python3.7/site-packages/flask/config.py", line 174, in
from_object
obj = import_string(obj)
File "/usr/local/lib/python3.7/site-packages/werkzeug/utils.py", line 568, in
import_string
__import__(import_name)
File "/app/superset/config.py", line 956, in <module>
import superset_config # pylint: disable=import-error
File "/app/pythonpath/superset_config.py", line 39, in <module>
key_prefix='superset_results',
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 59, in __init__
raise RuntimeError("no redis module found")
RuntimeError: no redis module found
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 57, in __init__
import redis
ModuleNotFoundError: No module named 'redis'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts',
'superset')())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in
__call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1256, in
invoke
Command.invoke(self, ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in
invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in
invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21,
in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 425, in
decorator
with __ctx.ensure_object(ScriptInfo).load_app().app_context():
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 381, in
load_app
app = call_factory(self, self.create_app)
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 119, in
call_factory
return app_factory()
File "/app/superset/app.py", line 69, in create_app
raise ex
File "/app/superset/app.py", line 59, in create_app
app.config.from_object(config_module)
File "/usr/local/lib/python3.7/site-packages/flask/config.py", line 174, in
from_object
obj = import_string(obj)
File "/usr/local/lib/python3.7/site-packages/werkzeug/utils.py", line 568, in
import_string
__import__(import_name)
File "/app/superset/config.py", line 956, in <module>
import superset_config # pylint: disable=import-error
File "/app/pythonpath/superset_config.py", line 39, in <module>
key_prefix='superset_results',
File
"/usr/local/lib/python3.7/site-packages/flask_caching/backends/rediscache.py",
line 59, in __init__
raise RuntimeError("no redis module found")
RuntimeError: no redis module found
GitHub link:
https://github.com/apache/superset/discussions/33957#discussioncomment-13599734
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]