NikitaCartes / EasyAuth

Easy authentication mod for Fabric servers
MIT License
121 stars 23 forks source link

Can't Connect To MySQL Database or MongoDB Database[BUG] #45

Closed MRNOBODY-ZST closed 2 years ago

MRNOBODY-ZST commented 2 years ago

Versions

Describe the bug Can't Connect To MySQL Database or MongoDB Database

To Reproduce here is my config file

{
  "main": {
    "allowEntityInteract": false,
    "maxLoginTries": 1,
    "kickTime": 60,
    "enableGlobalPassword": true,
    "globalPassword": "$argon2i$v\u003d19$m\u003d65536,t\u003d10,p\u003d1$9kXV4dZ1Ff7WN4YpI9FHPg$dIpIQ55NFczj3baCrJOdwRuma7X1N0SZvYkcU4pMh64",
    "tryPortalRescue": true,
    "minPasswordChars": 4,
    "maxPasswordChars": -1,
    "usernameRegex": "^[a-zA-Z0-9_]{2,16}$",
    "sessionTimeoutTime": 3600,
    "spawnOnJoin": false,
    "databaseType": "MySQL",
    "MySQLHost": "**************",
    "MySQLUser": "easyauth",
    "MySQLPassword": "********************",
    "MySQLDatabase": "easyauth",
    "MySQLTableName": "easyauth",
    "MongoDBConnectionString": "mongodb://easyauth:*****************@*******************/easyauth",
    "MongoDBDatabase": "easyauth",
    "premiumAutologin": true,
    "forcedOfflinePlayers": [
      "hsx",
      "zx2",
      "xzy",
      "abc"
    ],
    "hideUnauthenticatedPLayersFromPlayerList": false
  },
  "worldSpawn": {
    "dimension": null,
    "x": 0.0,
    "y": 0.0,
    "z": 0.0,
    "yaw": 0.0,
    "pitch": 0.0
  },
  "lang": {
    "enterPassword": "§6You need to enter your password!",
    "enterNewPassword": "§4You need to enter new password!",
    "wrongPassword": "§4Wrong password!",
    "matchPassword": "§6Passwords must match!",
    "passwordUpdated": "§aYour password was updated successfully!",
    "loginRequired": "§cYou are not authenticated!\n§6Use /login, /l to authenticate!",
    "loginTriesExceeded": "§4Too many login tries.",
    "globalPasswordSet": "§aGlobal password was successfully set!",
    "cannotChangePassword": "§cYou cannot change password!",
    "cannotUnregister": "§cYou cannot unregister this account!",
    "notAuthenticated": "§cYou are not authenticated!\n§6Try with /login, /l or /register.",
    "alreadyAuthenticated": "§6You are already authenticated.",
    "successfullyAuthenticated": "§aYou are now authenticated.",
    "successfulLogout": "§aLogged out successfully.",
    "timeExpired": "§cTime for authentication has expired.",
    "registerRequired": "§6Type /register \u003cpassword\u003e \u003cpassword\u003e to claim this account.",
    "alreadyRegistered": "§6This account name is already registered!",
    "registerSuccess": "§aYou are now authenticated.",
    "userdataDeleted": "§aUserdata deleted.",
    "userdataUpdated": "§aUserdata updated.",
    "accountDeleted": "§aYour account was successfully deleted!",
    "configurationReloaded": "§aConfiguration file was reloaded successfully.",
    "maxPasswordChars": "§6Password can be at most %d characters long!",
    "minPasswordChars": "§6Password needs to be at least %d characters long!",
    "disallowedUsername": "§6Invalid username characters! Allowed character regex: %s",
    "playerAlreadyOnline": "§cPlayer %s is already online!",
    "worldSpawnSet": "§aSpawn for logging in was set successfully.",
    "corruptedPlayerData": "§cYour data is probably corrupted. Please contact admin.",
    "userNotRegistered": "§cThis player is not registered!",
    "cannotLogout": "§cYou cannot logout!",
    "offlineUuid": "Offline UUID for %s is ",
    "registeredPlayers": "List of registered players:",
    "addToForcedOffline": "Player successfully added into forcedOfflinePlayers list"
  },
  "experimental": {
    "preventAnotherLocationKick": true,
    "playerInvulnerable": true,
    "playerInvisible": true,
    "allowChat": false,
    "allowMovement": false,
    "allowBlockUse": false,
    "allowBlockPunch": false,
    "allowItemDrop": false,
    "allowItemMoving": false,
    "allowItemUse": false,
    "allowEntityPunch": false,
    "debugMode": false,
    "useBCryptLibrary": false,
    "forcedOfflineUuids": false,
    "useSimpleAuthDatabase": false,
    "teleportationTimeoutInMs": 5,
    "enableAliases": true,
    "enableServerSideTranslation": true,
    "resetLoginAttemptsTime": 120
  }
}

