• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • dimensionsscm-plugin
    • None
    • Jenkins 2.401.3, Dimensions Plugin Version 0.9.3.1, Windows 10, Chrome. Dimensions CM 14.5.3 Build 9.245

      I cannot run a test job successfully which is intended to fetch a Project / Stream from Dimensions. This means we cannot use Jenkins with Dimensions on our site. The credentials used are username / password. The "Check Connection" button works as expected. I can successfully login to Dimensions from the agent using dmcli and the same details. One thing I notice is that dmcli doesn't seem to accept a combined dbname using both <bdname>@<dsn>. Also the Dimensions server has a non-standard port. 

      [WS-CLEANUP] Deferred wipeout is used...
      [DIMENSIONS] Running checkout on slave...
      [DIMENSIONS] Running build in 'C:\<Folder>\jenkins\prod\workspace\Dev\test-dimension-plugin'...
      [DIMENSIONS] Located 'C:\Program Files (x86)\Micro Focus\Dimensions 14.5.3\CM\prog\dmcli.exe' on the slave node.
      [DIMENSIONS] Checking out a fresh workspace because this project has not been built before...
      [DIMENSIONS] Removing 'file:/C:/<Folder>/jenkins/prod/workspace/Dev/test-dimension-plugin/'...
      [DIMENSIONS] Checking out project "<PRODUCT_ID>:<PROJECT_NAME>"...
      [DIMENSIONS] Checking out directory '\'...
      [test-dimension-plugin] $ "C:\Program Files (x86)\Micro Focus\Dimensions 14.5.3\CM\prog\dmcli.exe" ******** ******** -file C:\<Folder>\temp\dmCm16950211334196070330859975400009.tmp
      FATAL: Execution of Dimensions command failed with exit code 1
      [DIMENSIONS] (Note: Dimensions command output was - 
      
      [DIMENSIONS] ACL4502922E Error: Cannot open connection to host <dimensions-host>
      [DIMENSIONS] 
      [DIMENSIONS] Failed to start Dimensions server process
      [DIMENSIONS] )
      [DIMENSIONS] Calculating changes for directory '\'...
      [EnvInject] - Mask passwords that will be passed as build parameters.
      

      Turning on the debug logging shows the following. Perhaps it thinks logon has been successful even though it wasn't?

      Sep 18, 2023 3:23:45 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM checkout
      Invoking checkout - hudson.plugins.dimensionsscm.DimensionsSCM
      Sep 18, 2023 3:23:45 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM checkout
      Plugins are ok
      Sep 18, 2023 3:23:45 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      DimensionsAPI.login - build number: "45", project: "test-dimension-plugin"
      Sep 18, 2023 3:23:45 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Checking Dimensions login parameters...
      Sep 18, 2023 3:23:45 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Logging into Dimensions: <userid> <url>:<port> <dbname>@<dsn>
      Sep 18, 2023 3:23:45 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Getting Dimensions connection...
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Connection map key is 12
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Connection map size before putIfAbsent is 0
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Connection map size after putIfAbsent is 1
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
        key: "12"
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM checkout
      Login worked.
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI logout
      DimensionsAPI.logout - build number: "45", project: "test-dimension-plugin"
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI getCon
      Looking for key 12
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI getCon
      Found database
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI logout
      Closing connection to Dimensions for key "12"...
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI logout
      Now have 0 connections in use...
      Sep 18, 2023 3:23:48 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM checkout
      Forced processing as slave...
      Sep 18, 2023 3:23:50 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM generateChangeSet
      Job timezone setting is GMT
      Sep 18, 2023 3:23:50 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM generateChangeSet
      Log updates between 2023-09-18T12:45:12Z -> 2023-09-18T14:23:50Z (GMT)
      Sep 18, 2023 3:23:50 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      DimensionsAPI.login - build number: "45", project: "test-dimension-plugin"
      Sep 18, 2023 3:23:50 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Checking Dimensions login parameters...
      Sep 18, 2023 3:23:50 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Logging into Dimensions: <userid> <url>:<port> <dbname>@<dsn>
      Sep 18, 2023 3:23:50 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Getting Dimensions connection...
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Connection map key is 13
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Connection map size before putIfAbsent is 0
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Connection map size after putIfAbsent is 1
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Server information detected -3
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      0 - 14.5.3
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      1 - 2
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      2 - 14.5.3 Build 9.245
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Detected server version: 14.5.3 Build 9.245
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
      Version to process set to 2009
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI login
        key: "13"
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM generateChangeSet
      Login worked.
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM generateChangeSet
      Extra parameters - null null
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM generateChangeSet
      Looking for changes in '/'...
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI getCon
      Looking for key 13
      Sep 18, 2023 3:23:51 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI getCon
      Found database
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI getItemRevisionByFilter
      Caught exception
      merant.adm.dimensions.exception.DBIOException: Error: failed to query database. (DBIOThruRPC.readStart: LCNetClnt.rpcDBreadStart() failed)
      	at merant.adm.dimensions.server.dbio.DBIOViaSQ.readStart(DBIOViaSQ.java:215)
      	at merant.adm.dimensions.server.dbio.DBIO.readStart(DBIO.java:431)
      	at merant.adm.dimensions.server.query.DariusSuperQueryImpl.readStart(DariusSuperQueryImpl.java:1139)
      	at merant.adm.dimensions.server.query.DariusSuperQueryImpl.readStart(DariusSuperQueryImpl.java:1150)
      	at merant.adm.dimensions.server.query.SuperQuery.readStart(SuperQuery.java:264)
      	at merant.adm.dimensions.cmds.relatable.QueryRelsCmd.queryRelations(QueryRelsCmd.java:422)
      	at merant.adm.dimensions.cmds.relatable.QueryRelsCmd.staticExecute(QueryRelsCmd.java:285)
      	at merant.adm.dimensions.cmds.relatable.QueryRelsCmd.internalExecute(QueryRelsCmd.java:529)
      	at merant.adm.dimensions.cmds.relatable.QueryRelsCmd.execute(QueryRelsCmd.java:138)
      	at merant.adm.dimensions.cmds.relatable.QueryChildrenCmd.execute(QueryChildrenCmd.java:272)
      	at com.serena.dmclient.api.DariusObjectImpl.queryDariusChildWithRelationship(DariusObjectImpl.java:788)
      	at com.serena.dmclient.api.DariusObjectImpl.getDariusChildObjects(DariusObjectImpl.java:827)
      	at com.serena.dmclient.api.DariusObjectImpl.getChildItems(DariusObjectImpl.java:1626)
      Caused: com.serena.dmclient.api.DimensionsRuntimeException: Error: failed to query database. (DBIOThruRPC.readStart: LCNetClnt.rpcDBreadStart() failed)
      	at com.serena.dmclient.api.ExceptionHandler.convertException(ExceptionHandler.java:66)
      	at com.serena.dmclient.api.ExceptionHandler.handleException(ExceptionHandler.java:40)
      	at com.serena.dmclient.api.DariusObjectImpl.getChildItems(DariusObjectImpl.java:1679)
      	at hudson.plugins.dimensionsscm.DimensionsAPI.getItemRevisionByFilter(DimensionsAPI.java:1430)
      	at hudson.plugins.dimensionsscm.DimensionsAPICallback14.saveChangesToXmlFile(DimensionsAPICallback14.java:96)
      	at hudson.plugins.dimensionsscm.DimensionsAPI.createChangeSetLogs(DimensionsAPI.java:652)
      	at hudson.plugins.dimensionsscm.DimensionsSCM.generateChangeSet(DimensionsSCM.java:855)
      	at hudson.plugins.dimensionsscm.DimensionsSCM.checkout(DimensionsSCM.java:797)
      	at hudson.scm.SCM.checkout(SCM.java:540)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1240)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:649)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:521)
      	at hudson.model.Run.execute(Run.java:1900)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      	at hudson.model.ResourceController.execute(ResourceController.java:101)
      	at hudson.model.Executor.run(Executor.java:442)
      
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPICallback14 saveChangesToXmlFile
      CM Url : https://<url>:<port>/dimensions
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPICallback14 saveChangesToXmlFile
      Writing null changes to changelog file 'D:\<folder>\jobs\Dev\jobs\test-dimension-plugin\builds\45\changelog.xml'
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsChangeLogWriter write
      Writing logfile in append mode = false
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsChangeLogWriter write
      Writing to changelog: ''
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI logout
      DimensionsAPI.logout - build number: "45", project: "test-dimension-plugin"
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI getCon
      Looking for key 13
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI getCon
      Found database
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI logout
      Closing connection to Dimensions for key "13"...
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsAPI logout
      Now have 0 connections in use...
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsSCM createChangeLogParser
      Invoking createChangeLogParser - hudson.plugins.dimensionsscm.DimensionsSCM
      Sep 18, 2023 3:23:52 PM FINE hudson.plugins.dimensionsscm.DimensionsChangeLogParser digest
      Looking for 'D:\<folder>\jobs\Dev\jobs\test-dimension-plugin\builds\45\changelog.xml'
      Sep 18, 2023 3:25:45 PM FINE hudson.plugins.dimensionsscm.DimensionsChangeLogParser digest
      Looking for 'D:\<folder>\jobs\Dev\jobs\test-dimension-plugin\builds\45\changelog.xml'
      Sep 18, 2023 3:26:20 PM FINE hudson.plugins.dimensionsscm.DimensionsChangeLogParser digest
      Looking for 'D:\<folder>\jobs\Dev\jobs\test-dimension-plugin\builds\45\changelog.xml'
      

          [JENKINS-72034] Dimensions command fails, cannot connect

          Anthony added a comment -

          I was able to grab the two temporary files that the plugin creates to use with dmcli. It appears that one is the parameter file (containing host, dbname, username and password). The other is the command file. The command file is needed to show the issue, so this means canJobUpdate must be True / use update. 

          Running these two files directly with dmcli (dmcli -param <param_file> - file <command_file>) show the same issue. "ACL4502922E Error: Cannot open connection to host <dimensions-host>"

          Anthony added a comment - I was able to grab the two temporary files that the plugin creates to use with dmcli. It appears that one is the parameter file (containing host, dbname, username and password). The other is the command file. The command file is needed to show the issue, so this means canJobUpdate must be True / use update.  Running these two files directly with dmcli (dmcli -param <param_file> - file <command_file>) show the same issue. "ACL4502922E Error: Cannot open connection to host <dimensions-host>"

          Anthony added a comment - - edited

          If I modify the parameter file and split the dbname argument, which contains both the dbname and the data source name (with @ delimiter), into -dbname and -dsn instead, it works. 

          Anthony added a comment - - edited If I modify the parameter file and split the dbname argument, which contains both the dbname and the data source name (with @ delimiter), into -dbname and -dsn instead, it works. 

          Hi en5ads, the error message ACL4502922E would normally imply that dmcli is trying to make a network connection to a hostname that exists, but is not listening on the network port specified.
          You look to have redacted the <dimensions-host> name, but you mentioned that you were using a non-standard port number.
          If the network port that Dimensions CM server is listening on is not 671, then you need to include that port number in the <dimensions-host>. For example, "myserver.example.com:675" if the listener is configured to use port 675.
          This format should be used in the Jenkins configuration forms as well as in the dmcli command line.

          David Conneely added a comment - Hi en5ads , the error message ACL4502922E would normally imply that dmcli is trying to make a network connection to a hostname that exists, but is not listening on the network port specified. You look to have redacted the <dimensions-host> name, but you mentioned that you were using a non-standard port number. If the network port that Dimensions CM server is listening on is not 671, then you need to include that port number in the <dimensions-host>. For example, "myserver.example.com:675" if the listener is configured to use port 675. This format should be used in the Jenkins configuration forms as well as in the dmcli command line.

          David Gumbrell added a comment - - edited

          Hi David,

          I work with Anthony. Thank you for your response. I don't think it is the <dimensions-host> configuration.

          We have the Dimensions Plugin config in System properties configured:

          "Server" with the port number, i.e. <host name>:<port>,

          "Database" = <dbname>@<dsn>

          And the connectivity test passes here.

          We have both "Classic" job and a Pipeline script job configured using same settings as above. 

          In the classic job configuration, under Dimensions > Credentials, we have the Server and Database properties configured as above, and again the connectivity test passes.

          In the pipeline job, pluginDatabase and pluginServer are defined as per the System configuration.

          However, both jobs fail when configured to use "Update", which seems to cause a dmcli command to be executed with the plugin using a plugin generated parameter file. The parameter file generated by the plugin does not contain separate -dbname and -dsn parameters, but instead only -dbname = <dbname>@<dsn> and fails to execute, generating the connection error.

          If we manually run dmcli with the generated command and parameter file, dmcli fails with the same error as with plugin execution.

          If we manually edit the parameter file to have separate -dbname and -dsn parameters, we can manually run dmcli with the parameter and command file successfully. 

          So we think our version of dmcli does not support a combined -dbname parameter. The documentation we have does not imply that dmcli can support a parameter file including a -dbname parameter of the form <dbname>@<dsn>, but requires separate -dbname and -dsn parameters.

          We don't know if this is a general error in the plugin parameter file generation or a compatibility error with our dmcli version, or some form of configuration error.

          dmcli reports its version as Dimensions CM 14.5.3 Build 9.245.

          and the plugin is version 0.9.3.1.

          David Gumbrell added a comment - - edited Hi David, I work with Anthony. Thank you for your response. I don't think it is the <dimensions-host> configuration. We have the Dimensions Plugin config in System properties configured: "Server" with the port number, i.e. <host name>:<port>, "Database" = <dbname>@<dsn> And the connectivity test passes here. We have both "Classic" job and a Pipeline script job configured using same settings as above.  In the classic job configuration, under Dimensions > Credentials, we have the Server and Database properties configured as above, and again the connectivity test passes. In the pipeline job, pluginDatabase and pluginServer are defined as per the System configuration. However, both jobs fail when configured to use "Update", which seems to cause a dmcli command to be executed with the plugin using a plugin generated parameter file. The parameter file generated by the plugin does not contain separate -dbname and -dsn parameters, but instead only -dbname = <dbname>@<dsn> and fails to execute, generating the connection error. If we manually run dmcli with the generated command and parameter file, dmcli fails with the same error as with plugin execution. If we manually edit the parameter file to have separate -dbname and -dsn parameters, we can manually run dmcli with the parameter and command file successfully.  So we think our version of dmcli does not support a combined -dbname parameter. The documentation we have does not imply that dmcli can support a parameter file including a -dbname parameter of the form <dbname>@<dsn>, but requires separate -dbname and -dsn parameters. We don't know if this is a general error in the plugin parameter file generation or a compatibility error with our dmcli version, or some form of configuration error. dmcli reports its version as Dimensions CM 14.5.3 Build 9.245. and the plugin is version 0.9.3.1.

          Anthony added a comment -

          Hello, 

          I was able to make a small change / hack to the java file GenericCmdTask.java from the plugin folder to split the database argument into dbname@dsn and pass that to dmcli using -dbname <dbname> -dsn <dsn>. With that change the plugin works as we expect, synchronising the files we request. 

          Anthony added a comment - Hello,  I was able to make a small change / hack to the java file GenericCmdTask.java from the plugin folder to split the database argument into dbname@dsn and pass that to dmcli using -dbname <dbname> -dsn <dsn>. With that change the plugin works as we expect, synchronising the files we request. 

            vkoshchii Viacheslav
            en5ads Anthony
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: