RavenDB 4 on Docker - unable to create database on mounted host volume

45 views
Skip to first unread message

Sean Duffy

unread,
Apr 26, 2017, 10:14:42 AM4/26/17
to RavenDB - 2nd generation document database

Hi there,

I'm attempting to run a RavenDB 4 a docker container.

I've mounted a volume from my Windows host machine (I'm running Docker via Quick start in a VirtualBox VM under Windows 10).

This is the image I'm using along with the command to run the image (RavenDB build 4.0-40012) and mount a folder:

docker pull pizycki/ravendb4
docker run -it -p 8080:8080 -v //c/Users/duffys:/mountdata pizycki/ravendb4

I then connect to the Raven UI and create a new database under the mounted volume, but the database fails to start. (See attached create.png for the paths I am specifying)

Here is the stack trace that shows up in the error:

{
    "httpStatus": "Internal Server Error",
    "details": "Raven.Client.Exceptions.Database.DatabaseLoadFailureException: Failed to start database test1\nAt /mountdata/test1 ---> System.InvalidOperationException: EINVAL sync dir for /mountdata/test1/Subscriptions/Raven.voron\n   at Voron.Platform.Posix.PosixHelper.ThrowLastError(Int32 lastError, String msg) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Voron\\Platform\\Posix\\PosixHelper.cs:line 49\n   at Voron.Platform.Posix.PosixMemoryMapPager..ctor(StorageEnvironmentOptions options, String file, Nullable`1 initialFileSize, Boolean usePageProtection) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Voron\\Platform\\Posix\\PosixMemoryMapPager.cs:line 61\n   at Voron.StorageEnvironmentOptions.DirectoryStorageEnvironmentOptions.GetMemoryMapPager(StorageEnvironmentOptions options, Nullable`1 initialSize, String file, Boolean deleteOnClose, Boolean usePageProtection) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Voron\\StorageEnvironmentOptions.cs:line 552\n   at Voron.StorageEnvironmentOptions.DirectoryStorageEnvironmentOptions.<.ctor>b__4_0() in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Voron\\StorageEnvironmentOptions.cs:line 244\n   at System.Lazy`1.CreateValue()\n   at System.Lazy`1.LazyInitValue()\n   at Voron.StorageEnvironment..ctor(StorageEnvironmentOptions options) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Voron\\StorageEnvironment.cs:line 139\n   at Raven.Server.Documents.Subscriptions.SubscriptionStorage..ctor(DocumentDatabase db) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Documents\\Subscriptions\\SubscriptionStorage.cs:line 49\n   at Raven.Server.Documents.DocumentDatabase..ctor(String name, RavenConfiguration configuration, ServerStore serverStore) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Documents\\DocumentDatabase.cs:line 69\n   at Raven.Server.Documents.DatabasesLandlord.CreateDocumentsStorage(StringSegment databaseName, RavenConfiguration config) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Documents\\DatabasesLandlord.cs:line 217\n   --- End of inner exception stack trace ---\n   at Raven.Server.Documents.DatabasesLandlord.CreateDocumentsStorage(StringSegment databaseName, RavenConfiguration config) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Documents\\DatabasesLandlord.cs:line 233\n   at Raven.Server.Documents.DatabasesLandlord.ActuallyCreateDatabase(StringSegment databaseName, RavenConfiguration config) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Documents\\DatabasesLandlord.cs:line 189\n   at Raven.Server.Documents.DatabasesLandlord.<>c__DisplayClass19_0.<CreateDatabaseUnderResourceSemaphore>b__0() in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Documents\\DatabasesLandlord.cs:line 153\n   at System.Threading.Tasks.Task`1.InnerInvoke()\n   at System.Threading.Tasks.Task.Execute()\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n   at async Raven.Server.Routing.RouteInformation.UnlikelyWaitForDatabaseToLoad(?) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Routing\\RouteInformation.cs:line 95\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n   at async Raven.Server.Routing.RouteInformation.WaitForDb(?) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Routing\\RouteInformation.cs:line 124\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n   at async Raven.Server.Routing.RequestRouter.HandlePath(?) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\Routing\\RequestRouter.cs:line 76\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n   at async Raven.Server.RavenServerStartup.RequestHandler(?) in C:\\Builds\\RavenDB-4.0-Alpha\\src\\Raven.Server\\RavenServerStartup.cs:line 114"
}



The actual DB folder does get created in my mounted volume on my docker host in Windows though - I can see it created with the same name I specified for the DB name, and it contains a few files and folders including Raven.voron under "Subscriptions". So it doesn't seem related to permissions as it is able to write some new files and directories.

I looked up the EINVAL error code for linux, and that is apparently "Invalid argument".

Does anyone have any ideas as to what is wrong here, or has anyone else successfully created a database on a mounted host volume for a RavenDB4 container?
create.png

Oren Eini (Ayende Rahien)

unread,
Apr 26, 2017, 10:56:37 AM4/26/17
to ravendb
See other post

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages