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

Can't sync tables in dynamics-nav:2018-fr docker #54

Closed
xgaronnat opened this issue Dec 11, 2017 · 8 comments
Closed

Can't sync tables in dynamics-nav:2018-fr docker #54

xgaronnat opened this issue Dec 11, 2017 · 8 comments

Comments

@xgaronnat
Copy link

Hi,
After deploying a new doker from microsoft/dynamics-nav:2018-fr I can't sync tables (despite the Windows client is working so the NST).
...any idea ?


Microsoft Dynamics NAV Development Environment

Unable to process table changes because the Microsoft Dynamics NAV Development Environment cannot connect to the specified Microsoft Dynamics NAV Application Server instance:

Server Name: nav2018-fr-2
Server Instance: nav
Management Port: 7045

Microsoft Dynamics NAV Development Environment will automatically detect and connect to a Microsoft Dynamics NAV Server instance that is running.

Check the following:

  1. The Application Server is running
  2. The management service on the server instance is enabled and assigned a valid port.
  3. If Microsoft Dynamics NAV Development Environment connects to Microsoft Dynamics NAV Server on a remote computer, then the management services port is open in Windows Firewall of the remote computer.

OK

@freddydk
Copy link
Contributor

Please specify how you deployed the NAV Development Environment and please include docker logs for your environment

@xgaronnat
Copy link
Author

$username = 'admin'
$password = 'ZZZZZZZZZZZ'
		 
$secpasswd = ConvertTo-SecureString $password -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($username, $secpasswd)
		
New-NavContainer `
 -licenseFile 'C:\DEMO\license.flf' `
 -containerName 'Nav2018-fr-2' `
 -ImageName microsoft/dynamics-nav:2018-fr `
 -IncludeCSide `
 -Credential $mycreds `
 -memoryLimit 3G `
 -updateHosts `
 -auth NavUserPassword `
 -accept_eula `
 -Verbose 
    

Creating Nav container Nav2018-fr-2
Using image microsoft/dynamics-nav:2018-fr
Using license file C:\DEMO\license.flf
NAV Version: 11.0.19394.0-fr
Generic Tag: 0.0.4.1
Creating container Nav2018-fr-2 from image microsoft/dynamics-nav:2018-fr
Waiting for container Nav2018-fr-2 to be ready, this shouldn't take more than a few minutes
Time: ½ 1 ½ 2
...................................................................................Ready
Read CustomSettings.config from Nav2018-fr-2
Create Desktop Shortcuts for Nav2018-fr-2
Welcome to the NAV Container PowerShell prompt

Export Objects to C:\ProgramData\NavContainerHelper\Extensions\Original-11.0.19394.0-fr.txt
Split C:\ProgramData\NavContainerHelper\Extensions\Original-11.0.19394.0-fr.txt to C:\ProgramData\NavContainerHelper\Ext
ensions\Original-11.0.19394.0-fr
Export Objects (new syntax) to C:\ProgramData\NavContainerHelper\Extensions\Original-11.0.19394.0-fr-newsyntax.txt
Split C:\ProgramData\NavContainerHelper\Extensions\Original-11.0.19394.0-fr-newsyntax.txt to C:\ProgramData\NavContainer
Helper\Extensions\Original-11.0.19394.0-fr-newsyntax
Nav container Nav2018-fr-2 successfully created

@freddydk
Copy link
Contributor

I don't think you can modify tables when running NavUserPassword auth and Classic Development Environment. If you switch to Windows Auth. and remove the Credentials parameter, then the script will ask you for you Windows Credentials - that should work.

@mheijkant
Copy link

mheijkant commented Dec 12, 2017

I'm also running into this problem.
I understood from an earlier conversation we had, that I had to use -auth NavUserPassword because this was the only way to make a connection possible between a separate navision container and a separate sql container. So how can we solve this. At this moment I seem to be unable to add a windows login to the SQL container.
But compiling from Powershell using Compile-ObjectsInNavContainer seems to work, but I'd rather compile from the C-Side Client.

At this moment I'm using this script, where $Auth='NavUserPassword':

New-NavContainer -containerName $ContainerName -imageName $ImageName
-licenseFile $Licensefile -Credential $MyCredential
-memoryLimit $MemoryLimit -auth $Auth
-databaseServer $DatabaseServer -databaseName $DatabaseName
-databaseCredential $MyDatabaseCredential -shortcuts $Shortcuts
-includeCSide -updateHosts
-accept_eula -doNotExportObjectsToText
-AdditionalParameters @($AdditionalParameters) `
-myScripts @($DockerNAVScript)

@freddydk
Copy link
Contributor

If you setup gMSA (requires AD admin) then it should be possible to use "real" windows auth.
The current way is just by adding the host windows user to the container and that seems to work fine when the domain controller is in reach. Not sure why it doesn't on your machine.

@dzzzb
Copy link

dzzzb commented Aug 24, 2021

A quicker(?) solution: open Command Prompt on the Docker container, switch to PowerShell, cd to the NAV Service folder, import all *.ps* modules, then run:

Sync-NAVTenant -ServerInstance NAV -Mode Force

That sorted it for me - more tedium, but works at least! Usual disclaimers apply: adjust command to taste, be careful with Force, etc.

@freddydk
Copy link
Contributor

freddydk commented Aug 24, 2021

Thanks.

FYI using open-bccontainer, enter-bccontainer or invoke-scriptinbccontainer will auto-load all NAV PS modules.

@RITTMG
Copy link

RITTMG commented Aug 21, 2023

I don't think you can modify tables when running NavUserPassword auth and Classic Development Environment. If you switch to Windows Auth. and remove the Credentials parameter, then the script will ask you for you Windows Credentials - that should work.

Thanks a lot for the tip! I had the same issue (though with a BC14 container) and could successfully sync the objects after recreating the container to use Windows auth. :-)

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

No branches or pull requests

5 participants