mongodb importing issue
guymalka
HOBBYOP
2 months ago
I'm trying to import JSON files into MongoDB using mongoimport, but I keep getting an authentication error even though I've configured MongoDB to run without auth.
Error:
Failed: (Unauthorized) Command insert requires authentication
2026-03-19T21:11:52.036+0200 0 document(s) imported successfully. 0 document(s) failed to import.
Command:
mongoimport --host hopper.proxy.rlwy.net:26641 --db edgar --collection app_settings --file app_settings.json
MongoDB Configuration:
- Image: mongo:8.0
- Start Command:
docker-entrypoint.sh mongod --ipv6 --bind_ip ::,0.0.0.0 --setParameter diagnosticDataCollectionEnabled=false --noauth - Auth Variables: Removed (MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD set to null)
- Volume: Mounted at /data/db (5000 MB)
What I've tried:
- Added
--noauthflag to startCommand - Removed MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD variables
- Redeployed MongoDB multiple times
- Removed and recreated the volume
What's happening: Despite these changes, MongoDB still requires authentication. The deployment appears to complete successfully, but the service still enforces auth.
Question: Why is MongoDB still requiring authentication even with --noauth enabled? Is there something else I need to configure to disable auth on Railway?
0 Replies
