GitHub user dosubot[bot] added a comment to the discussion: Need help setting 
up Superset chart in AWS EKS behind ALB

<!-- Answer -->
The "User already exists" error during Superset initialization is expected and 
benign in Helm/Kubernetes setups—it just means the admin user already exists in 
the metadata database, and the init job script is designed to ignore this and 
continue without failing 
([source](https://github.com/apache/superset/discussions/33957)). This does not 
cause or relate to the "werkzeug.local.LocalProxy is not mapped" error.

The LocalProxy error is almost always due to session/context issues, version 
mismatches (Superset requires Python 3.10/3.11 and Node.js 20.x), or custom 
authentication/security manager code returning a LocalProxy instead of a real 
user object ([source](https://github.com/apache/superset/issues/35823)). It can 
also happen if requests hit endpoints outside a valid Flask context, such as 
misrouted ALB/Ingress traffic or health checks 
([source](https://github.com/apache/superset/discussions/35241)).

To further diagnose:
- Double-check the actual state of your metadata DB (e.g., with `psql` or 
SQLAlchemy) to confirm if the admin user exists and the DB is truly blank 
before initialization.
- Review your deployment for custom scripts, Helm hooks, or overrides that 
might interfere with user/session handling.
- Check for custom authentication or security manager code that could return a 
LocalProxy instead of a real user object.
- Review Superset webserver logs (not just init logs) after startup for 
user/session/context errors.

Best practices: use supported Python/Node versions, ensure proper proxy header 
and session cookie config, and avoid requests outside Flask context 
([source](https://github.com/apache/superset/issues/35823)).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/06d5739a-d8dd-4adc-9bc7-f87ff481f9b5?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/06d5739a-d8dd-4adc-9bc7-f87ff481f9b5?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/06d5739a-d8dd-4adc-9bc7-f87ff481f9b5?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/06d5739a-d8dd-4adc-9bc7-f87ff481f9b5?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/06d5739a-d8dd-4adc-9bc7-f87ff481f9b5?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/06d5739a-d8dd-4adc-9bc7-f87ff481f9b5?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/06d5739a-d8dd-4adc-9bc7-f87ff481f9b5?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20%22User%20already%20exists%22%20error%20during%20Superset%20initialization%20is%20expected%20and%20benign%20in%20Helm/Kubernetes%20setups%E2%80%94it%20just%20means%20the%20admin%20user%20already%20exists%20in%20the%20metadata%20database%2C%20and%20the%20init%20job%20script%20is%20designed%20to%20ignore%20this%20and%20continue%20without%20failing%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/33957%29%29.%20This%20does%20not%20cause%20or%20relate%20to%20the%20%22werkzeug.local.LocalProxy%20is%20not%20mapped%22%20error.%0A%0AThe%20LocalProxy%20error%20is%20almost%20always%20due%20to%20session/context%20issues%2C%20version%20mismatches%20%28Superset%20requires%20Python%203.10/3.11%20and%20Node.js%2020.x%29%2C%20or%20custom%
 
20authentication/security%20manager%20code%20returning%20a%20LocalProxy%20instead%20of%20a%20real%20user%20object%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35823%29%29.%20It%20can%20also%20happen%20if%20requests%20hit%20endpoints%20outside%20a%20valid%20Flask%20context%2C%20such%20as%20misrouted%20ALB/Ingress%20traffic%20or%20health%20checks%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/35241%29%29.%0A%0ATo%20further%20diagnose%3A%0A-%20Double-check%20the%20actual%20state%20of%20your%20metadata%20DB%20%28e.g.%2C%20with%20%60psql%60%20or%20SQLAlchemy%29%20to%20confirm%20if%20the%20admin%20user%20exists%20and%20the%20DB%20is%20truly%20blank%20before%20initialization.%0A-%20Review%20your%20deployment%20for%20custom%20scripts%2C%20Helm%20hooks%2C%20or%20overrides%20that%20might%20interfere%20with%20user/session%20handling.%0A-%20Check%20for%20custom%20authentication%20or%20security%20manager%20code%20that%20could%20return%20a%20LocalPro
 
xy%20instead%20of%20a%20real%20user%20object.%0A-%20Review%20Superset%20webserver%20logs%20%28not%20just%20init%20logs%29%20after%20startup%20for%20user/session/context%20errors.%0A%0ABest%20practices%3A%20use%20supported%20Python/Node%20versions%2C%20ensure%20proper%20proxy%20header%20and%20session%20cookie%20config%2C%20and%20avoid%20requests%20outside%20Flask%20context%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35823%29%29.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36296)

GitHub link: 
https://github.com/apache/superset/discussions/36296#discussioncomment-15151961

----
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]

Reply via email to