You can save the configuration of an application server to an xml file via actions Create Config Setup File, but I can’t see how to use this to create a new environment? I’ve edited the xml to create a modified copy of an existing app server but now, how/where can I use it?
Interesting. I’m used to clicking on this button with the ‘…’ and getting a list of applications servers whose XML files are in the config folder and then registering them.
Take a look at the administration tools cli. Personally I have had limited success with trying it that way. Rebuild data model and start and stop app servers work well through the cli.
OK got a bit trigger-happy. It doesn’t work as advertised in the document (Kinetic_techrefCommandLine_2024.1.) as far as I can tell.
The xml it reads is different to what it saves, this generates the template:
C:\Program Files (x86)\Common Files\Epicor Software\Application Server Manager Extensions\4.2.400\SetupEnvironment> .\SetupEnvironmentui.exe -GenerateConfigTemplate="c:\temp\template.xml"
I’ve tried copying sections across from the saved config file as some major nodes looked the same (applicationServerSettings,AdminConsioleSettings,TokenAutheticationSettings,MerssageHubSettings) but the log file yields:
Got further, but now looks like the tool is designed for an older epicor : ERP10.2.1, when we have 11.2.1 (or something)
SetupEnvLogger Information: 0 : The SSRS Web Service URL is null. The system is set the default SSRS Web Portal to the same scheme/authority but change the Virtual Directory to "Reports": http://localhost/Reports.
DateTime=2024-10-01T02:38:52.6953155Z
Registry Entry Missing: HKEY_LOCAL_MACHINE\SOFTWARE\Epicor Software\ERP10.2\1\Path
Could not determine if running in Azure. Exception:
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 169.254.169.254:80
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at SetupEnvironmentUI.SetupUtils.CheckIfRunningInAzure()
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 169.254.169.254:80
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---<---
Ok after messing around with this for a bit I have got an app server being created.
What issues have I run into.
Using a Generated template file from the admin console appears to have different information/ in it as distinct from running the SetupEnvironmentUI.exe -GenerateConfigTemplate=“Templatefile.xml” This appears to have the xml for the actions whereas the EAC version does not.
The documentation for the SetupEnvironmentUI.exe is a bit convoluted, it refers to using a config file for the actions that then refers to the config file for the app server itself. I had limited luck with getting that to work in that fashion. There is also a key pair in the Create App server xml False that does not exist in the generated config. I thinks this was one of the things that was causing me errors.
In order to get more detail I used verbose logging, interestingly if you can use a different log file in the config xml actions and the actual execution of SetupEnvironmentUI.exe.
I ran into the Information: 0 : The SSRS Web Service URL is null. message. I think this is just related to my environment and for testing purposes I disabled configuring SSRS.
I also ran into the exception Could not determine if running in Azure. and it notes a specific IP address 169.254.169.254, Which I think is related to Azure. The exception does not appear to stop the installation.
The first time I ran it successfully I had the admin console open so I had to register the app server to make it appear
In summary
Used a modified batch file from the help
Ran the SetupEnvironmentUI.exe -GenerateConfigTemplate=“Templatefile.xml” to generate the template.
Compared the databases/users and credentials and updated the template with the information
Used verbose logging when running SetupEnvironmentUI.exe
Used a combined actions and appserver config xml file rather than trying to use an actions config file and a separate config file.
For me running my batch file as Admin or not made not difference, your mileage may vary.
Here’s my example.
@echo off
cd "C:\Program Files (x86)\Common Files\Epicor Software\Application Server Manager Extensions\4.3.100\SetUpEnvironment"
Echo Running CL SetupEnvironmentUI
Echo Test creating and App server Kinetic 2024.1.
REM Adjust paths, config and log file names as required
SetupEnvironmentUI.exe -configFile="C:\Test\Epicor\CommandLineTools\SetupConfigFiles\TestNewAppServer2.xml" -LogFile="C:\Test\Epicor\CommandLineTools\SetupConfigFiles\Logs\SetupEnvLogTest2.txt" -logLevel="V" -createNewLog="yes"
set returnValue=%errorlevel%
Echo Return value = %returnValue%
if %returnValue%==1 (
echo App server successfuly created.
) else (
echo App server creation failed.
)
Pause
Don’t forget the app server in the second step, you need the DB first… You can use the Db management cli tools to create and register a db.
Glad I went through this I can now create an app server. I hope that helps.
I would be interested to know if anyone knew what the /dev or /devmode does? I am wondering if it’s for allowing you to use the admin console ui to create a config file instead of editing the xml…
Thanks @Hally . I got to a similar file, but it was throwing the error about a missing ERP10.2 registry key, not surprising to me as we are on ERP11.2 . Looks like you are on 11.3; maybe they updated/fixed the tool.
I’m running setupEnvironmentUI from C:\Program Files (x86)\Common Files\Epicor Software\Application Server Manager Extensions\4.2.400\SetUpEnvironment on our app server. Maybe there’s another newer version of this lurking somewhere?
What sub version are you running?
I can run it against 2023.2.6 tonight (that’s what’s in my Lab)
I can also see the log file for the update install shows that the SetupEnvironmentUI.exe gets updated, at least for 2022.1, so it might be similar for your version.
Forgot to mention, I note that the Epicor folder on the server has further files in the updates folder related to other components. Specifically SetupEnvironmentUI. exe so check your versions between what’s installed with regards what’s in the update, perhaps the the upgrade did not deploy correctly…