RamiAwar / dataline

Chat with your data - AI data analysis and visualization on CSV, Postgres, MySQL, Snowflake, SQLite...
https://dataline.app
GNU General Public License v3.0
502 stars 49 forks source link

What are the default login username and password? #249

Closed hcymysql closed 1 month ago

hcymysql commented 1 month ago

Privileged issue

Issue Content

微信截图_20240710143510

I cannot log into the system using the username 'admin' and the password 'admin'.

hcymysql commented 1 month ago

docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:latest

Unable to find image 'ramiawar/dataline:latest' locally latest: Pulling from ramiawar/dataline 1f7ce2fa46ab: Pull complete 442c5d63eafd: Pull complete c3aa3af0d581: Pull complete 4bfbe15b3e01: Pull complete 848d19a36773: Pull complete 685fce7be1ca: Pull complete cd385a75135c: Pull complete ce4de551e292: Pull complete 4f4fb700ef54: Pull complete fb4bc3901e33: Pull complete 6381c0f7edb1: Pull complete 9b879bd80f9a: Pull complete 365cc419f116: Pull complete cbd2bcff4834: Pull complete 35b76e258cd1: Pull complete fe2a683e1938: Pull complete 8228c1f6c683: Pull complete Digest: sha256:f15bfa0407d285d1c64d0c1354ac577535a93ece7630a34a25c4ab3ee2cfadd1 Status: Downloaded newer image for ramiawar/dataline:latest /home/dataline/backend/venv/lib/python3.11/site-packages/pydantic/_internal/fields.py:200: UserWarning: Field name "api key" in "ShouldGenerateChartCall" shadows an attribute in parent "OpenAIExtractor[ShouldGenerateChart]" warnings.warn( /home/dataline/backend/venv/lib/python3.11/site-packages/pydantic/_internal/fields.py:200: UserWarning: Field name "api key" in "GenerateChartCall" shadows an attribute in parent "OpenAIExtractor[GeneratedChart]" warnings.warn( INFO: Started server process [1] INFO: Waiting for application startup. INFO:alembic.runtime.migration:Context impl SQLiteImpl. INFO:alembic.runtime.migration:Will assume non-transactional DDL. INFO:alembic.runtime.migration:Running upgrade -> 1fcab2512ee2, initial migration (not) INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:7377 (Press CTRL+C to quit) INFO: 192.168.137.1:49607 - "GET / HTTP/1.1" 200 OK INFO: 192.168.137.1:49608 - "GET /index-cabed3bb.js HTTP/1.1" 200 OK INFO: 192.168.137.1:49607 - "GET /index-b9ce8d57.css HTTP/1.1" 200 OK INFO: 192.168.137.1:49608 - "GET /favicon.ico HTTP/1.1" 200 OK INFO: 192.168.137.1:49649 - "GET /logo_rounded_sm-aa2c9033.png HTTP/1.1" 200 OK INFO: 192.168.137.1:50095 - "GET /login HTTP/1.1" 200 OK INFO: 192.168.137.1:50096 - "GET /index-cabed3bb.js HTTP/1.1" 200 OK INFO: 192.168.137.1:50095 - "GET /index-b9ce8d57.css HTTP/1.1" 200 OK INFO: 192.168.137.1:50096 - "GET /logo_rounded_sm-aa2c9033.png HTTP/1.1" 200 OK INFO: 192.168.137.1:50096 - "GET /favicon.ico HTTP/1.1" 200 OK

RamiAwar commented 1 month ago

Oh I think the latest bug fix didn't get deployed to docker. Try this again now by re-pulling latest (v1.0.9)! Auth should not be enabled by default.

docker rm dataline
docker pull ramiawar/dataline:latest
docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:latest

Does this fix it?

warrenwangxd commented 1 month ago

Oh I think the latest bug fix didn't get deployed to docker. Try this again now by re-pulling latest (v1.0.9)! Auth should not be enabled by default.

docker rm dataline
docker pull ramiawar/dataline:latest
docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:latest

Does this fix it?

not fixed

RamiAwar commented 1 month ago

Will look into it. As a workaround, try running it with authentication please:

docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline -e AUTH_USERNAME=admin -e AUTH_PASSWORD=admin ramiawar/dataline:latest

Hopefully this fixes things temporarily. Sorry about this, not sure what introduced this bug!

@warrenwangxd @hcymysql

anthony2261 commented 1 month ago

Was not able to replicate, latest image is working fine for me. @warrenwangxd could you please try running the image with a specific tag instead of latest? This is to make sure that you are indeed pulling the latest image, I think the issue is that you're unable to pull the latest latest for some reason

docker rm dataline
docker pull ramiawar/dataline:v1.0.9
docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:v1.0.9

Also make sure to refresh the page on the browser, just in case you still have the old javascript loaded

hcymysql commented 1 month ago
docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline -e AUTH_USERNAME=admin -e AUTH_PASSWORD=admin ramiawar/dataline:latest

WARNING: The requested image's platform (linux/arm64/v8) does not match the detected hos t platform (linux/amd64/v3) and no specific platform was requested

Your CPU device is too powerful; could you please consider the environment of impoverished gamers? It would be best if it could be compatible with linux/amd64/v2.

image

anthony2261 commented 1 month ago

@hcymysql I see, for the time being can you try the :main tag? It contains both linux/arm64 and linux/amd64

docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:main

(You may add the authentication variables if you want)

This should work, but in case it doesn't, can you share what OS you're running? And any other details you can think of that might be relevant

hcymysql commented 1 month ago

I ran the following Docker commands, and both seem to execute normally:

docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline ramiawar/dataline:main docker run -p 7377:7377 -v dataline:/home/.dataline --name dataline -e AUTH_USERNAME=admin -e AUTH_PASSWORD=admin ramiawar/dataline:main

However, I'm unable to log in. It says the username and password are incorrect. When I try to log in with the password "admin", it fails.

https://github.com/RamiAwar/dataline/assets/19261879/0502b876-35f6-4fd4-8f62-6c974b752a68

anthony2261 commented 1 month ago

I see the issue now, you're running it on what seems like an SSH Client, with a custom IP and everything. Let me look into it a bit further, but in the time being, you can try adding this env variable to the command -e ALLOWED_ORIGINS=<server-ip-address>:7377

RamiAwar commented 1 month ago

Just to confirm the above ^ which sounds logical, can you try logging in with your developer tools networks tab open. You should see a /settings route there and it should show a CORS issue.

That should explain why this isn't working even in the base case (without auth). If the URL was localhost, it would work I think.

lee1221ee commented 1 month ago

Authorization required

http://0.0.0.0:7377

No authorization required

http://localhost:7377
warrenwangxd commented 1 month ago

Authorization required

http://0.0.0.0:7377

No authorization required

http://localhost:7377

it works with http://localhost:7377

bjfk2006 commented 1 month ago

Is there any solution to this problem? docker image startup cannot be logged in

RamiAwar commented 1 month ago

Yes so this is a CORS issue. It's a way to keep your cookies protected from abuse when you have auth enabled.

So either: 1- Follow the authentication section in the README to add your IPs to the allowed origins env var (ex. 0.0.0.0)

Basically you just have to add this env var with this additional origin when you run the docker container.

or 2- Just use the app from localhost 😁

We will look into making this easier, as in if auth is disabled no one should have to think about allowed origins. But for now these workarounds should solve it.

Please let us know if this solves it for you so we can mark as resolved!

anthony2261 commented 1 month ago

We just added more docs for you 🙂 Check this section for an example

hcymysql commented 1 month ago

thanks