ricochhet/Erupe-Legacy

There was an error when I logged in

YunLuoyuu opened this issue · 9 comments

It would really help me out if you could post a log of the server-side, so I can see what happened. After you started the server with go run . the server will start logging in the powershell or cmd-window. Please replicate the error and post the log output, so I can help you out, thanks.

It would really help me out if you could post a log of the server-side, so I can see what happened. After you started the server with go run . the server will start logging in the powershell or cmd-window. Please replicate the error and post the log output, so I can help you out, thanks.
QQ截图20220129165645

I can't exactly pinpoint what is wrong, just that something with the database seems amiss. Did you create the database as instructed? I guess yes since the server is working somewhat.

may I ask which locale you are using? From the timezone my guess would be japanese, which should normally work fine.

Can you tell what comes after Got error on SQL query in those brakets. I cant read the japanese symbols ^^"
For future refrence if you have an error in powershell it is pretty handy to copy the code.

To do that just select some text with your mouse and right click. Then paste into a notepad and post here ^^

I can't exactly pinpoint what is wrong, just that something with the database seems amiss. Did you create the database as instructed? I guess yes since the server is working somewhat.

may I ask which locale you are using? From the timezone my guess would be japanese, which should normally work fine.

Can you tell what comes after Got error on SQL query in those brakets. I cant read the japanese symbols ^^" For future refrence if you have an error in powershell it is pretty handy to copy the code.

To do that just select some text with your mouse and right click. Then paste into a notepad and post here ^^

192.168.1.1 - - [29/Jan/2022:17:16:23 +0800] "GET /serverlist.xml HTTP/1.0" 200 113
2022-01-29T17:16:42.782+0800 INFO main.sign signserver/sign_server.go:93 Got connection to sign server {"remoteaddr": "192.168.1.1:8056"}
2022-01-29T17:16:42.863+0800 INFO main.sign signserver/session.go:81 Got sign in request {"reqUsername": "ylyloren", "reqPassword": "ZHC1zhanghaochen", "reqUnk": ""}
2022-01-29T17:16:42.865+0800 WARN main.sign signserver/session.go:122 Got error on SQL query {"error": "pq: 关系 "users" 不存在"}
github.com/Andoryuuta/Erupe/server/signserver.(*Session).handleDSGNRequest
C:/Erupe-master/Erupe-master/server/signserver/session.go:122
github.com/Andoryuuta/Erupe/server/signserver.(*Session).handlePacket
C:/Erupe-master/Erupe-master/server/signserver/session.go:57
github.com/Andoryuuta/Erupe/server/signserver.(*Session).work
C:/Erupe-master/Erupe-master/server/signserver/session.go:40
github.com/Andoryuuta/Erupe/server/signserver.(*Server).handleConnection
C:/Erupe-master/Erupe-master/server/signserver/sign_server.go:118

asking deepl for some help it says: "error": "pq: relationship "users" does not exist" which is likely that there is something wrong with the database itself. My guess here would be that you maybe forgot to migrate the database as described In this Step here

My tip would be really to delete the database and do step 4 again: https://github.com/ricochhet/Erupe/blob/master/docs/Windows-Server-Install.md#phase-3-run-the-migrations-in-the-erupe-server-files-to-create-the-database-tables

asking deepl for some help it says: "error": "pq: relationship "users" does not exist" which is likely that there is something wrong with the database itself. My guess here would be that you maybe forgot to migrate the database as described In this Step here

My tip would be really to delete the database and do step 4 again: https://github.com/ricochhet/Erupe/blob/master/docs/Windows-Server-Install.md#phase-3-run-the-migrations-in-the-erupe-server-files-to-create-the-database-tables

This text is displayed after I run the program "migrate -database postgres://postgres:password@localhost:5432/erupe?sslmode=disable -path migrations up."

Usage: migrate OPTIONS COMMAND [arg...]
migrate [ -version | -help ]

Options:
-source Location of the migrations (driver://url)
-path Shorthand for -source=file://path
-database Run migrations against this database (driver://url)
-prefetch N Number of migrations to load in advance before executing (default 10)
-lock-timeout N Allow N seconds to acquire database lock (default 15)
-verbose Print verbose logging
-version Print version
-help Print usage

Commands:
create [-ext E] [-dir D] [-seq] [-digits N] [-format] [-tz] NAME
Create a set of timestamped up/down migrations titled NAME, in directory D with extension E.
Use -seq option to generate sequential up/down migrations with N digits.
Use -format option to specify a Go time format string. Note: migrations with the same time cause "duplicate migration version" error.
Use -tz option to specify the timezone that will be used when generating non-sequential migrations (defaults: UTC).

goto V Migrate to version V
up [N] Apply all or N up migrations
down [N] [-all] Apply all or N down migrations
Use -all to apply all down migrations
drop [-f] Drop everything inside database
Use -f to bypass confirmation
force V Set version V but don't run migration (ignores dirty state)
version Print current migration version

Source drivers: github-ee, godoc-vfs, s3, bitbucket, github, gitlab, go-bindata, gcs, file
Database drivers: firebirdsql, mysql, pgx, stub, cassandra, mongodb, neo4j, postgresql, redshift, cockroach, firebird, mongodb+srv, postgres, spanner, cockroachdb, crdb-postgres, sqlserver, clickhouse

Is this correct?

This text is displayed after I run the program "migrate -database postgres://postgres:password@localhost:5432/erupe?sslmode=disable -path migrations up."

Two things:

  1. make sure that the command is run in the folder where the Erupe Server is located
  2. Make sure that the password in the command matches the postgres-user password which you created while installing postgres.

When the migrations were done succesfully you should be able to log in after starting the server. If you have anything else let me know

This text is displayed after I run the program "migrate -database postgres://postgres:password@localhost:5432/erupe?sslmode=disable -path migrations up."

Two things:

  1. make sure that the command is run in the folder where the Erupe Server is located
  2. Make sure that the password in the command matches the postgres-user password which you created while installing postgres.

When the migrations were done succesfully you should be able to log in after starting the server. If you have anything else let me know

Think you,I can logging now,but the quest load screens so long.

Think you,I can logging now,but the quest load screens so long.

Check #7 for more info. Since this problem is solved I will close this issue.