The Nolio Update Service, which by default runs on the same server as the NAC/datamanagement server, throws errors and fails to connect to the database in our RA implementation.
The service runs, but in the update-service.log is the following errors:
2018-11-25 13:01:18,670 INFO (DatabaseManager.java:78) - Parsed file D:\CA\nolio_01\LISAReleaseAutomationServer/webapps/datamanagement/WEB-INF/database.properties
2018-11-25 13:01:18,678 INFO (DatabaseManager.java:94) - Parsed file D:\CA\nolio_01\LISAReleaseAutomationServer/webapps/datamanagement/WEB-INF/distributed.properties
2018-11-25 13:01:20,485 INFO (Launcher.java:126) - Wait until prerequisites are ready.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.<init>(String.java:196)
at com.ca.nolio.actions.upgrader.controller.DatabaseManager.<init>(DatabaseManager.java:56)
at com.nolio.platform.launcher.Launcher.checkPrerequisites(Launcher.java:121)
at com.nolio.platform.launcher.Launcher.main(Launcher.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)
2018-11-25 13:01:30,628 INFO (Launcher.java:126) - Wait until prerequisites are ready.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.<init>(String.java:196)
at com.ca.nolio.actions.upgrader.controller.DatabaseManager.<init>(DatabaseManager.java:56)
at com.nolio.platform.launcher.Launcher.checkPrerequisites(Launcher.java:121)
at com.nolio.platform.launcher.Launcher.main(Launcher.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)
2018-11-25 13:01:40,684 INFO (Launcher.java:126) - Wait until prerequisites are ready.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.<init>(String.java:196)
at com.ca.nolio.actions.upgrader.controller.DatabaseManager.<init>(DatabaseManager.java:56)
at com.nolio.platform.launcher.Launcher.checkPrerequisites(Launcher.java:121)
at com.nolio.platform.launcher.Launcher.main(Launcher.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)
It looks like this is an issue with an empty value specified in the database connections in distributed properties file. For our MS SQL database connection we use integratedSecurity=true, i.e. in database.properties file
database.jdbc.url = jdbc:sqlserver://${data.management.database.host}:${data.management.database.port};databaseName=${data.management.database.name};integratedSecurity=true;loginTimeout=60
And the windows service which runs the NAC/datamanagement server is setup to run as an AD account which has read/write permission on the MS SQL database for Nolio. In distributed.properties we have the following empty entries for the database user and password properties:
data.management.database.user =
data.management.database.pwd =
Nolio/RA runs fine with the setup like this with integrated account authentication, it is just the Update Service which throws these errors.
Is there anyway around this?
Hi,
I tried similar configuration.
- database.properties
- distributed.properties
- Service logon account is Windows user instead of Local System Account. (AD is not existed, so 'srvadmin' is local account.)
- Configured srvadmin for SQL Server.
Role:
User mapping:
However, no errors when "Nolio Update Service" is started in update_service.log.
I checked the behavior right after parsing *.properties files.
1. Connect database.
2. Run a query - "select * from version_table" internally.
When database cannot be accessed or query result is nothing/incorrect, your error was reproduced.
For example, unset user mapping and sysadmin role, and then following logs were recorded. (In this case, database cannot be accessed properly.)
Please check SQL Server configuration for your AD account. If there are any differences from my configuration, please share them.
Thanks
Yas