MinimallyCorrect / ModPatcher

Allows easy patching of mods/plugins/arbitrary minecraft classes using config files
MIT License
8 stars 6 forks source link

403 response code to AWS EC2 for ModPatchjer-lib.jar - prevents startup #14

Closed draeath closed 7 years ago

draeath commented 7 years ago

As the subject says. I'm attempting to stand up a server with tickprofiler. It blows up during first launch, as your server returns a 403 to the request. I'm able to pull the file from home, so you or a service you run is blocking requests from AWS EC2 instances.

This seems especially odd as this mod is particularly suited for use on servers that might be hosted on cloud platforms, vs ad-hoc in-home hosting.

URL: https://modpatcher.nallar.me/1.10.2-stable/ModPatcher-lib.jar Timestamp: 04:20:52 Feb 15, UTC Source IP: should be 34.199.11.100

Relevant log fragment:

[04:20:52] [main/INFO] [TickProfiler]: TickProfiler v1.10.2.jenkins.10 coremod loading. Sponge present: false
[04:20:52] [main/ERROR] [ModPatcher]: Failed to download ModPatcher
java.io.IOException: Server returned HTTP response code: 403 for URL: https://modpatcher.nallar.me/1.10.2-stable/ModPatcher-lib.jar
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) ~[?:1.8.0_121]
        at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:91) ~[?:1.8.0_121]
        at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1466) ~[?:1.8.0_121]
        at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1464) ~[?:1.8.0_121]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
        at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782) ~[?:1.8.0_121]
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1463) ~[?:1.8.0_121]
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) ~[?:1.8.0_121]
        at me.nallar.modpatcher.ModPatcher.download(ModPatcher.java:272) [ModPatcher.class:?]
        at me.nallar.modpatcher.ModPatcher.loadModPatcher(ModPatcher.java:207) [ModPatcher.class:?]
        at me.nallar.modpatcher.ModPatcher.checkClassLoading(ModPatcher.java:297) [ModPatcher.class:?]
        at me.nallar.modpatcher.ModPatcher.checkClassLoading(ModPatcher.java:282) [ModPatcher.class:?]
        at me.nallar.modpatcher.ModPatcher.getPatcher(ModPatcher.java:108) [ModPatcher.class:?]
        at me.nallar.modpatcher.ModPatcher.loadPatches(ModPatcher.java:88) [ModPatcher.class:?]
        at nallar.tickprofiler.minecraft.CoreMod.injectData(CoreMod.java:51) [TICKPROFILER-1.10.2.JENKINS.10.jar:?]
        at net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:152) [forge-1.10.2-12.18.3.2221-universal.jar:?]
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:115) [launchwrapper-1.12.jar:?]
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
        at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:62) [forge-1.10.2-12.18.3.2221-universal.jar:?]
        at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31) [forge-1.10.2-12.18.3.2221-universal.jar:?]
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]: java.lang.reflect.InvocationTargetException
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]:       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]:       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]:       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]:       at java.lang.reflect.Method.invoke(Method.java:498)
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]:       at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:62)
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:main:31]:       at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31)
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]: Caused by: java.lang.Error: java.lang.ClassNotFoundException: me.nallar.modpatcher.ModPatcherLoadHook
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at me.nallar.modpatcher.ModPatcher.addToCurrentClassLoader(ModPatcher.java:244)
[04:20:52] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at me.nallar.modpatcher.ModPatcher.loadModPatcher(ModPatcher.java:211)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at me.nallar.modpatcher.ModPatcher.checkClassLoading(ModPatcher.java:297)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at me.nallar.modpatcher.ModPatcher.checkClassLoading(ModPatcher.java:282)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at me.nallar.modpatcher.ModPatcher.getPatcher(ModPatcher.java:108)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at me.nallar.modpatcher.ModPatcher.loadPatches(ModPatcher.java:88)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at nallar.tickprofiler.minecraft.CoreMod.injectData(CoreMod.java:51)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:152)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[04:20:53] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.ServerLaunchWrapper:run:67]:        ... 6 more
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]: Caused by: java.lang.ClassNotFoundException: me.nallar.modpatcher.ModPatcherLoadHook
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:117)
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     at java.lang.Class.forName0(Native Method)
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     at java.lang.Class.forName(Class.java:264)
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     at me.nallar.modpatcher.ModPatcher.addToCurrentClassLoader(ModPatcher.java:237)
[04:20:53] [main/INFO] [STDERR]: [java.lang.Throwable:printStackTrace:643]:     ... 15 more
draeath commented 7 years ago

It seems odd to me that this would self-download like this, instead of being unpacked from within ModPatcher's jar as a resource. It seems unnecessarily fragile in that it depends on your server being both up and cooperative (at least to bootstrap the first launch)

draeath commented 7 years ago

Seems like it was a transient issue (or you work fast) as it is now serving up the file to the referenced client. (or not... works via wget, but when minecraft tries, 403)

Still leaves the question of this as a dependency, though, so I'll leave the issue open for your review/comment.

draeath commented 7 years ago

So, even if I drop in place the file mentioned in ModPatcher.java (your comment above this is in disagreement, btw, as that says to put a differently named file in lib instead) I crash in the same place, so this seems to be unrelated to the update check.

Not sure why it would be dying there, but this bug had me barking up the wrong tree, perhaps.

LunNova commented 7 years ago

Cloudflare refusing to serve the file should now be fixed. I adjusted the security settings on it yesterday which caused this problem.

The error log there does look correct for failing to load modpatcher.

I need to update some of the messages/strings in there, as you've pointed out they're not accurate.