Grasscutters / Grasscutter

A server software reimplementation for a certain anime game.
https://grasscutter.io/
GNU Affero General Public License v3.0
16.18k stars 4.47k forks source link

Can't Create Account #171

Closed luckykeeper closed 2 years ago

luckykeeper commented 2 years ago

CentOS 7.9 jdk8u202 Mongodb 4.4.14-rc0 I think server already started normally

[root@YSServer GenshinImpact]# java -jar grasscutter.jar [10:59:14] [INFO] Starting Grasscutter... [10:59:14] [INFO] Loaded 300 AvatarTalentDatas. [10:59:14] [INFO] Loaded 400 AvatarSkillDatas. [10:59:14] [INFO] Loaded 3794 FetterDatas. [10:59:14] [INFO] Loaded 73 AvatarSkillDepotDatas. [10:59:14] [INFO] Loaded 167 MonsterDescribeDatas. [10:59:14] [INFO] Loaded 1 AvatarCostumeDatas. [10:59:14] [INFO] Loaded 3032 NpcDatas. [10:59:14] [INFO] Loaded 66 ReliquaryMainPropDatas. [10:59:14] [INFO] Loaded 200 MonsterCurveDatas. [10:59:14] [INFO] Loaded 717 SceneDatas. [10:59:14] [INFO] Loaded 90 AvatarLevelDatas. [10:59:14] [INFO] Loaded 6889 ItemDatas. [10:59:14] [INFO] Loaded 336 AvatarPromoteDatas. [10:59:14] [INFO] Loaded 335 ReliquaryAffixDatas. [10:59:14] [INFO] Loaded 90 WeaponLevelDatas. [10:59:14] [INFO] Loaded 939 WeaponPromoteDatas. [10:59:14] [INFO] Loaded 9 AvatarFlycloakDatas. [10:59:14] [INFO] Loaded 6626 GadgetDatas. [10:59:14] [INFO] Loaded 100 AvatarCurveDatas. [10:59:14] [INFO] Loaded 42 ReliquarySetDatas. [10:59:14] [INFO] Loaded 100 WeaponCurveDatas. [10:59:14] [INFO] Loaded 744 EquipAffixDatas. [10:59:14] [INFO] Loaded 60 PlayerLevelDatas. [10:59:14] [INFO] Loaded 101 ReliquaryLevelDatas. [10:59:14] [INFO] Loaded 2420 ProudSkillDatas. [10:59:14] [INFO] Loaded 568 MonsterDatas. [10:59:14] [INFO] Loaded 78 AvatarDatas. [10:59:15] [INFO] Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'} [10:59:15] [INFO] Opened connection [connectionId{localValue:1, serverValue:27}] to localhost:27017 [10:59:15] [INFO] Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=33997742} [10:59:15] [INFO] Opened connection [connectionId{localValue:2, serverValue:26}] to localhost:27017 [10:59:15] [INFO] Opened connection [connectionId{localValue:3, serverValue:28}] to localhost:27017 [10:59:16] [INFO] [Dispatch] Dispatch server started on port 443 [10:59:16] [INFO] Registered 86 PacketHandlers [10:59:16] [INFO] Banners successfully loaded. [10:59:16] [INFO] Game Server started on port 22102 [11:02:55] [INFO] [Dispatch] Client 192.168.180.9/192.168.180.9:54283 request: query_region_list

and here is my config.json

cat /opt/GenshinImpact/config.json { "DatabaseUrl": "mongodb://localhost:27017", "DatabaseCollection": "grasscutter", "RESOURCE_FOLDER": "./resources/", "DATA_FOLDER": "./data/", "PACKETS_FOLDER": "./packets/", "DUMPS_FOLDER": "./dumps/", "KEY_FOLDER": "./keys/", "RunMode": "HYBRID", "GameServer": { "Name": "Test", "Ip": "0.0.0.0", "PublicIp": "192.168.208.25", "Port": 22102, "DispatchServerDatabaseUrl": "mongodb://localhost:27017", "DispatchServerDatabaseCollection": "grasscutter", "LOG_PACKETS": false, "InventoryLimitWeapon": 2000, "InventoryLimitRelic": 2000, "InventoryLimitMaterial": 2000, "InventoryLimitFurniture": 2000, "InventoryLimitAll": 30000, "MaxAvatarsInTeam": 4, "MaxAvatarsInTeamMultiplayer": 4, "MaxEntityLimit": 1000, "WatchGacha": false, "WelcomeEmotes": [ 2007, 1002, 4010 ], "WelcomeMotd": "Welcome to Grasscutter emu", "Game": { "ADVENTURE_EXP_RATE": 1.0, "MORA_RATE": 1.0, "DOMAIN_DROP_RATE": 1.0 } }, "DispatchServer": { "Ip": "0.0.0.0", "PublicIp": "192.168.208.25", "Port": 443, "KeystorePath": "./keystore.p12", "KeystorePassword": "", "UseSSL": true, "AutomaticallyCreateAccounts": true, "GameServers": [] }

but when I Create Account ,It show a white screen like this

image

I also checked MongoDB , it create a db but no data here

image

image

I tried trued "AutomaticallyCreateAccounts" and login directly and I can't login

image

I think is wired , any idea?

memetrollsXD commented 2 years ago

It looks like the PublicIp is wrong, the client can't connect to that IP and so it fails. Double-check that

luckykeeper commented 2 years ago

It looks like the PublicIp is wrong, the client can't connect to that IP and so it fails. Double-check that

Thanks for reply

my server ip is 192.168.208.25 ,and my client ip is 192.168.180.9 , I already disable the firewall on 192.168.208.25

so I think PublicIp should be 192.168.208.25? and should i change "Ip": "0.0.0.0", to 192.168.208.25?

by the way , I have a dns server and set all the domain in wiki to my server ip(192.168.208.25) rather then use proxy in the wiki ,could be this reason?

luckykeeper commented 2 years ago

I double checked my dns record , I'm sure all the record to my server

Microsoft Windows [版本 10.0.17763.379] (c) 2018 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>nslookup api-os-takumi.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: api-os-takumi.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup hk4e-api-os-static.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: hk4e-api-os-static.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup hk4e-sdk-os.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: hk4e-sdk-os.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup dispatchosglobal.yuanshen.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: dispatchosglobal.yuanshen.com Address: 192.168.208.25

C:\Users\Administrator>nslookup osusadispatch.yuanshen.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: osusadispatch.yuanshen.com Address: 192.168.208.25

C:\Users\Administrator>nslookup account.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: account.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup log-upload-os.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: log-upload-os.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup dispatchcntest.yuanshen.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: dispatchcntest.yuanshen.com Address: 192.168.208.25

C:\Users\Administrator>nslookup devlog-upload.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: devlog-upload.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup webstatic.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: webstatic.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup log-upload.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: log-upload.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup hk4e-sdk.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: hk4e-sdk.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup api-beta-sdk.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: api-beta-sdk.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup api-beta-sdk-os.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: api-beta-sdk-os.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup cnbeta01dispatch.yuanshen.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: cnbeta01dispatch.yuanshen.com Address: 192.168.208.25

C:\Users\Administrator>nslookup dispatchcnglobal.yuanshen.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: dispatchcnglobal.yuanshen.com Address: 192.168.208.25

C:\Users\Administrator>nslookup cnbeta02dispatch.yuanshen.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: cnbeta02dispatch.yuanshen.com Address: 192.168.208.25

C:\Users\Administrator>nslookup sdk-os-static.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: sdk-os-static.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup webstatic-sea.mihoyo.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: webstatic-sea.mihoyo.com Address: 192.168.208.25

C:\Users\Administrator>nslookup hk4e-sdk-os-static.hoyoverse.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: hk4e-sdk-os-static.hoyoverse.com Address: 192.168.208.25

C:\Users\Administrator>nslookup webstatic-sea.hoyoverse.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: webstatic-sea.hoyoverse.com Address: 192.168.208.25

C:\Users\Administrator>nslookup sdk-os-static.hoyoverse.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: sdk-os-static.hoyoverse.com Address: 192.168.208.25

C:\Users\Administrator>nslookup api-account-os.hoyoverse.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: api-account-os.hoyoverse.com Address: 192.168.208.25

C:\Users\Administrator>nslookup hk4e-sdk-os.hoyoverse.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: hk4e-sdk-os.hoyoverse.com Address: 192.168.208.25

C:\Users\Administrator>nslookup uspider.yuanshen.com 服务器: demo.hbcf.edu.cn Address: 222.30.192.55

名称: uspider.yuanshen.com Address: 192.168.208.25

Unsugras commented 2 years ago

check your JDK ,it need JDK8

luckykeeper commented 2 years ago

check your JDK ,it need JDK8

Thanks for reply

I think I'm using the correct version of JDK

[root@YSServer ~]# java -version java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

luckykeeper commented 2 years ago

@memetrollsXD I tried again and the same problem , I tried set PublicIp 127.0.0.1 as default or 192.168.208.25(LAN ip) or 0.0.0.0 ,but all didn't work

so is there a way to direct create account in database? I tried CLI "account create luckykeeper" , it can create an account but can't set password so I can't login it

or I can not create account through GUI now?

memetrollsXD commented 2 years ago

Using passwords isn't implemented in Grasscutter. You should be able to login without a password, if not, you're not redirecting traffic correctly and you're still connected to the official servers

luckykeeper commented 2 years ago

Using passwords isn't implemented in Grasscutter. You should be able to login without a password, if not, you're not redirecting traffic correctly and you're still connected to the official servers

Got it , thanks,I will try proxy instead of custom DNS record latter

luckykeeper commented 2 years ago

well I tried proxy and it works! I think custom dns record method may not work

Thanks for help , and I will close this issue