Giter Site home page Giter Site logo

Comments (10)

SchinkTasia avatar SchinkTasia commented on July 17, 2024 1

Update
I tried the docker container on a different laptop with an OpenSuse Tumbleweed OS.
On this plattform everythings works fine, but sadly i cant use it, because the CPU and GPU are not powerfull enough.
And i cant change the OS of my current Windows 10 Computer.

from khoj.

IMJONEZZ avatar IMJONEZZ commented on July 17, 2024 1

I am also getting CSRF verification failures with self-hosted on Firefox on Ubuntu. It's the exact same 403, and I've checked and it seems the site doesn't ever set a cookie, even with all security turned off. Would love a fix to actually make this usable.

from khoj.

debanjum avatar debanjum commented on July 17, 2024

Can you check if you can access the admin panel from localhost:42110 address instead?

from khoj.

SchinkTasia avatar SchinkTasia commented on July 17, 2024

Can you check if you can access the admin panel from localhost:42110 address instead?

Hey,
I Guess i tried that and it doesnt changed much. I will try that again today. Just to be Sure.

from khoj.

sabaimran avatar sabaimran commented on July 17, 2024

Hey @SchinkTasia , do you mind sharing the docker-compose.yml you're using? And let me know what happens when you try accessing from http://localhost:42110.

I made a small update here to the docker compose that would be worth trying: 6d10f98

from khoj.

SchinkTasia avatar SchinkTasia commented on July 17, 2024

Hey @SchinkTasia , do you mind sharing the docker-compose.yml you're using? And let me know what happens when you try accessing from http://localhost:42110.

I made a small update here to the docker compose that would be worth trying: 6d10f98

Hi,
So i tried to connect via localhost. (in this example i keeped the settings like in the original docker-compose, just to check the functionality. I will definitiv change the user and secret) But i only get a "Please enter the correct username and password".
image

When i connect over 192.168.1.4 i got the following:
image

Following my docker-compose.yml (like i said, when i can login, i will change the login data. but even when i change it, it will be no difference at the moment.)

version: "3.9"
services:
database:
image: ankane/pgvector
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- khoj_db:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 5
server:
depends_on:
database:
condition: service_healthy
ports:
- "42110:42110"
working_dir: /app
volumes:
- khoj_config:/root/.khoj/
- khoj_models:/root/.cache/torch/sentence_transformers
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
- KHOJ_NO_HTTPS="True"
- KHOJ_DOMAIN=192.168.1.4
- KHOJ_DJANGO_SECRET_KEY=secret
- KHOJ_DEBUG=True
- KHOJ_ADMIN_EMAIL=[email protected]
- KHOJ_ADMIN_PASSWORD=Password
command: --host="0.0.0.0" --port=42110 -vv --anonymous-mode

volumes:
khoj_config:
khoj_db:
khoj_models:

When you need something else, just tell me.

Update
I cant reproduce the error. Now i got eacht time i try to connect (with 127.0.0.1, localhost and 192.168.1.4) i got the "Please enter the correct username and password for a staff account. Note that both fields may be case-sensitive."-Message. I tried to delete both docker containers and create them from scratch and changing the credentials. Nothing works.

Console Output from khoji server:

[01:28:48.586914] INFO uvicorn.access: httptools_impl.py:437
2024-06-02 03:28:48 172.25.0.1:40942 - "POST
2024-06-02 03:28:48 /server/admin/login/?next=/serv
2024-06-02 03:28:48 er/admin/ HTTP/1.1" 200

And yeah, i got the normal frontend:
image

from khoj.

debanjum avatar debanjum commented on July 17, 2024

There seem to be multiple different issues being discussed here.

  1. CSRF verification error: This seems to have resolved when @SchinkTasia used localhost:42110 after Saba's fix in 6d10f98
  2. Django admin username, password are showing up as invalid. @SchinkTasia this is only happening on a Windows 10 machine (and not OpenSuse) for you?

@IMJONEZZ, are you hitting 1. or 2. (or both!)? And is this happening even after you try with localhost:42110 instead of 127.0.0.1:421100?

from khoj.

IMJONEZZ avatar IMJONEZZ commented on July 17, 2024

from khoj.

mingLvft avatar mingLvft commented on July 17, 2024

mee to

from khoj.

satisl avatar satisl commented on July 17, 2024

same csrf error

from khoj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.