Jump to content

Server Migration


Recommended Posts

Hello, basically I've spent this whole day trying to figure out how to link my previous world with new caves. It might sound silly, I mean, why? Just generate a new world, right? Well no, because we play rarely and survived over 120 days, which is a lot to us due to our very limited schedules.

Short note: I am using a VPS server with CentOS 7.6 (used Ubuntu 16.04 previously)

Aside that, how I went about it is simple: install the dedicated server on the VPS, start it so it generates caves, shutdown. Move my save that I have to the server, start it, use the "OneWayConnections" and "Connections" mods or whatever to setup an automatic sinkhole/staircase configuration. One thing that I found bizarre is that I don't see any activity from them. My modoverride.lua on master looks like this:

return {
--#Global Position
["workshop-378160973"] = { enabled = true },
--#Ancient Altar
["workshop-481765222"] = { enabled = true },
--#Health Info
["workshop-375859599"] = { enabled = true },
--#Smarter Crock Pot
["workshop-365119238"] = { enabled = true },
--#Combined Status
["workshop-376333686"] = { enabled = true },
--#Display Food Values
["workshop-347079953"] = { enabled = true },
["workshop-595764362"] = {
	enabled = true,
	configuration_options = {
		["Connections"] = {
        	["1"] = { "1833211612", "1833211612", "1833211612", "1833211612", "1833211612", "1833211612", "1833211612", "1833211612", "1833211612", "1833211612"},
		["1833211612"] = { "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"}
		},
		["OneWayConnections"] = {
			["1"] = { "1833211612", "1833211612" },
			["1833211612"] = { "1", "1" }
		}
	}
}
}

If I am being honest, I do not understand the configuration of this mod at all, which is why it might look bad or such.

However, that is still okay (most likely). Why? Because I tried to assign the cave_entrance the ability to move me to the caves. And that works, in fact, it worked even without assigning it - I can easily get moved to the caves using sinkholes without configuring anything, doesn't matter if I change the top or not. The commands I used for the manual override are:

c_find('cave_entrance').components.worldmigrator:SetDestinationWorld("1833211612", true)
c_find('cave_exit').components.worldmigrator:SetDestinationWorld("1", true)

As you can guess, the shardID for Caves is 1833211612, and for Master is the short 1. That is fine, it assigns okay, I suppose.

However, assign it or not, the problem at all cases comes down to this sequence of errors every time I try to use the staircase in Caves to return to the top:

Caves:  [00:04:24]: [Shard] Migration request: (KU_1x0GdBAN) to [SHDMASTER](1)
Master: [00:04:24]: [Shard] Begin migration #2 for (KU_1x0GdBAN)
Master: [00:04:24]: [Shard] #2 Caves(1833211612) -> [SHDMASTER](1)
Caves:  [00:04:24]: [Shard] #2 <- session/AF76250224734DB8/A7G7M089PCKN/0000000125
Master: [00:04:24]: [Shard] #2 -> session/8A424FA02CC72A92/A7G7M089PCKN/0000000125
Master: [00:04:24]: [CRITICAL] Failed to save file: /home/dst/.klei//DoNotStarveTogether/MyDediServer/Master/save/session/8A424FA02CC72A92/A7G7M089PCKN/0000000125
Master: [00:04:24]: [CRITICAL] Fingerprint: long binary-like stuff
Master: [00:04:24]: [Shard] Migration failed: Failed to save player data to: session/8A424FA02CC72A92/A7G7M089PCKN/0000000125
Master: [00:04:24]: [Shard] Migration by user ('KU_1x0GdBAN') failed (179).
Master: [00:04:24]: [Shard] Cancelling pending migration #2 for (KU_1x0GdBAN)
Caves:  [00:04:24]: [Shard] Migration by user ('KU_1x0GdBAN') failed (176).
Caves:  [00:04:24]: CloseConnectionWithReason: ID_DST_USER_CONNECTION_FAILED
Caves:  [00:04:24]: [Steam] SendUserDisconnect for '76561198049475122'
Master: [00:04:24]: [Shard] (KU_1x0GdBAN) disconnected from Caves(1833211612)

In fact, I've no idea anymore how to fix this, because the session files do look fine to me. I've done the part of moving session files from my saved files' session folder to the Caves in order for them to function properly, but it ain't working, I guess?

In fact, if I enter the Caves using sinkholes, they just teleport me to a weird place, not anywhere close to a staircase, which I assume it bases off of the misalignments of the two worlds, because they've been generated separately (duh, because I've merged them). However, if the mod and assignment did work, it would teleport me to the proper locations, I hypothesize, but it doesn't.

Any help would be appreciated. I have exams next month and we just used this server to chill out with my friend. Had my English exam yesterday, which is why I am willing to fix this somewhat soon.

Of course, we could play like this, explore the caves like that (when I align the caves with the world so it was close-by), but I really don't want to teleport to a different world with commands each time I had to return, with I suppose, this approach:

c_migrateto(worldId, portalId)

Furthermore, I'd need to teleport my friend back, which is even less logical since we're looking for the original experience, lesser commands and lesser usage of advantageous mechanics (adding the fact that I don't even know how would I move him across worlds other than giving him admin and teaching him to migrate himself).

HALP!

Link to comment
Share on other sites

Can't seem to edit my thread.

The issue has been solved. Successfully linked caves with master on both Ubuntu 16.04 and CentOS 7.6. It was merely a permission issue which I solved by using chmod on the whole .klei directory and it's subdirs and files (do not forget that there is a double forward slash after this path, i.e. ~/dst/.klei//DoNotStarveTogether/MyDediServer)

I suspect that it was most likely due to the fact that after moving in the new save and session files for Caves and Master, the files were masked or somehow inaccessible due to the moving process which isn't held by the created user, thus not having rights to read/write them, so normally you probably need to re-assign permissions for those new files / directories, I suppose. 

This was a very beneficial lesson.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...