Incubator-superset: Default credential not working

Created on 24 Jun 2020  Â·  36Comments  Â·  Source: apache/incubator-superset

A clear and concise description of what the bug is.

Expected results

Successful login

what you expected to happen.

Actual results

Trying admin username and admin as password. Getting
Invalid login. Please try again.

what actually happens.

Screenshots

image

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Environment

(please complete the following information):

Running docker setup

#bug .docker

Most helpful comment

I do not agree this issue should be closed. The documents for Docker clearly state the user/password should be admin/admin.
But this is incorrect (https://superset.incubator.apache.org/installation.html#start-with-docker).
This is a big off put with wanting to try Superset.

All 36 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

image

Its similar issue as
https://github.com/apache/incubator-superset/issues/7336, but none of the solution mentioned worked.

Is there a reason this was closed? I'm still having this issue.

@scook12 I could manage to fix this issue.
You need to run following command to setup username and password:
docker-compose exec superset bash /app/docker-init.sh

If you run it in windows you will get an error. To fix it first run following
dos2unix docker-init.sh
This will make the script linux ready as the script got copied from windows system to a linux one and it has certain special characters which throws errors.

Got it, thanks @SwapnilKhante!

I do not agree this issue should be closed. The documents for Docker clearly state the user/password should be admin/admin.
But this is incorrect (https://superset.incubator.apache.org/installation.html#start-with-docker).
This is a big off put with wanting to try Superset.

@simondmorias I agree. It does not work the way it is mentioned in official documentation.
Reopening the issue.

Hi all

+1 should not be closed, the documentation doesn't mention this step

Thanks @SwapnilKhante!!

I still fail to get superset up on windows. I ran
dos2unix docker-init.sh
and then
docker-compose exec superset bash /app/docker-init.sh

But I get the error

ERROR: No container found for superset_1

edit: I did not realize that I need to run up first. If I do that no Error appears upon executing in a second terminal

@SwapnilKhante

how exacly did you call it on windows?
When I run first
docker-compose up
and then
docker-compose exec superset bash /app/docker-init.sh
in a different terminal, nothing happens exept for a second of computation.

To init the user and roles

sudo docker-compose exec superset bash /app/docker-init.sh

when trying to init the roles as @ToryZhou suggested I'm presented with the following error:

######################################################################


Init Step 1/4 [Starting] -- Setting up admin user ( admin / admin )


######################################################################

Traceback (most recent call last):
  File "/usr/local/bin/superset", line 6, in <module>
    with open(__file__) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/bin/superset'

I am confirming @jessecbrown message, so to say the Docker image is currently useless.

Same issue

######################################################################


Init Step 1/4 [Starting] -- Setting up admin user ( admin / admin )


######################################################################

Traceback (most recent call last):
  File "/usr/local/bin/superset", line 6, in <module>
    with open(__file__) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/bin/superset'

I was having the same problem. I end up using their image: https://hub.docker.com/r/preset/superset/ with a custom extension as they point at the bottom of the page and it worked.

I also have this issue. Followed the steps at https://superset.apache.org/installation.html#start-with-docker, the default login of admin/admin does not work (Get: "Invalid login. Please try again").

All 4 containers appear to be running after running docker-compose up.

Environment:
Windows 10 (version 1909)
Docker 19.03.12

dos2unix docker-init.sh
This doesn't work in Powershell. Ran in Git Bash, in root folder (incubator-superset) - get "No such file or directory"

docker-compose exec superset bash /app/docker-init.sh
Get "the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'"

Is everyone here on Windows? I mean, is this a docker-on-windows-specific issue?

No same issue on Linux mint

Ubuntu.

Yep, I just ran a clean up and I'm seeing:

Traceback (most recent call last):
   File "/usr/local/bin/superset", line 6, in <module>
     with open(__file__) as f:
 FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/bin/superset'

I'll get a fix for this today :)

Traceback (most recent call last):
   File "/usr/local/bin/superset", line 6, in <module>
     with open(__file__) as f:
 FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/bin/superset'

I'm having this issue on macOS too. And this is after running dos2unix.

Also having this issue. (windows)

On running:
docker-compose up
and then
docker-compose exec superset bash /app/docker-init.sh

The command fails to create the admin user:

image

So back to the same can't login issue.

I just re-cloned the repo again but the issue is still there.

Please nuke your images and volumes:

# Nukes containers:
docker rm -f $(docker ps -aq | awk '{print $1}')

# Nukes images:
docker rmi -f $(docker images | awk '{print $3}') 

# Nukes volumes:
docker-compose down -v

# Re-Builds docker-compose:
docker-compose build

# Stand everything back up:
docker-compose up

Hope that helps!

Yes it did. Thank you!

BTW, i have the first two CMDs setup as aliases in my .zshrc as they're super useful.

@craig-rueda

This is still not working for me after nuking everything :(

I was really eager to test this promising tool. Do we have a workaround for it with docker ? Thanks !

After nuking everything and docker-compose up --build -d, there is still no admin/admin login.

val@val ~/dev/incubator-superset $ docker logs superset_init 

######################################################################


Init Step 1/4 [Starting] -- Setting up admin user ( admin / admin )


######################################################################

Traceback (most recent call last):
  File "/usr/local/bin/superset", line 6, in <module>
    with open(__file__) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/bin/superset'

The docker-init.sh still fails the same way.

val@val ~/dev/incubator-superset $ docker exec -it superset_app bash
superset@36445bfe7eae:/app$ cd /^C
superset@36445bfe7eae:/app$ ls
MANIFEST.in  README.md  apache_superset.egg-info  docker-init.sh  pythonpath  requirements  requirements-dev.txt  requirements-extra.txt  requirements.txt  setup.py  superset  superset-frontend  superset_home
superset@36445bfe7eae:/app$ ./docker-init.sh 

######################################################################


Init Step 1/4 [Starting] -- Setting up admin user ( admin / admin )


######################################################################

Traceback (most recent call last):
  File "/usr/local/bin/superset", line 6, in <module>
    with open(__file__) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/superset/bin/superset'


This is fixed in master. Please make sure you are up to date and have cleared all of your images, containers and volumes.

I just experienced this issue on windows after following the default instructions at https://superset.incubator.apache.org/installation.html by cloning the repo and running docker-compose, but with a different response.

In my case, introspection of the _superset_init_ image showed /usr/bin/env: ‘bash\r’: No such file or directory in the log.

I explicitly replaced windows line endings in docker/docker-init.sh and docker-compose.yaml, which seemed to resolve the issue for me. I used Edit>>EOL Conversion>>Unix (LF) in Notepad++

Related to #9037 and #7336

I just experienced this issue on ubuntu 18.04 starting from scratch. It looks like there's some kind of pyarrow dependency conflict in superset-init

Hi all, I successfully installed superset two weeks ago on ubuntu 18.04. I'm now running into this admin user/pw issue on subsequent installs from the docker-compose method, on multiple local machines - Windows 10 and ubuntu 16.04 and 18.04 all running python 3.6 or 3.7. I get this error during the build:

superset-build-fail

You can get to the login step but then the same error occurs. I've tried this on 4 different local machines today, two with the same specs as I have with the build that worked two weeks ago.

Also, it appears the reference requirements-local.txt file in Dockerfile-dev should be named requirements.txt, based on the requirements folder.

I just pushed a fix for this into master. Please pull the latest and try one more time.

Thanks for the quick response! This fixed for Ubuntu but still getting the Invalid login for windows after clean install. Perhaps a different issue.
image

This is still a thing, updated to the latest version, same error message Invalid log in. Please try again.
, docs still mention admin: admin for username and password. Did clear all containers, images, volumes, built it again, and still the same message. I've followed the steps mentioned here: https://superset.incubator.apache.org/docs/installation/installing-superset-using-docker-compose

I was able to make it work on Windows:

  1. Start superset, open a power shell - docker-compose up. Let it run on a separate window
  2. Open a git bash inside X:\whatever-path-in-your-pc\incubator-superset\docker
    2.1. Run dos2unix docker-init.sh - You will get a dos2unix: converting file docker-init.sh to Unix format... message
  3. Open a new Power shell terminal inside \incubator-superset. Run docker-compose exec superset bash /app/docker-init.sh

Hope this helps someone.

I have similar problem with the helm chart in K8s. One way to create user/or change password, is to log into the container and create admin user:

# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
$ export FLASK_APP=superset
flask fab create-admin

Of course this approach is not optimal as you have to do it manually and most importatntly after your container is recreated, the user is also lost if you are running the container in a stateless manner. The right way is to fix it in helm chart initialization.

Was this page helpful?
0 / 5 - 0 ratings