I created a docker-compose file in Portainer to use proget, buildmaster and otter. I already had a SQL Server Express as a Linux Docker. I created the 3 databases and 3 different access to each of one.
I then started everything. The only docker that accept to run is Proget. BuildMaster and Otter refuses to start because it detect a network issue contacting SQL Server (which is not the case with Proget).
The network and environment is the same on all 3 containers.
Here's the complete docker-compose file. After is the "docker logs buildmaster" with the connection error.
docker-compose.yml
version: '3.8'
services:
proget:
image: proget.inedo.com/productimages/inedo/proget:latest
container_name: proget
restart: unless-stopped
environment:
- SQL_CONNECTION_STRING=Data Source=mssql; Initial Catalog=ProGet; User ID=proget; Password='MyPassWord!!'; MultipleActiveResultSets=true
- TZ=America/Toronto
networks:
- nginx-proxy
- databases
volumes:
- /opt/docker/data/proget-packages:/var/proget/packages
buildmaster:
image: proget.inedo.com/productimages/inedo/buildmaster:latest
container_name: buildmaster
restart: unless-stopped
environment:
- SQL_CONNECTION_STRING=Data Source=mssql; Initial Catalog=BuildMaster; User ID=buildmaster; Password='MyPassWord!!';
- TZ=America/Toronto
networks:
- nginx-proxy
- databases
volumes:
- /opt/docker/data/buildmaster-artifacts:/var/buildmaster/artifacts
otter:
image: proget.inedo.com/productimages/inedo/otter:latest
container_name: otter
restart: unless-stopped
environment:
- SQL_CONNECTION_STRING=Data Source=mssql; Initial Catalog=Otter; User ID=otter; Password='MyPassWord!!';
- TZ=America/Toronto
networks:
- nginx-proxy
- databases
networks:
nginx-proxy:
external: true
databases:
external: true
docker logs buildmaster
BuildMaster version is 22.0.3.8.
Current DB schema version is unknown.
Unhandled exception: Microsoft.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: TCP Provider, error: 35 - An internal exception was caught)
---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000001, 11): Resource temporarily unavailable
at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, ValueStopwatch stopwatch)
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress, AddressFamily family)
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
at Microsoft.Data.SqlClient.SNI.SNICommon.GetDnsIpAddresses(String serverName)
at Microsoft.Data.SqlClient.SNI.SNITCPHandle.Connect(String serverName, Int32 port, TimeSpan timeout, Boolean isInfiniteTimeout, SqlConnectionIPAddressPreference ipPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo)
at Microsoft.Data.SqlClient.SNI.SNITCPHandle..ctor(String serverName, Int32 port, Int64 timerExpire, Boolean parallel, SqlConnectionIPAddressPreference ipPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo, Boolean tlsFirst, String hostNameInCertificate)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry, SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open(SqlConnectionOverrides overrides)
at Microsoft.Data.SqlClient.SqlConnection.Open()
at Inedo.DbUpdater.SqlServer.SqlServerDatabaseConnection.GetConnection()
at Inedo.DbUpdater.SqlServer.SqlServerDatabaseConnection.ExecuteTable[TResult](String query, Func`2 adapter, SqlTransaction transaction, SqlParameter[] args)
at Inedo.DbUpdater.SqlServer.SqlServerDatabaseConnection.GetChangeScriptVersion(SqlTransaction transaction)
at Inedo.DbUpdater.SqlServer.SqlServerDatabaseConnection.GetState()
at Inedo.DbUpdater.ConsoleHost.Update(String scriptPath, String connectionString, Boolean force)
at Inedo.DbUpdater.ConsoleHost.Run(ArgList args)
at Inedo.DbUpdater.ConsoleHost.RunAsync(IEnumerable`1 args)
at Inedo.BuildMaster.Windows.ServiceApplication.Program.UpdateDatabaseSchemaAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E306669\Src\BuildMasterSolution\BuildMaster.Service\Program.cs:line 286
at Inedo.BuildMaster.Windows.ServiceApplication.Program.Run(WebServerMode mode, Boolean runAsService, Boolean linuxContainer, String nodeName) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E306669\Src\BuildMasterSolution\BuildMaster.Service\Program.cs:line 26
ClientConnectionId:00000000-0000-0000-0000-000000000000