Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 27 04:14

    hsluoyz on master

    Remove wrong desc meta. (compare)

  • May 22 14:37

    hsluoyz on master

    Add Time2String(). (compare)

  • May 22 14:37

    hsluoyz on master

    Add Time2String(). (compare)

  • May 22 14:21

    hsluoyz on master

    Fix missing topic and reply fie… (compare)

  • May 22 13:13

    hsluoyz on master

    Fix bug in gitterApiToken. (compare)

  • May 22 12:19
    casbin-bot labeled #519
  • May 22 12:19
    casbin-bot commented #519
  • May 22 12:19

    github-actions[bot] on v1.3.0

    (compare)

  • May 22 12:16

    hsluoyz on master

    feat: sync gitter room to node … (compare)

  • May 22 12:16
    hsluoyz closed #519
  • May 22 12:16
    hsluoyz closed #438
  • May 22 09:32
    casbin-bot labeled #517
  • May 22 09:32
    casbin-bot commented #517
  • May 22 09:31

    github-actions[bot] on v1.2.6

    (compare)

  • May 22 09:28

    hsluoyz on master

    fix: the 404 page in the footer… (compare)

  • May 22 09:28
    hsluoyz closed #517
  • May 22 09:27
    hsluoyz synchronize #517
  • May 22 09:25
    hsluoyz synchronize #517
  • May 22 09:24
    hsluoyz synchronize #517
  • May 22 09:22
    hsluoyz synchronize #517
Yang Luo
@hsluoyz
Welcome to Casnode chat room!
Maple
@bifenglin
i wnna that how to init databases
the doc doesn't mention it
Yang Luo
@hsluoyz
@bifenglin DB inits by itself
just provide an empty DB and it will handle all for you
Maple
@bifenglin
image.png
but when i use ·docker-compose up· command.it shows doesn't have table
Nekotoxin
@Nekotoxin
drop the databases of casdoor and casnode->create casdoor database->run the casdoor->run the casnode,have a try
@bifenglin
Maple
@bifenglin
thx,but i have tryed some times,and i use a remote mysql database not loacal databse,is that the reason?
the log shows Table 'casdoor.user' doesn't exist
and the database is new.doesn't have any data
Nekotoxin
@Nekotoxin
does your casdoor run well?
check the tables of casdoor database after running casdoor to see if it was inited successfully
@bifenglin
Maple
@bifenglin
i run the command docker-compose upas the doc says
OK i'm trying to have go environment and run it use go command
Nekotoxin
@Nekotoxin
图片.png
wrong after this step?
Maple
@bifenglin
the datasource i use is a remote database
so i have to modify the localhost to db?
Nekotoxin
@Nekotoxin
yes,db should be the ip of your remote database
Maple
@bifenglin
[root@openinsight-host Casnode]# docker-compose up
Starting casnode_db_1 ... done
Starting casnode_casnode_1 ... done
Attaching to casnode_db_1, casnode_casnode_1
casnode_1  | wait-for-it: waiting 15 seconds for db:3306
db_1       | 2022-03-14 05:36:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.25-1debian10 started.
db_1       | 2022-03-14 05:36:00+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1       | 2022-03-14 05:36:00+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.25-1debian10 started.
db_1       | 2022-03-14T05:36:01.049587Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25) starting as process 1
db_1       | 2022-03-14T05:36:01.056651Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
db_1       | 2022-03-14T05:36:01.206902Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
db_1       | 2022-03-14T05:36:01.268206Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
db_1       | 2022-03-14T05:36:01.346338Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1       | 2022-03-14T05:36:01.346449Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
db_1       | 2022-03-14T05:36:01.348792Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1       | 2022-03-14T05:36:01.360701Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.25'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
casnode_1  | wait-for-it: db:3306 is available after 1 seconds
casnode_1  | 2022/03/14 05:36:02 载入sego词典 ./dictionary/dictionary.txt
casnode_1  | 2022/03/14 05:36:03 sego词典载入完毕
casnode_1  | panic: Error 1146: Table 'casdoor.user' doesn't exist
casnode_1  | 
casnode_1  | goroutine 1 [running]:
casnode_1  | github.com/casbin/casnode/casdoor.getOnlineUserCount()
casnode_1  |    /go/src/casnode/casdoor/user_adapter.go:81 +0x113
casnode_1  | github.com/casbin/casnode/casdoor.GetOnlineUserCount()
casnode_1  |    /go/src/casnode/casdoor/user.go:60 +0x25
casnode_1  | github.com/casbin/casnode/object.GetOnlineUserCount(...)
casnode_1  |    /go/src/casnode/object/member.go:130
casnode_1  | github.com/casbin/casnode/object.UpdateOnlineMemberNum()
casnode_1  |    /go/src/casnode/object/basic.go:231 +0x19
casnode_1  | github.com/casbin/casnode/object.InitForumBasicInfo()
casnode_1  |    /go/src/casnode/object/basic.go:39 +0x2a
casnode_1  | main.main()
casnode_1  |    /go/src/casnode/main.go:34 +0x6a
casnode_casnode_1 exited with code 2
this is the full log
as the log says . the db is avilable
but the table doesn't exist
and the database has created
Nekotoxin
@Nekotoxin
run your casdoor first
the casdoor app will init the casdoordatabase
Maple
@bifenglin
OK so the first step is that have a go mod...it can not run in docker-compose . is that right?
Yang Luo
@hsluoyz
@bifenglin can you create a github issue?
1 reply
So we can fix this bug
Maple
@bifenglin
OK. thx!
Maple
@bifenglin
so,now i have to wait for fix?
Yang Luo
@hsluoyz
@Nekotoxin plz resolve it