環境
- Google Cloud Platform
- debian-10-buster-v20200413
VMインスタンスのスペック
マシンタイプ
g1-small(vCPU x 1、メモリ 1.7 GB)
CPU プラットフォーム
Intel Broadwell
ゾーン
us-west1-b
どのようにエラーが発生するのか
まず、工業化modをサーバーに導入して友人と遊びたいので、kougyou
というディレクトリを作成
次に、作成したディレクトリへ移動する。
forge1.7.10のダウンロードURLを調べるためにforgeのサイトからインストーラーをクリック
SKIP
を右クリックし、リンクのアドレスをコピー
コピーしたURLを使ってサーバーにファイルをダウンロード
root@minecraft:~/minecraft/1.7.10/kougyou# wget https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7 .10-10.13.4.1558-1.7.10/forge-1.7.10-10.13.4.1558-1.7.10-installer.jar --2020-05-11 16:35:50-- https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-10.13.4.1558-1.7.10 /forge-1.7.10-10.13.4.1558-1.7.10-installer.jar Resolving files.minecraftforge.net (files.minecraftforge.net)... 142.44.226.189, 2607:5300:60:84db:: Connecting to files.minecraftforge.net (files.minecraftforge.net)|142.44.226.189|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3377075 (3.2M) [application/java-archive] Saving to: ‘forge-1.7.10-10.13.4.1558-1.7.10-installer.jar’ forge-1.7.10-10.13.4.1558-1. 100%[=============================================>] 3.22M 6.68MB/s in 0.5s 2020-05-11 16:35:51 (6.68 MB/s) - ‘forge-1.7.10-10.13.4.1558-1.7.10-installer.jar’ saved [3377075/3377075] root@minecraft:~/minecraft/1.7.10/kougyou# ls forge-1.7.10-10.13.4.1558-1.7.10-installer.jar
root@minecraft:~/minecraft/1.7.10/kougyou# java -jar forge-1.7.10-10.13.4.1558-1.7.10-installer.jar nogui --install Server
実行中のログ↓
Total Length: 3217021 Temp File: /tmp/art520676567906162585.pack MESSAGE: Successfully unpacked packed file scala-reflect-2.11.1.jar.pack.xz Checking "/root/minecraft/1.7.10/kougyou/./libraries/org/scala-lang/scala-reflect/2.11.1/scala-reflect-2.11.1.jar" internal checksums checksums.sha1 validated successfully Jar contents validated successfully MESSAGE: Considering library org.scala-lang:scala-swing_2.11:1.0.1 MESSAGE: Downloading library org.scala-lang:scala-swing_2.11:1.0.1 MESSAGE: Unpacking packed file scala-swing_2.11-1.0.1.jar.pack.xz Signed Checksum Length: 39019 Total Length: 888907 Temp File: /tmp/art1252639548038449603.pack MESSAGE: Successfully unpacked packed file scala-swing_2.11-1.0.1.jar.pack.xz Checking "/root/minecraft/1.7.10/kougyou/./libraries/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.jar" internal checksums checksums.sha1 validated successfully Jar contents validated successfully MESSAGE: Considering library org.scala-lang:scala-xml_2.11:1.0.2 MESSAGE: Downloading library org.scala-lang:scala-xml_2.11:1.0.2 MESSAGE: Unpacking packed file scala-xml_2.11-1.0.2.jar.pack.xz Signed Checksum Length: 35380 Total Length: 739509 Temp File: /tmp/art4308957962459322864.pack MESSAGE: Successfully unpacked packed file scala-xml_2.11-1.0.2.jar.pack.xz Checking "/root/minecraft/1.7.10/kougyou/./libraries/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar" internal checksums checksums.sha1 validated successfully Jar contents validated successfully MESSAGE: Considering library lzma:lzma:0.0.1 MESSAGE: Downloading library lzma:lzma:0.0.1 MESSAGE: Considering library net.sf.jopt-simple:jopt-simple:4.5 MESSAGE: Downloading library net.sf.jopt-simple:jopt-simple:4.5 MESSAGE: Considering library com.google.guava:guava:17.0 MESSAGE: Downloading library com.google.guava:guava:17.0 MESSAGE: Considering library org.apache.commons:commons-lang3:3.3.2 MESSAGE: Downloading library org.apache.commons:commons-lang3:3.3.2 The server installed successfully, you should now be able to run the file forge-1.7.10-10.13.4.1558-1.7.10-universal.jar You can delete this installer file now if you wish
確認のためにls
を実行してみる
ls
1・forge-1.7.10-10.13.4.1558-1.7.10-installer.jar 2・libraries 3・forge-1.7.10-10.13.4.1558-1.7.10-installer.jar.log 4・minecraft_server.1.7.10.jar 5・forge-1.7.10-10.13.4.1558-1.7.10-universal.jar
利用規約のファイルを作成するために一度ファイルを実行します。
root@minecraft:~/minecraft/1.7.10/kougyou# java -Xmx1024M -Xms1024M -jar minecraft_server.1.7.10.jar nogui
実行結果↓
root@minecraft:~/minecraft/1.7.10/kougyou# java -Xmx1024M -Xms1024M -jar minecraft_server.1.7.10.jar nogui WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by io.netty.util.internal.PlatformDependent0 (file:/root/minecraft/1.7.10/kougyou/minecraft_server.1.7.10.jar) to field java.nio.DirectByteBuffer.cleaner WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.PlatformDependent0 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release May 11, 2020 4:49:22 PM io.netty.util.internal.PlatformDependent <clinit> INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system unstability. [16:49:22] [Server thread/INFO]: Starting minecraft server version 1.7.10 [16:49:22] [Server thread/INFO]: Loading properties [16:49:22] [Server thread/WARN]: server.properties does not exist [16:49:22] [Server thread/INFO]: Generating new properties file [16:49:22] [Server thread/WARN]: Failed to load eula.txt [16:49:22] [Server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info. [16:49:22] [Server thread/INFO]: Stopping server [16:49:22] [Server Shutdown Thread/INFO]: Stopping server
再度ls
コマンドを使ってファイルを確認します。
ls
1・eula.txt 2・libraries 3・forge-1.7.10-10.13.4.1558-1.7.10-installer.jar 4・logs 5・forge-1.7.10-10.13.4.1558-1.7.10-installer.jar.log 6・minecraft_server.1.7.10.jar 7・forge-1.7.10-10.13.4.1558-1.7.10-universal.jar 8・server.properties
しっかりeula.txt
が追加されているので、ファイルを編集します。
編集後↓
eula.txt
1#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula). 2#Mon May 11 16:49:22 UTC 2020 3eula=true
利用規約にも同意する事が出来たのでforge-1.7.10-10.13.4.1558-1.7.10-universal.jar
を実行します。
sh
1root@minecraft:~/minecraft/1.7.10/kougyou# java -Xmx1024M -Xms1024M -jar forge-1.7.10-10.13.4.1558-1.7.10-universal.jar nogui
すると、このようなエラーが表示され、実行できません。
root@minecraft:~/minecraft/1.7.10/kougyou# java -Xmx1024M -Xms1024M -jar forge-1.7.10-10.13.4.1558-1.7.10-universal.jar nogui A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at cpw.mods.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:43) at cpw.mods.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:12) Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap') at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) ... 6 more
また、mods
のディレクトリも確認できません。
しかし、minecraft_server.1.7.10.jar
は実行する事ができます。
sh
1root@minecraft:~/minecraft/1.7.10/kougyou# java -Xmx1024M -Xms1024M -jar minecraft_server.1.7.10.jar nogui 2~~~teratailの文字数制限のため一部略~~ 3[17:01:01] [Server thread/INFO]: Preparing level "world" 4[17:01:02] [Server thread/INFO]: Preparing start region for level 0 5[17:01:03] [Server thread/INFO]: Preparing spawn area: 6% 6[17:01:04] [Server thread/INFO]: Preparing spawn area: 11% 7[17:01:05] [Server thread/INFO]: Preparing spawn area: 16% 8[17:01:06] [Server thread/INFO]: Preparing spawn area: 24% 9[17:01:07] [Server thread/INFO]: Preparing spawn area: 31% 10[17:01:08] [Server thread/INFO]: Preparing spawn area: 38% 11[17:01:09] [Server thread/INFO]: Preparing spawn area: 45% 12[17:01:10] [Server thread/INFO]: Preparing spawn area: 53% 13[17:01:11] [Server thread/INFO]: Preparing spawn area: 62% 14[17:01:12] [Server thread/INFO]: Preparing spawn area: 71% 15[17:01:13] [Server thread/INFO]: Preparing spawn area: 82% 16[17:01:14] [Server thread/INFO]: Preparing spawn area: 92% 17[17:01:15] [Server thread/INFO]: Done (13.161s)! For help, type "help" or "?"
#universalにこだわる理由
自分でmodsディレクトリを作成し、その中にmodファイルを入れてサーバーを実行してみましたが、modが使えず、調べたところ(間違っているかもしれませんが)universalなら動くようなのでuniversalでマインクラフトサーバーを立てようと頑張っています。
#最終的に解決したい事
マインクラフトサーバーをGoogleCloudPlatform上に立てて友人とマインクラフトmodで遊びたい
そのためにuniversalでサーバーを起動したい
回答1件
あなたの回答
tips
プレビュー