apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.72k stars 13.49k forks source link

Default credential not working #10149

Closed SwapnilKhante closed 4 years ago

SwapnilKhante commented 4 years ago

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

issue-label-bot[bot] commented 4 years ago

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.

SwapnilKhante commented 4 years ago

image

SwapnilKhante commented 4 years ago

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

scook12 commented 4 years ago

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

SwapnilKhante commented 4 years ago

@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.

scook12 commented 4 years ago

Got it, thanks @SwapnilKhante!

simondmorias commented 4 years ago

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.

SwapnilKhante commented 4 years ago

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

edurojasr commented 4 years ago

Hi all

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

Thanks @SwapnilKhante!!

DanielGeffers commented 4 years ago

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

DanielGeffers commented 4 years ago

@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.

ToryZhou commented 4 years ago

To init the user and roles

sudo docker-compose exec superset bash /app/docker-init.sh
jessecbrown commented 4 years ago

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'
Chardonneaur commented 4 years ago

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

idkw commented 4 years ago

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'
cande1gut commented 4 years ago

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.

nathan-protempo commented 4 years ago

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'"

mistercrunch commented 4 years ago

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

idkw commented 4 years ago

No same issue on Linux mint

Chardonneaur commented 4 years ago

Ubuntu.

craig-rueda commented 4 years ago

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 :)

PhucNgo1711 commented 4 years ago
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.

alittlesliceoftom commented 4 years ago

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.

PhucNgo1711 commented 4 years ago

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

craig-rueda commented 4 years ago

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!

PhucNgo1711 commented 4 years ago

Yes it did. Thank you!

craig-rueda commented 4 years ago

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

idkw commented 4 years ago

@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'
craig-rueda commented 4 years ago

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

zacharlie commented 4 years ago

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

jgreene commented 4 years ago

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

devinrkeane commented 4 years ago

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.

craig-rueda commented 4 years ago

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

devinrkeane commented 4 years ago

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

Imperious2000 commented 3 years ago

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.

mirwaisx commented 3 years ago

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.

chance2021 commented 3 years ago

Hi, looks like the issue is fixed in master branch. Please git checkout master (don't checkout latest as per official document) and re-build again. You should be able to login as admin/admin. Thanks

eduardev commented 2 years ago

It's 2022 and:

¯\_(ツ)_/¯
mkhudia commented 2 years ago

It's half past 2022 and:

craig-rueda commented 2 years ago

Hey guys, I just tried these steps:

  1. pull latest master
  2. cd into repo
  3. run docker compose up
  4. wait...
  5. Login to http://localhost:8080 using admin/admin
  6. SUCESS :)

What steps / output are you seeing?

mkhudia commented 2 years ago

@craig-rueda thanks for the swift reply. sharing the steps I am trying on my machine.

craig-rueda commented 2 years ago

Ah, steps are different :).

Pls try the ones I outlined. We don't ship any default creds with the base image. The docker-compose stack includes an "init" container that does a bunch of setup (including the creation of the admin user)

mpvoss commented 1 year ago

Hello @craig-rueda , I think a recent merge created multiple heads for alembic, a head merge might be needed. Below is output from the init container after following your steps above. Should I open a new issue for this?

Unknown Operation!!!

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

Init Step 1/4 [Starting] -- Applying DB migrations

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

logging was configured successfully
2023-07-27 17:07:24,421:INFO:superset.utils.logging_configurator:logging was configured successfully
2023-07-27 17:07:24,425:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
ERROR [flask_migrate] Error: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all heads
Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
lucasrueda commented 1 year ago

Workaround: Run steps described in docker-init.sh Resume without loading tests:

ADMIN_PASSWORD="admin"
superset db upgrade
superset fab create-admin \
              --username admin \
              --firstname Superset \
              --lastname Admin \
              --email admin@superset.com \
              --password $ADMIN_PASSWORD
superset init
superset load_examples --force
KonstantinOsipov commented 1 year ago

Hey guys, I just tried these steps:

  1. pull latest master
  2. cd into repo
  3. run docker compose up
  4. wait...
  5. Login to http://localhost:8080 using admin/admin
  6. SUCESS :)

What steps / output are you seeing?

What VPS configuration will be sufficient to run Superset?

yurishkuro commented 11 months ago

I was able to bypass the invalid credentials error by running docker-compose run superset-init, which seems to initialize the account. But that script fails with a different error in the end, and the frontend goes from the login page to a broken /welcome page. I'm giving up at this point.

willie-hung commented 10 months ago

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!

I encountered the issue during the initial setup. After deleting the containers, images, and volumes, everything started working as expected. Btw I'm using linux/amd64.

Captain404 commented 8 months ago

What a useless app...all that effort to install and the default creds dont work. I tried a all the methods here but still no go. Also giving up and will maybe come back when it actually works.

DutchyOven commented 6 months ago

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!

This is my fault but WARNING! In case you are newish to docker or just not used to these kinds of commands these commands will nuke all your containers and images, not just superset. Just erased all containers running on my server, not fun.

aibunny commented 6 months ago

Also facing similar issue my instance was working but now I used the same image to build a separate instance and I can't log in @betodealmeida , Kindly help same issue as above on superset 3.1.1 and 3.1.0