Open BB-301 opened 3 months ago
I also experience similar issues. The first backup after deleting the folder on the server succeeds, but from the second time onwards, the backup fails.
`2024-07-26 00:53:12 [00:53:12.389][info ] Initializing Bedrockifier Daemon 2024-07-26 00:53:12 [00:53:12.399][info ] Configuring Bedrockifier Daemon 2024-07-26 00:53:12 [00:53:12.401][info ] Loading Configuration From: /config/config.yml 2024-07-26 00:53:12 [00:53:12.407][info ] Configuration Loaded, Running Service... (main.swift:105) 2024-07-26 00:53:12 [00:53:12.414][debug ] Creating Bedrock Container Connection. (container: mc_server) (ContainerConnection.swift:313) 2024-07-26 00:53:12 [00:53:12.416][info ] Starting Container Connection. newline = ssh (ContainerConnection.swift:113) 2024-07-26 00:53:12 [00:53:12.416][info ] Host PTY Handle Opened: /dev/pts/0 (mc_server - 6) (Terminal.swift:164) 2024-07-26 00:53:12 [00:53:12.416][info ] Child PTY Handle Opened: /dev/pts/0 (mc_server - 7) (Terminal.swift:185) 2024-07-26 00:53:12 [00:53:12.417][debug ] Starting Terminal Process. (container: mc_server, kind: ssh) (ContainerConnection.swift:128) 2024-07-26 00:53:12 [00:53:12.418][info ] Connecting to mc_server:2222 (SSHClient.swift:49) 2024-07-26 00:53:12 [00:53:12.420][error ] Failed to connect SSH channel to host. (The operation could not be completed. (NIOPosix.NIOConnectionError error 1.)) (ContainerChannel.swift:90) 2024-07-26 00:53:12 [00:53:12.420][error ] Check that the SSH configuration is correct, and check the minecraft server logs for further errors. (ContainerChannel.swift:91) 2024-07-26 00:53:12 [00:53:12.420][debug ] Docker Process Window Size Fetched. (cols = 65000, rows = 24 (ContainerConnection.swift:300) 2024-07-26 00:53:12 [00:53:12.420][info ] Checking for servers that might not be cleaned up (BackupActor.swift:91) 2024-07-26 00:53:12 [00:53:12.422][info ] mc_server is dirty, cleaning up (BackupActor.swift:94) 2024-07-26 00:53:12 [00:53:12.422][info ] Backup Interval: 60.0 seconds (Service.swift:156) 2024-07-26 00:53:12 [00:53:12.422][debug ] Starting Terminal Process. (container: mc_server, kind: ssh) (ContainerConnection.swift:128) 2024-07-26 00:53:12 [00:53:12.422][debug ] [interval] Registered (ServiceTimer.swift:102) 2024-07-26 00:53:12 [00:53:12.422][info ] Connecting to mc_server:2222 (SSHClient.swift:49) 2024-07-26 00:53:12 [00:53:12.423][debug ] [interval] Event Fired. Valid Handler: false (ServiceTimer.swift:110) 2024-07-26 00:53:12 [00:53:12.423][debug ] [interval] Scheduled For Jul 26, 2024, 12:53:12 AM, Repeating 60.0 s (ServiceTimer.swift:81) 2024-07-26 00:53:12 [00:53:12.423][info ] Starting Listeners for Containers (Service.swift:199) 2024-07-26 00:53:12 [00:53:12.423][info ] Service Started Successfully. (Service.swift:108) 2024-07-26 00:53:12 [00:53:12.423][error ] Failed to connect SSH channel to host. (The operation could not be completed. (NIOPosix.NIOConnectionError error 1.)) (ContainerChannel.swift:90) 2024-07-26 00:53:12 [00:53:12.424][error ] Check that the SSH configuration is correct, and check the minecraft server logs for further errors. (ContainerChannel.swift:91) 2024-07-26 00:53:12 [00:53:12.424][debug ] Docker Process Window Size Fetched. (cols = 65000, rows = 24 (ContainerConnection.swift:300) 2024-07-26 00:53:12 [00:53:12.424][info ] Cleaning up old backups for mc_server (BackupActor.swift:101) 2024-07-26 00:53:12 [00:53:12.424][error ] Docker process didn't start successfully, or has died (BackupActor.swift:108) 2024-07-26 00:53:12 [00:53:12.425][error ] Failed to clean up container mc_server (BackupActor.swift:109) 2024-07-26 00:54:12 [00:54:12.423][debug ] [interval] Event Fired. Valid Handler: true (ServiceTimer.swift:110) 2024-07-26 00:54:12 [00:54:12.423][info ] Starting Full Backup (BackupActor.swift:174) 2024-07-26 00:54:12 [00:54:12.423][error ] Docker process didn't start successfully, or has died (BackupActor.swift:195) 2024-07-26 00:54:12 [00:54:12.424][error ] Container mc_server failed to backup properly (BackupActor.swift:196) 2024-07-26 00:54:12 [00:54:12.424][info ] Performing Trim Jobs (BackupActor.swift:241) 2024-07-26 00:54:12 [00:54:12.463][debug ] Processing: Ookurar1ku World (Backup.swift:99) 2024-07-26 00:54:12 [00:54:12.469][info ] Full Backup Completed (BackupActor.swift:214)
I did mean to update the Wiki after #92 to help catch this sort of problem earlier. But there's a couple approaches that should work here:
depends_on:
minecraft:
condition: service_healthy
schedule:
startupDelay: 1m
@Kaiede,
Thanks for the suggestions! I was already doing (1), which was useful to let the Minecraft server container completely start before the backup container tries to connect, but (2) looks like a nice workaround for when the system boots. I will give it a try when I get a chance.
As described in the title, I'm encountering an issue when trying to implement a backup solution based on the bedrock-itzg-ssh example, where rebooting of the system bypasses Docker Compose's
depends_on
condition checks, which apparently causes the backup container to enter an unrecoverable state after it "fails to connect SSH channel to host" (see the logs for the backup container at the bottom of this post).My understanding is that the problem is inherent to Docker Compose itself, and not this project. However, I thought I'd write about it here anyways, since Docker Compose appears to be the recommended way of using this tool. Moreover, I was wondering how others facing this same issue had managed to resolve it.