質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%

Q&A

解決済

1回答

2262閲覧

マインクラフトにおける2サーバ間のインベントリを共有したです。

GamerIris

総合スコア4

0グッド

0クリップ

投稿2023/05/14 12:33

実現したいこと

マインクラフトを通じ、Linux及びDBの勉強中になります。
実現したいことは以下となります。

マインクラフトのサーバー起動の後、
spigotのプラグイン(MySQL Inventory Bridge)機能にて、
phpMyAdminに自分が事前に指定したデータベース上に新規テーブルが作成され、
2サーバ間にてインベントリを共有したい事が目標となります。

前提

リンク動画(他シリーズも含む)を参考に、
下記「 補足情報(FW/ツールのバージョンなど)」の環境を個別構築済。

発生している問題・エラーメッセージ

マインクラフトサーバーを自前で用意した「start.sh」を実施後に
spigotのプラグイン(MySQL Inventory Bridge)機能にて、
phpMyAdmin上のMinecraft_Inventoryデータベース上にmeb_inventoryという新規テーブルが自動作成される事を期待していましたが、
実際は作成されずに「Could not connect to mysql database!Error: Could not create connection to database server. Attempted reconnect 3 times. Giving up.」が発生してしまいます。

以下「試したこと」やエラー内容にてググったりもしましたが解決が出来なかった為、
皆様のお知恵をお借りしたく思います。

サーバーログ内容(サーバー4分のみ(サーバー3内容も同様ログ内容の為割愛))

ubuntu-304@ubuntu-304:~/MinecraftServer/script$ ./start.sh Unbundling libraries to /home/ubuntu-304/MinecraftServer/server/bundler Starting server Loading libraries, please wait... [20:37:43] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [20:37:44] [ServerMain/INFO]: Loaded 7 recipes [20:37:43] [ServerMain/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [20:37:44] [ServerMain/INFO]: Loaded 7 recipes [20:37:44] [Server thread/INFO]: Starting minecraft server version 1.19.4 [20:37:44] [Server thread/INFO]: Loading properties [20:37:44] [Server thread/INFO]: This server is running CraftBukkit version 3748-Spigot-7da74da-01b2e1a (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) [20:37:44] [Server thread/INFO]: Debug logging is disabled [20:37:44] [Server thread/INFO]: Server Ping Player Sample Count: 12 [20:37:44] [Server thread/INFO]: Using 4 threads for Netty based IO [20:37:44] [Server thread/INFO]: Default game type: SURVIVAL [20:37:44] [Server thread/INFO]: Generating keypair [20:37:44] [Server thread/INFO]: Starting Minecraft server on *:25565 [20:37:44] [Server thread/INFO]: Using epoll channel type [20:37:45] [Server thread/INFO]: [MysqlInventoryBridge] Loading MysqlInventoryBridge v2.4.1 [20:37:45] [Server thread/INFO]: [MysqlInventoryBridge] Enabling MysqlInventoryBridge v2.4.1 [20:37:45] [Server thread/INFO]: [MysqlInventoryBridge] Loading the config file... [20:37:45] [Server thread/WARN]: [MysqlInventoryBridge] ProtocolLib dependency not found. No support for modded items NBT data! [20:37:45] [Server thread/INFO]: [MysqlInventoryBridge] Data save task is enabled. [20:37:45] [Server thread/INFO]: [MysqlInventoryBridge] Connecting to the database... [20:44:21] [Server thread/ERROR]: [MysqlInventoryBridge] Could not connect to mysql database! Error: Could not create connection to database server. Attempted reconnect 3 times. Giving up. [20:44:21] [Server thread/INFO]: [MysqlInventoryBridge] MysqlInventoryBridge loaded successfully! ・ ・ ・ [20:44:29] [Server thread/INFO]: Done (7.865s)! For help, type "help"

該当のソースコード

config.yml

1#MySQL Database details 2database: 3 mysql: 4 #MySQL server address 5 host: 198.168.**.**'(←マスキングしております、サーバー2内容を指定しております。) 6 #MySQL server port (default 3306) 7 port: 3306 8 #Database name (NOTE! You need to create the database, then the plugin will create the tables.) 9 databaseName: 'Minecraft_Inventory' 10 #Tables name (the plugin will auto create it) 11 tableName: 'meb_inventory' 12 #User name 13 user: 'minecraft' 14 #User password 15 password: '********'(←マスキングしております。) 16 #SSL connection 17 sslEnabled: false 18 #Remove inactive users from the database. This maintenance task will start each server start with a 2min delay. 19 maintenance: 20 #Enable or disable database maintenance. | (true or false) 21 enabled: false 22 #Inactivity in days. Default 60 days. 23 inactivity: 60

試したこと

・phpMyAdminのデフォルトポート(3306)をufwで事前にallowを実施済
・config.yml上で指定したユーザがphpMyAdmin上の権限タブ内容に存在すること且つホスト名が「%」であることも確認済
・ローカルホストにてアドレスをバインドしている箇所(/etc/mysql/mariadb.conf.d/50-server.cnf → bind-address = 127.0.0.1)をコメントアウト済

補足情報(FW/ツールのバージョンなど)

サーバー1(BungeeCord用):Ubuntu 22.04.2 LTS、BungeeCord
サーバー2(MySQL用):Ubuntu 22.04.2 LTS、MariaDB、phpMyAdmin
サーバー3(Minecraft用):Ubuntu 22.04.2 LTS、spigot-1.19.4、MySQL Inventory Bridge 2.4.1
サーバー4(Minecraft用):Ubuntu 22.04.2 LTS、spigot-1.19.4、MySQL Inventory Bridge 2.4.1

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

もう一度設定見直しておりましたが、指定しておりましたipが間違っておりました。
(正しくは192.168~)

再度設定を変更しましたら、期待通りの挙動になりました。
何名か覗いて頂いた中申し訳ございませんがクローズとさせてください。

投稿2023/05/14 13:06

編集2023/05/14 13:07
GamerIris

総合スコア4

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問