GithubHelp home page GithubHelp logo

Comments (12)

casbin-bot avatar casbin-bot commented on July 18, 2024

@tangyang9464 @JalinWang @imp2002

from casdoor.

hsluoyz avatar hsluoyz commented on July 18, 2024

@ladung what did you do to see this? Reproduce steps?

from casdoor.

ladung avatar ladung commented on July 18, 2024

@ladung what did you do to see this? Reproduce steps?
@hsluoyz

  1. I start casdoor via docker-compose by command: docker-compose up -d. Login to casdoor in web, show session on tab session
  2. I remove casdoor by run docker-compose down
  3. recreate casdoor by command : docker-compose up -d

My compose file:

version: "3"
services:
  casdoor:
    restart: always
    image: $CASDOOR_IMAGE_TAG
    entrypoint: /bin/sh -c './server --createDatabase=true'
    container_name: casdoor
    environment:
      RUNNING_IN_DOCKER: "true"
      DOMAIN: ${DOMAIN}
    ports:
     - "8080:8080"
    volumes:
      - ./app.conf:/conf/app.conf
      - ./init_data.json:/init_data.json
    networks:
      - backend 
    depends_on:
      postgres:
        condition: service_healthy

  redis:
    image: redis:7.2-alpine
    restart: always
    command: redis-server --maxmemory-policy allkeys-lru --maxmemory 200mb
    networks:
      backend:

  postgres:
    image: ${POSTGRES_IMAGE_TAG}
    volumes:
      - ./data/idp/idp-postgres:/var/lib/postgresql/data
      - ./bin/pg_multiple_databases:/docker-entrypoint-initdb.d
    environment:
      #POSTGRES_DB: ${POSTGRES_DB}
      POSTGRES_MULTIPLE_DATABASES: ${POSTGRES_DB}
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    networks:
      - backend
    healthcheck:
      test: [ "CMD", "pg_isready", "-q", "-d", "${POSTGRES_DB}", "-U", "${POSTGRES_USER}" ]
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 60s
    restart: always
    ports:
      - "5433:5432"

from casdoor.

hsluoyz avatar hsluoyz commented on July 18, 2024

@ladung it seems like a Docker container permission issue. Not a Casdoor issue

from casdoor.

ladung avatar ladung commented on July 18, 2024

@ladung it seems like a Docker container permission issue. Not a Casdoor issue

@hsluoyz
I use casdoor version 1.610.0

I double check it when recreate. I saw sessionId was not delete in DB tables. When create user from init_data.json, casdoor require delete sessionid as follow:
https://github.com/casdoor/casdoor/blob/master/object/user.go#L922

If you restart through cmd docker-compose restart, you still have same error!

from casdoor.

ladung avatar ladung commented on July 18, 2024

@hsluoyz
And when I delete sessionId in database table session, it's will be work fine!
image

from casdoor.

ladung avatar ladung commented on July 18, 2024

@hsluoyz here is my video
https://drive.google.com/file/d/1vArYh7IwCuzCPkkAYvhUpGzw2c4D4Phs/view?usp=drive_link

from casdoor.

ladung avatar ladung commented on July 18, 2024

@hsluoyz Please see issue soon!

from casdoor.

ladung avatar ladung commented on July 18, 2024

hi @hsluoyz
Have you seen that?

from casdoor.

dacongda avatar dacongda commented on July 18, 2024

sorry about that, we will solve this as soon as possible

from casdoor.

dacongda avatar dacongda commented on July 18, 2024

hi @hsluoyz Have you seen that?

btw, if you enable init data with init_data.json , it will execute when you restart / recreate the casdoor, plz make sure you disable it when you don't need it

from casdoor.

casbin-bot avatar casbin-bot commented on July 18, 2024

πŸŽ‰ This issue has been resolved in version 1.611.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

from casdoor.

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.