sandstorm-io / sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.
https://sandstorm.io
Other
6.74k stars 708 forks source link

On migration of data, sandstorm fails to start (mongod failing) #3079

Open zeigerpuppy opened 6 years ago

zeigerpuppy commented 6 years ago

I am trying to migrate an old sandstorm install (sandstorm-230) to a new server and then update.

The old server was a Xen VM based on Debian Wheezy, the new server is a KVM VM based on Debian Stretch (withouts systemd). The sandstorm installer installs fine and the new instance (sandstorm-234) starts.

N.B the /opt/sandstorm folder is stored on a 9pfs mount within the KVM machine, but can freely set permissions and it seems to work well with the newer instance so I don't think it's a filesystem issue.

I have then copied the old /opt/sandstorm folder to the new server and tried starting with /etc/init.d/sandstorm start.

However, sandstorm bails out saying it can't start mongodb, from the sandstorm.log:

** Starting back-end...
** Starting MongoDB...
note: noprealloc may hurt performance in many applications
about to fork child process, waiting until server is ready for connections.
forked process: 8
ERROR: child process failed, exited with error number 1
*** Uncaught exception ***
sandstorm/run-bundle.c++:2352: failed: **mongod failed to start. Initial exit code: ; status = 1; bailing out now. For troubleshooting, read /opt/sandstorm/var/log/mongo.log (or var/log/mongo.log within your Sandstorm if installed to a different place) and visit: https://docs.sandstorm.io/en/latest/search.html?q=mongod+failed+to+start
stack: 0x48c506 0x487e8c 0x483d6f 0x48301c 0x5dc6ea 0x5dd925
** Server monitor died. Aborting.

Strangely, the mongo.log is not having any new info written to it, it's the old log from the last VM:

2018-06-03T13:05:18.313+0000 [signalProcessingThread] shutdown: waiting for fs preallocator...
2018-06-03T13:05:18.313+0000 [signalProcessingThread] shutdown: lock for final commit...
2018-06-03T13:05:18.313+0000 [signalProcessingThread] shutdown: final commit...
2018-06-03T13:05:18.317+0000 [signalProcessingThread] shutdown: closing all files...
2018-06-03T13:05:18.322+0000 [signalProcessingThread] closeAllFiles() finished
2018-06-03T13:05:18.322+0000 [signalProcessingThread] journalCleanup...
2018-06-03T13:05:18.322+0000 [signalProcessingThread] removeJournalFiles
2018-06-03T13:05:18.324+0000 [signalProcessingThread] shutdown: removing fs lock...
2018-06-03T13:05:18.324+0000 [signalProcessingThread] dbexit: really exiting now

Are there some more diagnostics I can do to see why mongod is not starting?

georgeowell commented 5 years ago

Did you ever solve this? I am having exactly the same problem :sob:

This is on a Debian stretch server (with systemd).

xet7 commented 5 years ago

@georgeowell

Did you read troubleshooting tips? https://docs.sandstorm.io/en/latest/administering/faq/#mongod-failed-to-start-whats-going-on

Does your server have any cgroups limitations, like for example OVH servers have? You can see it by testing does Docker or Snap work for installing Wekan https://wekan.github.io . If those work, Sandstorm works too. Sandstorm requires server that does not limit cgroups etc, and that kernel is new enough, like 3.x or 4.x.

xet7 commented 5 years ago

I do have Sandstorm running on Ubuntu 16.04 64bit and Ubuntu 18.04 64bit on KVM.