Release Automation

Expand all | Collapse all

Nolio Update Service doesn't support MS SQL database connection with integratedSecurity=true

Jump to Best Answer
  • 1.  Nolio Update Service doesn't support MS SQL database connection with integratedSecurity=true

    Posted 01-17-2019 05:20 PM

    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?



  • 2.  Re: Nolio Update Service doesn't support MS SQL database connection with integratedSecurity=true
    Best Answer

    Posted 01-22-2019 03:13 AM

    Hi,

     

    I tried similar configuration.

     

    - database.properties

    hibernate.dialect = com.nolio.platform.server.dataservices.NolioMSSQLDialect
    hibernate.dialect.class = com.nolio.platform.server.dataservices.NolioMSSQLDialect
    driver.class.name = com.microsoft.sqlserver.jdbc.SQLServerDriver
    database.jdbc.url = jdbc:sqlserver://${data.management.database.host}:${data.management.database.port};databaseName=${data.management.database.name};integratedSecurity=true;loginTimeout=60

     

    - distributed.properties

    data.management.database.host = rawin
    data.management.database.port = 1433
    data.management.database.name = nolio
    data.management.database.user =
    data.management.database.pwd =
    data.management.database.create = false

     

    - 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.

    2019-01-22 16:25:15,584 INFO (DatabaseManager.java:78) - Parsed file C:\Program Files\CA\ReleaseAutomationServer/webapps/datamanagement/WEB-INF/database.properties
    2019-01-22 16:25:15,601 INFO (DatabaseManager.java:94) - Parsed file C:\Program Files\CA\ReleaseAutomationServer/webapps/datamanagement/WEB-INF/distributed.properties
    2019-01-22 16:25:18,803 INFO (Launcher.java:263) - Port 8083 is available.
    2019-01-22 16:25:18,837 INFO (PollUpdate.java:309) - ----------current version----------6.6.0.9640----------
    2019-01-22 16:25:18,837 INFO (PollUpdate.java:328) - ----------current version----------6.6.0.9640----------
    2019-01-22 16:25:18,837 INFO (PollUpdate.java:329) - start ftp://ftp.ca.com/pub/dpm/ReleaseAutomation/UpdateService//up.xml
    2019-01-22 16:25:18,837 INFO (PollUpdate.java:498) - Cannot parse the ftp address from URL.ini, will use the default server : ftp.ca.com
    2019-01-22 16:25:18,837 INFO (PollUpdate.java:518) - Cannot parse the ftp port from URL.ini, will use the default port : 21
    2019-01-22 16:25:21,398 INFO (PollUpdate.java:540) - remote ftp file: /pub/dpm/ReleaseAutomation/UpdateService//up.xml
    2019-01-22 16:25:22,791 INFO (PollUpdate.java:547) - Ftp File ftp://ftp.ca.com/pub/dpm/ReleaseAutomation/UpdateService//up.xml has been downloaded successfully.

     

    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.)

     

    2019-01-22 17:08:07,089 INFO (DatabaseManager.java:78) - Parsed file C:\Program Files\CA\ReleaseAutomationServer/webapps/datamanagement/WEB-INF/database.properties
    2019-01-22 17:08:07,089 INFO (DatabaseManager.java:94) - Parsed file C:\Program Files\CA\ReleaseAutomationServer/webapps/datamanagement/WEB-INF/distributed.properties
    2019-01-22 17:08:07,933 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)

     

    Please check SQL Server configuration for your AD account. If there are any differences from my configuration, please share them.

     

    Thanks

    Yas



  • 3.  Re: Nolio Update Service doesn't support MS SQL database connection with integratedSecurity=true

    Posted 01-22-2019 02:13 PM

    Thanks for the detailed response. Double checking the windows service and it wasn’t running as the account that I thought it was, I changed it to the correct account, which has access to the database, and then my error is resolved and the service starts up without errors.

     

    I’ve still got a problem that I can’t access the ca ftp site from the servers running RA because of company network restrictions, however, I can work around this by manually copying the action pack content to a local folder on the server and updating the URL.ini file to point to local location:

    CA_URL=file\:///D\:/CA/ReleaseAutomation/UpdateService

    CA_PACK_URL=file\:///D\:/CA/ReleaseAutomationActions/ActionPacks

     

    I notice that the version of Update Service in your log is much later than the version I have, how do I get the latest version? I couldn't see it on the Products Download Centre.



  • 4.  Re: Nolio Update Service doesn't support MS SQL database connection with integratedSecurity=true

    Posted 01-22-2019 10:31 PM

    Hi Luke,

     

    I'm happy to resolve your problem.

     

    I verified the solution on RA 6.6. 

    Search "Release Automation" in Download Management on support.ca.com, and then I believe you can find release 6.6. RA 6.6 was GA on 01/May/2018.

     

     

    Thanks

    Yas



  • 5.  Re: Nolio Update Service doesn't support MS SQL database connection with integratedSecurity=true

    Posted 01-24-2019 09:27 PM

    Hi,

     

    I'd like to share my experience of RA 6.6.

    After upgrade RA to 6.6, you may see garbled window titles or labels of dashboard.

    This defect is known problem and fixed with 6.6.0.b10059. I recommend to download and apply it.

    CA Release Automation Solutions & Patches - CA Technologies 

     

    Thanks

    Yas