Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default credential not working #10149

Closed
SwapnilKhante opened this issue Jun 24, 2020 · 52 comments · Fixed by #10550
Closed

Default credential not working #10149

SwapnilKhante opened this issue Jun 24, 2020 · 52 comments · Fixed by #10550
Assignees
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@SwapnilKhante
Copy link

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

@SwapnilKhante SwapnilKhante added the !deprecated-label:bug Deprecated label - Use #bug instead label Jun 24, 2020
@issue-label-bot
Copy link

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

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

@SwapnilKhante
Copy link
Author

image

@SwapnilKhante
Copy link
Author

Its similar issue as
#7336, but none of the solution mentioned worked.

@scook12
Copy link

scook12 commented Jun 24, 2020

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

@SwapnilKhante
Copy link
Author

@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
Copy link

scook12 commented Jun 24, 2020

Got it, thanks @SwapnilKhante!

@simondmorias
Copy link

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 SwapnilKhante reopened this Jun 28, 2020
@SwapnilKhante
Copy link
Author

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

@edurojasr
Copy link

Hi all

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

Thanks @SwapnilKhante!!

@DanielGeffers
Copy link

DanielGeffers commented Jul 9, 2020

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
Copy link

@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
Copy link

ToryZhou commented Jul 28, 2020

To init the user and roles

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

@jessecbrown
Copy link

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
Copy link

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

@idkw
Copy link

idkw commented Aug 5, 2020

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
Copy link

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
Copy link

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
Copy link
Member

mistercrunch commented Aug 7, 2020

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

@idkw
Copy link

idkw commented Aug 7, 2020

No same issue on Linux mint

@Chardonneaur
Copy link

Ubuntu.

@craig-rueda
Copy link
Member

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
Copy link

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
Copy link

alittlesliceoftom commented Aug 7, 2020

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.

@idkw
Copy link

idkw commented Aug 24, 2020

@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
Copy link
Member

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

@zacharlie
Copy link

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

@jgreene
Copy link

jgreene commented Sep 2, 2020

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
Copy link

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
Copy link
Member

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

@devinrkeane
Copy link

devinrkeane commented Sep 3, 2020

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
Copy link

Imperious2000 commented Sep 14, 2020

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
Copy link

mirwaisx commented Sep 15, 2020

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
Copy link

chance2021 commented Mar 11, 2021

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
Copy link

eduardev commented Jul 7, 2022

It's 2022 and:

  • bug still exists
  • issue still closed
¯\_(ツ)_/¯

@mkhudia
Copy link

mkhudia commented Jul 15, 2022

It's half past 2022 and:

  • Documented username and password admin admin don't work
  • Even though superset gets set up locally but is unable to log in doesn't allow further developing on this.
  • the issue is still closed

@craig-rueda
Copy link
Member

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
Copy link

mkhudia commented Jul 16, 2022

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

  • docker pull apache/superset:latest
  • docker run -it -p 8088:8088 --name oli-superset
  • navigate to http://localhost:8088 for superset login
  • trying to login with username: admin password: admin
  • Invalid login

@craig-rueda
Copy link
Member

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
Copy link

mpvoss commented Jul 27, 2023

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
Copy link

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
Copy link

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
Copy link

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
Copy link
Contributor

willie-hung commented Oct 26, 2023

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
Copy link

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
Copy link

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
Copy link

aibunny commented Feb 29, 2024

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

@Carmageddon
Copy link

This issue should be reopened, I've just run into the same issue with the latest Docker installed on Mac M2.
This is the first time using Superset, I will try removing related images etc, but I have to be careful I have other stuff including mounted volumes that i need to keep running, specifically Clickhouse right now with test data that I've loaded.

@mistercrunch
Copy link
Member

mistercrunch commented Apr 17, 2024

I've just run into the same issue with the latest Docker installed on Mac

@Carmageddon how did you install? docker-compose is best for development or test-driving, and will create a default admin/admin account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

Successfully merging a pull request may close this issue.