my log file here

[11:08:21] [main/INFO]: Loading Minecraft 1.18.2 with Fabric Loader 0.14.2
[11:08:22] [main/INFO]: Loading 72 mods:
    - at_favre_lib_bcrypt 0.9.0 via easyauth
    - at_favre_lib_bytes 1.5.0 via easyauth
    - carpet 1.4.69
    - carpet-extra 1.4.72
    - carpet-tis-addition 1.33.0
    - conditional-mixin 0.2.0 via carpet-tis-addition
    - de_mkammerer_argon2-jvm 2.11 via easyauth
    - de_mkammerer_argon2-jvm-nolibs 2.11 via easyauth
    - easyauth 3.0.0-1
    - fabric 0.51.1+1.18.2
    - fabric-api-base 0.4.4+d7c144a860 via fabric
    - fabric-api-lookup-api-v1 1.6.0+2373a54560 via fabric
    - fabric-biome-api-v1 8.0.4+7b0f312660 via fabric
    - fabric-command-api-v1 1.1.9+d7c144a860 via fabric
    - fabric-commands-v0 0.2.8+b4f4f6cd60 via fabric
    - fabric-containers-v0 0.1.21+d7c144a860 via fabric
    - fabric-content-registries-v0 3.0.3+d82b939260 via fabric
    - fabric-convention-tags-v1 1.0.1+474e4f7960 via fabric
    - fabric-crash-report-info-v1 0.1.11+3ac43d9560 via fabric
    - fabric-dimensions-v1 2.1.17+2540745460 via fabric
    - fabric-entity-events-v1 1.4.8+d7c144a860 via fabric
    - fabric-events-interaction-v0 0.4.19+d7c144a860 via fabric
    - fabric-events-lifecycle-v0 0.2.14+d7c144a860 via fabric
    - fabric-game-rule-api-v1 1.0.13+d7c144a860 via fabric
    - fabric-item-api-v1 1.4.0+4457765560 via fabric
    - fabric-item-groups-v0 0.3.11+91896a4960 via fabric
    - fabric-language-kotlin 1.7.4+kotlin.1.6.21
    - fabric-lifecycle-events-v1 2.0.3+2d83e92c60 via fabric
    - fabric-loot-tables-v1 1.0.11+d7c144a860 via fabric
    - fabric-mining-level-api-v1 2.1.0+81ea5b3c60 via fabric
    - fabric-networking-api-v1 1.0.21+d882b91560 via fabric
    - fabric-networking-v0 0.3.8+b4f4f6cd60 via fabric
    - fabric-object-builder-api-v1 2.1.0+fe4ddef060 via fabric
    - fabric-particles-v1 0.2.12+526dc1ac60 via fabric
    - fabric-permissions-api-v0 0.1-SNAPSHOT via easyauth
    - fabric-registry-sync-v0 0.9.8+0d9ab37260 via fabric
    - fabric-rendering-data-attachment-v1 0.3.7+d7c144a860 via fabric
    - fabric-rendering-fluids-v1 2.0.2+54e5b2ec60 via fabric
    - fabric-resource-conditions-api-v1 2.0.3+91b7aa6660 via fabric
    - fabric-resource-loader-v0 0.4.18+2de5574560 via fabric
    - fabric-screen-handler-api-v1 1.2.0+1f6558e860 via fabric
    - fabric-transfer-api-v1 1.6.0+2373a54560 via fabric
    - fabric-transitive-access-wideners-v1 1.0.0+bd8a4a1860 via fabric
    - fabricloader 0.14.2
    - java 17
    - lazydfu 0.1.2
    - ledger 1.2.4
    - lithium 0.7.9
    - minecraft 1.18.2
    - mysql-jdbc 8.0.28+20220312
    - mysql_mysql-connector-java 8.0.28 via easyauth
    - net_java_dev_jna_jna 5.9.0 via easyauth
    - org_iq80_leveldb_leveldb 0.12 via easyauth
    - org_iq80_leveldb_leveldb-api 0.12 via easyauth
    - org_jetbrains_kotlin_kotlin-reflect 1.6.21 via fabric-language-kotlin
    - org_jetbrains_kotlin_kotlin-stdlib 1.6.21 via fabric-language-kotlin
    - org_jetbrains_kotlin_kotlin-stdlib-jdk7 1.6.21 via fabric-language-kotlin
    - org_jetbrains_kotlin_kotlin-stdlib-jdk8 1.6.21 via fabric-language-kotlin
    - org_jetbrains_kotlinx_kotlinx-coroutines-core-jvm 1.6.1 via fabric-language-kotlin
    - org_jetbrains_kotlinx_kotlinx-coroutines-jdk8 1.6.1 via fabric-language-kotlin
    - org_jetbrains_kotlinx_kotlinx-serialization-cbor-jvm 1.3.2 via fabric-language-kotlin
    - org_jetbrains_kotlinx_kotlinx-serialization-core-jvm 1.3.2 via fabric-language-kotlin
    - org_jetbrains_kotlinx_kotlinx-serialization-json-jvm 1.3.2 via fabric-language-kotlin
    - org_mongodb_bson 4.3.2 via easyauth
    - org_mongodb_mongodb-driver-core 4.3.2 via easyauth
    - org_mongodb_mongodb-driver-sync 4.3.2 via easyauth
    - org_yaml_snakeyaml 1.30 via carpet-tis-addition
    - packet_tweaker 0.2.0+1.18-pre1 via server_translations_api
    - pca 0.2.5
    - phosphor 0.8.1
    - placeholder-api 1.1.3+1.17.1 via easyauth
    - server_translations_api 1.4.10+1.18.2 via easyauth
