Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esent File Acess exception [see info] #400

Closed
asapostolov opened this issue Nov 11, 2011 · 12 comments
Closed

Esent File Acess exception [see info] #400

asapostolov opened this issue Nov 11, 2011 · 12 comments

Comments

@asapostolov
Copy link
Contributor

Hello,

I'm experiencing a very strange exception on my hosting environment. I have tow instances of RavenDb. First is build 287, and runs fine, the second is #499 and throws the following exception:

[EsentFileAccessDeniedException: Cannot access file, the file is locked or in use]
Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:2739
Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance) in C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:131
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\raven\Raven.Storage.Esent\TransactionalStorage.cs:207

[InvalidOperationException: Could not open transactional storage: d:\inetpub\vhosts\aapostolov.com\subdomains\ravendvera\httpdocs\Data\Data]
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator) in c:\Builds\raven\Raven.Storage.Esent\TransactionalStorage.cs:220
Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration) in c:\Builds\raven\Raven.Database\DocumentDatabase.cs:148
Raven.Web.ForwardToRavenRespondersFactory..cctor() in c:\Builds\raven\Raven.Web\ForwardToRavenRespondersFactory.cs:30

[TypeInitializationException: The type initializer for 'Raven.Web.ForwardToRavenRespondersFactory' threw an exception.]
Raven.Web.ForwardToRavenRespondersFactory..ctor() +0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1136
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +23
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +46
System.Web.HttpApplication.GetFactory(String type) +81
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +223
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

The strange thing is if I run a second server with build 287 - the two 287 are fine, and #499 crashes. Even if I stop all the 287, the #499 still gives the error.

Hope you can reproduce this and fix it.

@ravendb
Copy link
Collaborator

ravendb commented Nov 11, 2011

You can't share the same directory with build 287 and 499

On Fri, Nov 11, 2011 at 2:13 PM, asapostolov <
reply@reply.github.com

wrote:

Hello,

I'm experiencing a very strange exception on my hosting environment. I
have tow instances of RavenDb. First is build #287, and runs fine, the
second is #499 and throws the following exception:
[EsentFileAccessDeniedException: Cannot access file, the file is locked or
in use]
Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) in
C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:2739
Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance) in
C:\Work\ravendb\SharedLibs\Sources\managedesent-61618\EsentInterop\Api.cs:131
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator
uuidGenerator) in
c:\Builds\raven\Raven.Storage.Esent\TransactionalStorage.cs:207

[InvalidOperationException: Could not open transactional storage:
d:\inetpub\vhosts\aapostolov.com\subdomains\ravendvera\httpdocs\Data\Data]
Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator
uuidGenerator) in
c:\Builds\raven\Raven.Storage.Esent\TransactionalStorage.cs:220
Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration
configuration) in c:\Builds\raven\Raven.Database\DocumentDatabase.cs:148
Raven.Web.ForwardToRavenRespondersFactory..cctor() in
c:\Builds\raven\Raven.Web\ForwardToRavenRespondersFactory.cs:30

[TypeInitializationException: The type initializer for
'Raven.Web.ForwardToRavenRespondersFactory' threw an exception.]
Raven.Web.ForwardToRavenRespondersFactory..ctor() +0

[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean
publicOnly, Boolean noCheck, Boolean& canBeCached,
RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean
skipCheckThis, Boolean fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean
skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
+1136
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes) +111
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture) +23
System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args)
+60
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +46
System.Web.HttpApplication.GetFactory(String type) +81

System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+223
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +184

The strange thing is if I run a second server with build #287 - the two
#287 are fine, and #499 crashes. Even if I stop all the #287, the #499
still gives the error.

Hope you can reproduce this and fix it.


Reply to this email directly or view it on GitHub:
#400

@asapostolov
Copy link
Contributor Author

Do you mean I cannot run two instances of raven - one 287 and one 499 on the same server? What do you mean with share the same folder? Actualy I have 287 and 499 started on my local machine and everything's fine.

@ravendb
Copy link
Collaborator

ravendb commented Nov 12, 2011

You can run them on the same machine, but you can't have them sharing the
same folder.
You can't run any two instances of ravendb against the same folder at once,
actually.
The error indicate some sort of permission / locking issue, so check that
you are running RavenDB with a user that actually have write permissions
there.

On Sat, Nov 12, 2011 at 2:55 AM, asapostolov <
reply@reply.github.com

wrote:

Do you mean I cannot run two instances of raven - one 287 and one 499 on
the same server? What do you mean with share the same folder? Actualy I
have 287 and 499 started on my local machine and everything's fine.


Reply to this email directly or view it on GitHub:
#400 (comment)

@asapostolov
Copy link
Contributor Author

Do I have to have the write permission for /Data/ or for the path C:/Work/ and C:/Build/. What are those paths for anyways(I know what /Data/ is for)?

Update:
I checked the file access permissions and they're fine for the /Data/ directory.

@ravendb
Copy link
Collaborator

ravendb commented Nov 14, 2011

You have to have permissions for the Data folder, the work and build
folders are for the pdb sources, and aren't relevant.

On Mon, Nov 14, 2011 at 3:57 AM, asapostolov <
reply@reply.github.com

wrote:

Do I have to have the write permission for /Data/ or for the path C:/Work/
and C:/Build/. What are those paths for anyways(I know what /Data/ is for)?


Reply to this email directly or view it on GitHub:
#400 (comment)

@asapostolov
Copy link
Contributor Author

The read/write permissions are fine to /Data/, and the Code Access setting is set to full. I the strange is that I have the 287 build running on Another Directory at the same server and everything is fine. Any other ideas?

@ravendb
Copy link
Collaborator

ravendb commented Nov 14, 2011

No, that is really strange, check to see that you don't have an AV or
something like that locking the files.

On Mon, Nov 14, 2011 at 10:11 AM, asapostolov <
reply@reply.github.com

wrote:

The read/write permissions are fine to /Data/, and the Code Access setting
is set to full. I the strange is that I have the 287 build running on
Another Directory at the same server and everything is fine. Any other
ideas?


Reply to this email directly or view it on GitHub:
#400 (comment)

@asapostolov
Copy link
Contributor Author

pff I tried with the latest version also and nothing's happening

I may fall back to the older version of raven because of this hosting provider.
Or I may change the hosting provider.

Thanks for the help anyways.

@asapostolov
Copy link
Contributor Author

I ended up changing the hosting provider and everything's fine now.

Thanks for all the help, Ayende!

@ravendb
Copy link
Collaborator

ravendb commented Dec 1, 2011

What hosting provider did you end up using?

On Thursday, December 1, 2011, asapostolov <
reply@reply.github.com>
wrote:

I ended up changing the hosting provider and everything's fine now.

Thanks for all the help, Ayende!


Reply to this email directly or view it on GitHub:
#400 (comment)

@asapostolov
Copy link
Contributor Author

http://www.dotnet-host.com/

Nice control panel and overall support from them. I'm just at beta stage now so I don't have data for larger load scenarios, but the configuration panel and settings they provide is all I need for now.

I'm curious - which hosting provider do you use?

@ravendb
Copy link
Collaborator

ravendb commented Dec 4, 2011

We are using GoGrid

On Fri, Dec 2, 2011 at 10:34 AM, asapostolov <
reply@reply.github.com

wrote:

http://www.dotnet-host.com/

Nice control panel and overall support from them. I'm just at beta stage
now so I don't have data for larger load scenarios, but the configuration
panel and settings they provide is all I need for now.

I'm curious - which hosting provider do you use?


Reply to this email directly or view it on GitHub:
#400 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant