Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
BuildMaster web service fails to start - FileNotFoundException
-
I installed BuildMaster to a new virtual machine running Windows 10 (also tried 7 with same results) and was able to deploy a build without issue.
However, after rebooting the machine, I can no longer access the BuildMaster web interface, and the BuildMaster web service starts, then stops almost immediately.
The Event Log shows the following entries:
--- Entry 1 ---
Application: bmservice.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileNotFoundException Stack: at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError) at System.Web.Hosting.HostingEnvironment.CreateInstance(String assemblyQualifiedName) at System.Web.Hosting.HostingEnvironment.CreateInstance(System.String) at System.Web.Hosting.ApplicationHost.CreateApplicationHost(System.Type, System.String, System.String) at Inedo.Web.Server.IntegratedServer.ProcessRequests() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart()
--- Entry 1 End ---
--- Entry 2 ---
Faulting application name: bmservice.exe, version: 4.6.2.0, time stamp: 0x5501acda Faulting module name: KERNELBASE.dll, version: 10.0.9926.0, time stamp: 0x54bde7ee Exception code: 0xe0434352 Fault offset: 0x0000000000014838 Faulting process id: 0x354 Faulting application start time: 0x01d064524c698168 Faulting application path: C:\BuildMaster\Service\bmservice.exe Faulting module path: C:\WINDOWS\system32\KERNELBASE.dll Report Id: 8b89a1bd-d045-11e4-95dc-000c297f2231 Faulting package full name: Faulting package-relative application ID:
--- Entry 2 End ---
Running the service interactively as administrator allows both services to start normally, and I can access the BuildMaster web interface. Running as an unprivileged user generates the following exception:
Unhandled Exception: System.Net.HttpListenerException (0x80004005): Access is denied Server stack trace: at System.Net.HttpListener.AddAllPrefixes() at System.Net.HttpListener.Start() at Inedo.Web.Server.HttpListenerHost.Start(WebServerConfiguration settings) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Inedo.Web.Server.HttpListenerHost.Start(WebServerConfiguration settings) at Inedo.Web.Server.IntegratedServer.ProcessRequests() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, B oolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Unhandled Exception: System.Net.HttpListenerException: Access is denied
Product: BuildMaster
Version: 4.6.2
-
This error can be caused when the account hosting the web application is not an administrator and does not have a URL reservation. You can check this by running bmservice.exe in the Service install subdirectory, and selecting the
ListReservations
option. To reserve the URLs, choose theReserveURLs
option.
-
OK, I ran the
ListReservations
option and the output is below:All URL reservations on WIN-1REPKSPS192: http://*:5357/ (NT AUTHORITY\LOCAL SERVICE, BUILTIN\Users) http://+:80/Temporary_Listen_Addresses/ (\Everyone) https://+:5986/wsman/ (NT SERVICE\Wecsvc, NT SERVICE\WinRM) http://+:5985/wsman/ (NT SERVICE\Wecsvc, NT SERVICE\WinRM) https://*:5358/ (NT AUTHORITY\LOCAL SERVICE, BUILTIN\Users) http://*:2869/ (NT AUTHORITY\LOCAL SERVICE) http://+:47001/wsman/ (NT SERVICE\Wecsvc, NT SERVICE\WinRM) https://+:443/sra_{BA195980-CD49-458b-9E23-C84EE0ADCD75}/ (NT AUTHORITY\SYSTEM, BUILTIN\Administrators, NT SERVICE\SstpSvc) https://+:10245/WMPNSSv4/ (NT SERVICE\WMPNetworkSvc) http://+:10243/WMPNSSv4/ (NT SERVICE\WMPNetworkSvc) http://+:10246/MDEServer/ (NT AUTHORITY\Authenticated Users) http://+:80/0131501b-d67f-491b-9a40-c4bf27bcb4d4/ (NT AUTHORITY\NETWORK SERVICE) https://+:443/C574AC30-5794-4AEE-B1BB-6651C5315029/ (NT AUTHORITY\NETWORK SERVICE) http://+:80/116B50EB-ECE2-41ac-8429-9F9E963361B7/ (NT AUTHORITY\NETWORK SERVICE)
I'm not sure whether to create a new reservation or reserve one of these. If I should add a new reservation, I'm not sure what the format is.
I appreciate your help.
-
Here is how you can reserve a url for this -- http://inedo.com/support/kb/1014
Note that if you run the service as LOCAL SYSTEM, this will be unnecessary.
-
Thanks, I found that KB article about 5 minutes after my post - I should have googled it before :)
I added the reservation http://localhost:81/ (NT Authority\SYSTEM), which, as you suggest, should be unnecessary as the service was installed and run as LocalSystem.
After I added the reservation, I rebooted and attempted to launch BuilMaster again. The services were running, however I received an HTTP 503 error.
After stopping and restarting the services, the Event Log recorded the following error in addition to the two posted in my first post:
The description for Event ID 1325 from source ASP.NET 4.0.30319.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: An unhandled exception occurred and the process was terminated. Application ID: bmservice.exe Process ID: 2324 Exception: System.IO.FileNotFoundException Message: Could not load file or assembly 'InedoLib, Version=183.1.0.0, Culture=neutral, PublicKeyToken=112cfb71329714a6' or one of its dependencies. The system cannot find the file specified. StackTrace: at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError) at System.Web.Hosting.HostingEnvironment.CreateInstance(String assemblyQualifiedName) at System.Web.Hosting.HostingEnvironment.CreateInstance(String assemblyQualifiedName) at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, String virtualDir, String physicalDir) at Inedo.Web.Server.IntegratedServer.ProcessRequests() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
-
Are you sure it's LOCAL SYSTEM, and not LOCAL SERVICE? That will often cause this error (due to some really low privileges).
Otherwise, it's a really bizarre error; I'm not sure how that'd be possible, unless there was a failed upgrade or something, and some of the files went missing...
Perhaps try removing and then reinstalling. Just to make sure all the files are latest, etc.
-
I uninstalled and reinstalled BuildMaster, however now I cannot install due to an SQL Server Express error. I've copied a snippet of the log below (full log is available if needed):
Debug: Product = BuildMaster (4.6.2.7) Debug: OS = Microsoft Windows NT 6.2.9200.0 Debug: Edition = Express Debug: TargetPath = C:\BuildMaster Debug: WebAppPath = C:\BuildMaster\WebApp Debug: ServicePath = C:\BuildMaster\Service Debug: ExtensionsPath = C:\BuildMaster\Extensions Debug: ArtifactsPath = C:\BuildMaster\Artifacts Debug: WebTempPath = C:\BuildMaster\_WEBTMP Debug: ServiceTempPath = C:\BuildMaster\_SVCTMP Debug: ConnectionString = Data Source=localhost\BuildMaster; Initial Catalog=BuildMaster; Integrated Security=True; Debug: ServiceConnectionString = Data Source=localhost\BuildMaster; Initial Catalog=BuildMaster; Integrated Security=True; Debug: WebConnectionString = Data Source=localhost\BuildMaster; Initial Catalog=BuildMaster; Integrated Security=True; Debug: Port = 81 Debug: UseIntegratedWebServer = True Debug: WebServerPrefixes = http://*:81/ Debug: InstallSqlExpress = True Debug: UserAccount = LocalSystem Debug: WebAppUserAccount = LocalSystem Debug: ServiceUserAccount = LocalSystem Debug: LicenseKeys = Debug: EmailAddress = email@domain.com Debug: FullName = Full Name Debug: ConfigureIIS = False Debug: BackupDatabase = True Debug: DatabaseBackupPath = C:\BuildMaster\Backups Debug: LogFile = C:\Users\Username\AppData\Local\Temp\tmp9A5B.tmp.txt Debug: Upgrade = False Information: Unpacking SQL Express installer... <snip> Information: Checking for database and creating if necessary... Warning: SQL Server installation cannot be automatically rolled back. To remove it, go to Installed Programs in the control panel. Error: System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover, SqlAuthenticationMethod authType) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at Inedo.BuildMaster.Setup.InstallBuildMasterTask.CheckCreateDB() at Inedo.BuildMaster.Setup.InstallBuildMasterTask.Install() at Inedo.Installer.InstallationTask`1.Inedo.Installer.IInstallationTask.RunInternal() ClientConnectionId:00000000-0000-0000-0000-000000000000 Error Number:-1,State:0,Class:20
-
Hi there,
The specific error is A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
It sounds like the SQL Server didn't start or wasn't started; you may try installing SQL Server first, make sure that's running, then run BUildMaster. You can downloaf the free express edition of SQL Express from Microsoft.
-
Hi Alana,
I have tried uninstalling and re-installing BuildMaster with and without SQL Server, and received the same error message.
I will try installing the latest version of SQL Server Express and see how that goes.
-
I had the same issue,
Resolved by uninstalling sql server 2005 ,restarting the machine and reinstalling buildmaster as admin