[11:08:22] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/root/fabric_server/server/libraries/net/fabricmc/sponge-mixin/0.11.3+mixin.0.8.5/sponge-mixin-0.11.3+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER
[11:08:22] [main/INFO]: Compatibility level set to JAVA_16
[11:08:22] [main/INFO]: Compatibility level set to JAVA_17
[11:08:22] [main/INFO]: Loaded configuration file for Lithium: 100 options available, 0 override(s) found
[11:08:31] [main/INFO]: [EasyAuth] EasyAuth mod by samo_lego, NikitaCartes.
[11:08:31] [TISCM Mapping/INFO]: Yarn mapping file yarn-1.18.2+build.3-v2.tiny loaded
[11:08:31] [main/INFO]: Initializing Ledger 1.2.4
[11:08:33] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[11:08:34] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[11:08:34] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[11:08:34] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[11:08:34] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[11:08:34] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[11:08:35] [Worker-Main-3/INFO]: Loaded 7 recipes
[11:08:35] [Worker-Main-3/INFO]: Loaded 1141 advancements
[11:08:35] [ForkJoinPool.commonPool-worker-1/INFO]: Loaded 5244 translation keys
[11:08:36] [main/INFO]: Applied 0 biome modifications to 0 of 61 new biomes in 2.678 ms
[11:08:36] [Server thread/INFO]: Preparing create tables statements took 12ms
[11:08:36] [Server thread/INFO]: Executing create tables statements took 12ms
[11:08:36] [Server thread/INFO]: Extracting table columns took 4ms
[11:08:36] [Server thread/INFO]: Preparing alter table statements took 5ms
[11:08:36] [Server thread/INFO]: Executing alter table statements took 0ms
[11:08:37] [Server thread/INFO]: Index on table 'players' differs only in name: in db players_player_id -> in mapping players_player_id_unique
[11:08:37] [Server thread/INFO]: Index on table 'ActionIdentifiers' differs only in name: in db ActionIdentifiers_action_identifier -> in mapping ActionIdentifiers_action_identifier_unique
[11:08:37] [Server thread/INFO]: Index on table 'ObjectIdentifiers' differs only in name: in db ObjectIdentifiers_identifier -> in mapping ObjectIdentifiers_identifier_unique
[11:08:37] [Server thread/INFO]: Index on table 'sources' differs only in name: in db sources_name -> in mapping sources_name_unique
[11:08:37] [Server thread/INFO]: Index on table 'worlds' differs only in name: in db worlds_identifier -> in mapping worlds_identifier_unique
[11:08:37] [Server thread/INFO]: Checking mapping consistence took 182ms
[11:08:37] [Server thread/INFO]: Tables created
[11:08:37] [DefaultDispatcher-worker-5/INFO]: Inserting 1314 registry keys into the database...
[11:08:37] [Server thread/INFO]: Starting minecraft server version 1.18.2
[11:08:37] [Server thread/INFO]: Loading properties
[11:08:37] [Server thread/INFO]: Default game type: SURVIVAL
[11:08:37] [Server thread/INFO]: Generating keypair
[11:08:37] [Server thread/INFO]: Starting Minecraft server on *:25566
[11:08:37] [Server thread/INFO]: Using epoll channel type
[11:08:37] [Server thread/INFO]: Preparing level "world"
[11:08:37] [Server thread/INFO]: [CM]: loaded setting fakePlayerNamePrefix as b_ from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting superSecretSetting as false from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting opPlayerNoCheat as true from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting fillLimit as 10 from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting pcaSyncProtocol as true from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting commandPlayer as true from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting playerOperationLimiter as true from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting playerSit as true from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting defaultLoggers as tps from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting hopperCounters as true from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting blockStateSyncing as true from carpet.conf
[11:08:37] [Server thread/INFO]: [CM]: loaded setting accurateBlockPlacement as true from carpet.conf
[11:08:37] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[11:08:38] [DefaultDispatcher-worker-13/INFO]: Registry insert complete
[11:08:40] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[11:08:40] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[11:08:40] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[11:08:40] [Worker-Main-1/INFO]: Preparing spawn area: 0%
[11:08:40] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[11:08:40] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[11:08:40] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[11:08:40] [User Authenticator #1/INFO]: UUID of player zx65655 is 1f69c52a-fed2-43bf-9e77-00eaac3392fb
[11:08:41] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[11:08:41] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[11:08:42] [Worker-Main-2/INFO]: Preparing spawn area: 4%
[11:08:42] [Worker-Main-2/INFO]: Preparing spawn area: 11%
[11:08:43] [Worker-Main-2/INFO]: Preparing spawn area: 32%
[11:08:43] [Worker-Main-2/INFO]: Preparing spawn area: 61%
[11:08:44] [Server thread/INFO]: Time elapsed: 6771 ms
[11:08:44] [Server thread/INFO]: Done (7.335s)! For help, type "help"
[11:08:44] [Server thread/INFO]: Starting remote control listener
[11:08:44] [Server thread/INFO]: Thread RCON Listener started
[11:08:44] [Server thread/INFO]: RCON running on 0.0.0.0:25575
[11:08:44] [RCON Listener #1/INFO]: Thread RCON Client /127.0.0.1 started
[11:08:45] [Server thread/INFO]: zx65655[/58.209.71.43:7613] logged in with entity id 108 at (138.2510086850116, 139.0, -205.29945732848333)
[11:08:45] [Server thread/INFO]: zx65655 joined the game
[11:08:45] [Netty Epoll Server IO #1/INFO]: Player zx65655 joined with a matching carpet client
[11:09:19] [Server thread/INFO]: B_1[local] logged in with entity id 382 at (23.30000001192093, 149.0, -132.69999998807907)
[11:09:19] [Server thread/INFO]: B_1 joined the game
[11:09:20] [Server thread/INFO]: b_yongzhou[local] logged in with entity id 383 at (197.52, 168.2, 264.5)
[11:09:20] [Server thread/INFO]: b_yongzhou joined the game
[11:09:46] [Server thread/INFO]: B_2[local] logged in with entity id 630 at (24.41049287418436, 149.0, -65.30000001192093)
[11:09:46] [Server thread/INFO]: B_2 joined the game
[11:14:36] [Server thread/WARN]: zx65655 moved wrongly!
[11:14:37] [Server thread/WARN]: zx65655 moved wrongly!
[11:14:37] [Server thread/WARN]: zx65655 moved wrongly!
[11:15:21] [Server thread/WARN]: zx65655 moved wrongly!
[11:16:05] [Server thread/WARN]: zx65655 moved wrongly!
[11:16:06] [Server thread/WARN]: zx65655 moved wrongly!
[11:17:20] [Server thread/INFO]: <zx65655> !!qb make stop
[11:17:20] [Server thread/INFO]: Automatic saving is now disabled
[11:17:20] [Server thread/INFO]: Saving the game (this may take a moment!)
[11:17:21] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[11:17:21] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[11:17:21] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[11:17:21] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[11:17:21] [Server thread/INFO]: Saved the game
[11:17:38] [Server thread/INFO]: Automatic saving is now enabled
[11:17:49] [Server thread/INFO]: zx65655 lost connection: Disconnected
[11:17:49] [Server thread/INFO]: zx65655 left the game

there is no content or new table in mysql database the password, userid, dbname and port have been sent to your discord

Expected behavior Can't Connect To Database Have no warning messages or error messages like issue#37(probably)

Additional context Nah

MRNOBODY-ZST commented 2 years ago

@NikitaCartes aaaaahhhhhhhhhhh any clues?

NikitaCartes commented 2 years ago

It's fix for problem with case sensitive settings. And added stacktraces, so maybe problem will be more obvious with them.