pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.81k stars 1.74k forks source link

Transfer Bug #4644

Closed SneakyHub closed 6 months ago

SneakyHub commented 1 year ago

Current Behavior

DEBUG: [Dec 29 14:39:59.824] POST /api/transfers client_ip=MACHINEIP latency=1m44.176470518s request_id=944b0a47-a3d9-4a88-bc6b-644c4877f0d8 status=200 ERROR: [Dec 29 14:39:59.824] error while handling HTTP request error=checksums don't match request_id=944b0a47-a3d9-4a88-bc6b-644c4877f0d8 status=500 url=/api/transfers

Stacktrace: checksums don't match github.com/pterodactyl/wings/router.postTransfers github.com/pterodactyl/wings/router/router_transfer.go:210 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.LoggerWithConfig.func1 github.com/gin-gonic/gin@v1.8.1/logger.go:240 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/pterodactyl/wings/router/middleware.AttachApiClient.func1 github.com/pterodactyl/wings/router/middleware/middleware.go:51 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/pterodactyl/wings/router/middleware.AttachServerManager.func1 github.com/pterodactyl/wings/router/middleware/middleware.go:42 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/pterodactyl/wings/router/middleware.SetAccessControlHeaders.func1 github.com/pterodactyl/wings/router/middleware/middleware.go:135 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/pterodactyl/wings/router/middleware.CaptureErrors.func1 github.com/pterodactyl/wings/router/middleware/middleware.go:68 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/pterodactyl/wings/router/middleware.AttachRequestID.func1 github.com/pterodactyl/wings/router/middleware/middleware.go:33 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1 github.com/gin-gonic/gin@v1.8.1/recovery.go:101 github.com/gin-gonic/gin.(Context).Next github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(Engine).handleHTTPRequest github.com/gin-gonic/gin@v1.8.1/gin.go:616 github.com/gin-gonic/gin.(Engine).ServeHTTP github.com/gin-gonic/gin@v1.8.1/gin.go:572 net/http.serverHandler.ServeHTTP net/http/server.go:2916 net/http.initALPNRequest.ServeHTTP net/http/server.go:3523 net/http.(*http2serverConn).runHandler net/http/h2_bundle.go:5906 runtime.goexit runtime/asm_amd64.s:1571

Expected Behavior

Should of transferred the other servers over while verifying the checksum. Instead of throwing an error.

Steps to Reproduce

When transferring multiple containers at once. The checksums get thrown outta wack.

  1. Go to admin panel.
  2. Navigate to server you wish to transfer to another node.
  3. Once you select the server, go to the manage tab in the admin panel.
  4. Select the transfer button and tell it to go to another node.
  5. While this is transferring select other servers to also transfer to the other node.

(I did this with servers like 7.3GB) As it was taking time to transfer I transfer a couple more containers too all similar size. Once they are finished they throw an error. I manage to capture the error in wings --debug

Panel Version

1.11.2

Wings Version

1.11.0

Games and/or Eggs Affected

Minecraft Paper, Forge, Bungee

Docker Image

No response

Error Logs

I included the wings log above. Because the log included sensitive IP's.

Is there an existing issue for this?

OneHitX commented 1 year ago

4614

SneakyHub commented 1 year ago

4614

There is no checksum error in that report. This report shows that I get checksum errors when transferring multiple servers. In the other guys error report there isn't this sort of error. It's different.

OneHitX commented 1 year ago

4614

There is no checksum error in that report. This report shows that I get checksum errors when transferring multiple servers. In the other guys error report there isn't this sort of error. It's different.

Are one-by-one transfers working for you? In my issue no transfer works.

SneakyHub commented 1 year ago

4614

There is no checksum error in that report. This report shows that I get checksum errors when transferring multiple servers. In the other guys error report there isn't this sort of error. It's different.

Are one-by-one transfers working for you? In my issue no transfer works.

I get roughly 3/10 fails when I transfer one by one. Again with the checksum error. It spits out the error in wings --debug.

matthewpi commented 1 year ago

I'm not sure what you want me to do here. The error clearly states the checksums don't match, likely due to a networking or system issue somewhere. The checksums are verified while streaming the archive on both ends, if that fails then something went terribly wrong. Ironically, this does not verify the extraction of the contents but just the network data transfer itself. I don't see how doing multiple simultaneous transfers would affect this unless it causes networking issues on either the source or destination machines, which would be more likely if they only have gigabit networking.

The screenshot you posted (in Discord) of the checksums supposedly matching is the IDs of the request which is used to track errors associated with a specific incoming HTTP request. I believe the checksums are only logged in debug mode, but if there was a logic error with comparing the checksums, it definitely would be reported more than a handful of times.

OneHitX commented 1 year ago

I'm not sure what you want me to do here. The error clearly states the checksums don't match, likely due to a networking or system issue somewhere. The checksums are verified while streaming the archive on both ends, if that fails then something went terribly wrong. Ironically, this does not verify the extraction of the contents but just the network data transfer itself. I don't see how doing multiple simultaneous transfers would affect this unless it causes networking issues on either the source or destination machines, which would be more likely if they only have gigabit networking.

The screenshot you posted (in Discord) of the checksums supposedly matching is the IDs of the request which is used to track errors associated with a specific incoming HTTP request. I believe the checksums are only logged in debug mode, but if there was a logic error with comparing the checksums, it definitely would be reported more than a handful of times.

Would it be possible in the next update to choose the server transfer method for the new one or use the old transfer method? In the latest Panel 1.11.2 and Wings 1.11.0 releases, server transfers are completely broken. This function is something I really need up and running. Since downgrading to older versions of the panel and wings is not possible.