end*_*dri 5 netsh http.sys ravendb ravendb-http
我已经将RavenDB 2.5.0安装为Windows服务.当我尝试以管理员身份运行Raven.Server.exe时,我会收到:
Trying to revoke rights for http.sys
runas netsh http delete urlacl url=https://+:8080/
Trying to grant rights for http.sys
runas netsh http add urlacl url=http://+:8080/ user="Endri-PC\Endri"
Failed to grant rights for listening to http, exit codes: (1 and 1)
A critical error occurred while starting the server. Please see the exception de
tails bellow for more details:
System.InvalidOperationException: Could not write to location: C:\RavenDB\Databa
se\System. Make sure you have read/write permissions for this path. ---> Microso
ft.Isam.Esent.Interop.EsentFileAccessDeniedException: Cannot access file, the fi
le is locked or in use
at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGen
erator, OrderedPartCollection`1 documentCodecs)
--- End of inner exception stack trace ---
at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGen
erator, OrderedPartCollection`1 documentCodecs)
at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configura
tion, TransportState transportState)
at Raven.Server.RavenDbServer..ctor(InMemoryRavenConfiguration settings)
at Raven.Server.Program.RunServerInDebugMode(RavenConfiguration ravenConfigur
ation, Boolean launchBrowser)
at Raven.Server.Program.RunInDebugMode(Nullable`1 anonymousUserAccessMode, Ra
venConfiguration ravenConfiguration, Boolean launchBrowser, Boolean noLog)
at Raven.Server.Program.<>c__DisplayClass34.<InteractiveRun>b__1b()
at Raven.Server.Program.InteractiveRun(String[] args)
at Raven.Server.Program.Main(String[] args)
Press any key to continue...
Run Code Online (Sandbox Code Playgroud)
知道该怎么办?
小智 10
我在遵循RavenDB文档的"基本概念"部分时遇到了同样的问题,输出如下:
C:\RavenDB>Raven.Server.exe
Trying to grant rights for http.sys
runas netsh http add urlacl url=http://+:8080/ user="User-PC\User"
Failed to grant rights for listening to http, exit codes: (0 and 1)
A critical error occurred while starting the server. Please see the exception details bellow for more details:
System.InvalidOperationException: Could not write to location: C:\RavenDB\Data.
Make sure you have read/write permissions for this path. ---> Microsoft.Isam.Esent.Interop.EsentFileAccessDeniedException: Cannot access file, the file is locked or in use
<stack trace follows>
Run Code Online (Sandbox Code Playgroud)
问题是RavenDB安装程序自动启动RavenDB服务器作为Windows服务,阻止命令行Raven.Server.exe能够访问正确的目录.我刚刚打开了服务控制面板(开始菜单 - > services.msc)并停止了RavenDB服务.之后,从命令行启动Raven.Server.exe,如文档中所示.
请注意,这是在使用RavenDB 2.5.2851的开发模式下在Windows 7 x64 Professional计算机上运行.
| 归档时间: |
|
| 查看次数: |
1487 次 |
| 最近记录: |