microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
389 stars 248 forks source link

Windows client cloud not create a connection to the server #23

Closed elweilando closed 7 years ago

elweilando commented 7 years ago

I try to start a container with these settings

$containerName = "navtest"
$imageName = "microsoft/dynamics-nav:2016" 
$licenseFile = "Dev_2016_6318609.flf"

New-CSideDevContainer -accept_eula `
    -containerName $containerName `
    -imageName $imageName `
    -licenseFile $licenseFile `
    -doNotExportObjectsToText `
    -updateHosts 

After the two credentials prompts

bildschirmfoto 2017-11-14 um 09 51 23 bildschirmfoto 2017-11-14 um 09 51 38

container is running and reachable

bildschirmfoto 2017-11-14 um 09 58 09

Instance configuration is

key                                          value
---                                          -----
NetworkProtocol                              Default
DatabaseServer                               localhost
DatabaseInstance                             SQLEXPRESS
DatabaseName                                 CRONUS
DatabaseUserName
ProtectedDatabasePassword
EnableSqlConnectionEncryption                false
TrustSQLServerCertificate                    false
ServerInstance                               NAV
ClientServicesPort                           7046
SOAPServicesPort                             7047
ODataServicesPort                            7048
ManagementServicesPort                       7045
ManagementServicesEnabled                    true
ClientServicesEnabled                        true
ReportPDFFontEmbedding                       true
EnableSaveToWordForRdlcReports               true
EnableSaveToExcelForRdlcReports              true
EnableSaveFromReportPreview                  true
CompileBusinessApplicationAtStartup          true
SOAPServicesEnabled                          true
ODataServicesEnabled                         true
SOAPServicesSSLEnabled                       false
ODataServicesSSLEnabled                      false
PublicODataBaseUrl                           http://navtest:7048/NAV/OData
PublicSOAPBaseUrl                            http://navtest:7047/NAV/WS
PublicWebBaseUrl                             http://navtest/NAV/WebClient/
PublicWinBaseUrl                             DynamicsNAV://navtest:7046/NAV/
DefaultClient                                Web
ServicesOptionFormat                         OptionCaption
ServicesLanguage                             en-US
SOAPServicesMaxMsgSize                       1024
ServicesUseNTLMAuthentication                false
ServicesDefaultTimeZone                      UTC
ServicesDefaultCompany
ODataServicesMaxPageSize                     1000
ClientServicesOperationTimeout               MaxValue
ClientServicesProtectionLevel                EncryptAndSign
MaxConcurrentCalls                           40
ClientServicesMaxConcurrentConnections       150
ClientServicesReconnectPeriod                00:10:00
ClientServicesMaxNumberOfOrphanedConnections 20
ClientServicesCompressionThreshold           64
MetadataProviderCacheSize                    150
ClientServicesMaxUploadSize                  30
EnableDebugging                              false
DebuggingAllowed                             true
ClientServicesMaxItemsInObjectGraph          512
ClientServicesChunkSize                      28
ClientServicesProhibitedFileTypes            ade;adp;app;asp;bas;bat;chm;cmd;com;cpl;csh;exe;fxp;gadget;hlp;hta;inf;...
NASServicesStartupCodeunit
NASServicesRunWithAdminRights                false
NASServicesStartupMethod
NASServicesStartupArgument
NASServicesEnableDebugging                   false
ClientServicesCredentialType                 Windows
UIElementRemovalOption                       LicenseFileAndUserPermissions
ClientServicesTokenSigningKey
ClientServicesFederationMetadataLocation
AppIdUri
ServicesCertificateThumbprint
ServicesCertificateValidationEnabled         true
EnableSoftwareQualityMetrics                 false
DataCacheSize                                9
SessionEventTableRetainPeriod                3
SqlCommandTimeout                            00:30:00
BufferedInsertEnabled                        true
DisableSmartSql                              false
DocumentServicesProvider                     SHAREPOINTONLINE
EnableFullALFunctionTracing                  false
Multitenant                                  false
CloseInactiveSqlConnectionsGeneration        10
EnableALServerFileAccess                     true
EnableApplicationChannelLog                  true
EncryptionProvider                           LocalKeyFile
MaxRowsToExportToExcel                       MaxValue
ClientServicesKeepAliveInterval              00:02:00
UseSimplifiedFilters                         false
ExtendedSecurityTokenLifetime                0
MaxStreamReadSize                            1000000
EnableStaticAssemblies                       False
EnableThreadThrottling                       False
ClientServicesIdleClientTimeout              MaxValue
OrphanedConnectionPurgePeriod                00:01:00
Binding
UseQueryForFind                              False
SqlParametersByOrdinal                       True
SqlConnectionTimeout                         0:01:30
SqlBulkImportBatchSize                       400
SessionEventTablePurgeLookupPeriod           24:00:00
CacheSynchronizationPeriod                   0:00:30
HeartbeatPeriod                              0:00:30
ResultSetGroupCacheUsesGlobalCache           True
UseCalculatedFieldsCache                     True
UseResultSetCache                            True
EnableTempTableSizeReporting                 False
ClientBuildRestriction                       WarnClient
DisableDataCache                             False
WildcardEvaluationTimeout                    0:00:05
EnableODataStrictFiltering                   True
TraceLevel                                   Normal
AzureKeyVaultClientId                        00000000-0000-0000-0000-000000000000
AzureKeyVaultClientCertificateStoreLocation  LocalMachine
AzureKeyVaultClientCertificateStoreName      My
AzureKeyVaultClientCertificateThumbprint
AzureKeyVaultKeyUri
TenantDetectionMaxRetryCount                 12
TenantMaxPollCountPerCycle                   10
WritePermissionErrorsToEventLog              False

But if I try to start the windows client I get the message that the program cloud not create a connection to the server.

bildschirmfoto 2017-11-14 um 10 16 38

With CSIDE I can connect to the SQL. The Web client answers, but I can't login with the defined credentials.

It's a fresh Windows 2016 Server installation. Firewall is deactivated. If I try to deactivate the firewall on the instance I get

bildschirmfoto 2017-11-14 um 10 19 42

Docker Version

Client:
 Version:      17.06.2-
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   508bb92
 Built:        Thu Nov
 OS/Arch:      windows/

Server:
 Version:      17.06.2-
 API version:  1.30 (mi
 Go version:   go1.8.3
 Git commit:   508bb92
 Built:        Thu Nov
 OS/Arch:      windows/
 Experimental: false

docker info

Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 17.06.2-ee-5
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat
 Log: awslogs etwlogs fluentd js
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (1439
Operating System: Windows Server
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 8.979GiB
Name: ELC3F9
ID: BKKZ:W3PQ:LQDR:Z6E7:HDOX:IDB
Docker Root Dir: C:\ProgramData\
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.i
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
freddydk commented 7 years ago

You are starting the container with Windows Authentication - meaning that you need to provide the same credentials to the container when setting it up, as you use to login to the host. Else, you should add -auth NavUserPassword to the new-csidedevcontainer

elweilando commented 7 years ago

I provided the same credentials.

The issue was, that the GPO for password complexity was deactivated on my machine - but activated on the container per default.

With an simple password on the machine, the login on the container was not valid. I changed the password on the machine to default complexity requirements and now it works.