IBM / zopeneditor-about

IBM Z Open Editor: File issues here!
https://ibm.github.io/zopeneditor-about
Apache License 2.0
47 stars 25 forks source link

IBM User Build - run setup for IBM User Build - An error occurred: Timed out waiting for password #355

Closed FALLAI-Denis closed 8 months ago

FALLAI-Denis commented 11 months ago

Development environment used

Problem Description

The "run setup for IBM User build" hangs on validating the password of the z/OSMF profile used.

However, the password is well saved for the profile since the copybooks are well accessed and the use of Zowe Explorer with this profile works without problem.

The feature has worked in the past and no longer works today. In the meantime there have been updates to Z Open Editor, Zowe Explorer, Zowe CLI.

Detailed steps for reproducing the problem:

  1. Setup user settings
  "zopeneditor.userbuild.enabled": true,
  "zopeneditor.userbuild.userSettings": {
    "dbbHlq": "J070188.DBB",              // prefixe des PDS créés et alimentés par le build
    "dbbDefaultZappProfile": "dbb-build", // nom du profil de type dbb déclaré dans zapp.yaml
    "dbbLogDir": "/u/J070188/dbb/logs",   // chemin USS de stockage des logs produites par le build
    "dbbWorkspace": "/u/J070188/dbb",     // chemin USS de l'espace de travail du build
    "localLogDir": ".reports"             // pour que les logs remontent dans le dossier .reports du Workspace !
  },
  1. Create dbb profile
profiles:
  - name: dbb-build
    type: dbb
    settings:
      application: CEAB3.MVPDBB
      command: groovyz
      buildScriptPath: /var/DBB/DEV/T00001-J070188-COBOL/SCRIPTS/buildBPCE.groovy
      buildScriptArgs:
        - --userBuild
        - --workspace ${zopeneditor.userbuild.userSettings.dbbWorkspace}
        - --application ${application}
        - --hlq ${zopeneditor.userbuild.userSettings.dbbHlq}.${application}"
        - --outDir ${zopeneditor.userbuild.userSettings.dbbLogDir}
        #- --dependencyFile ${dependencyFile}
      additionalDependencies:
        - application-conf
        - .build
        - "src\\**\\${buildFile}.build"
      logFilePatterns:
        - ${buildFile.basename}.log
        - BuildReport.*
  1. run setup for IBM User Build

Observed behavior

The script freezes for 10 minutes then an error message concerning the validation of the password appears.

Welcome to IBM User Build. Run User Build from the pop-up menu in an open editor with a COBOL, PL/I, or HLASM program.
Visit our IBM Docs to learn about IBM User Build here: https://www.ibm.com/docs/en/z-modernization-stack/2022.1.1?topic=code-building-cobol-pli-hlasm-programs-user-build.
2023-08-10T11:02:29.634Z: =====================
2023-08-10T11:02:29.636Z: Running setup for User Build...
2023-08-10T11:02:29.638Z: Setup will upload files or folders defined in your ZAPP file under "additionalDependencies".
2023-08-10T11:02:29.645Z: Checking dbb profile settings defined in your repository's zapp.yaml or zapp.json
2023-08-10T11:02:29.649Z: User setting dbbDefaultZappProfile: **dbb-build**
2023-08-10T11:02:29.651Z: Will read settings from ZAPP profile called dbb-build defined in User Settings
2023-08-10T11:02:29.652Z:     application: CEAB3.MVPDBB
    command: groovyz
    buildScriptArgs: --userBuild,--workspace /u/J070188/dbb,--application CEAB3.MVPDBB,--hlq J070188.DBB.CEAB3.MVPDBB",--outDir /u/J070188/dbb/logs
    buildScriptPath: /var/DBB/DEV/T00001-J070188-COBOL/SCRIPTS/buildBPCE.groovy
    additionalDependencies: application-conf,.build,src\**\S9TL1A.cbl.build
    logFilePatterns: S9TL1A.log,BuildReport.*
2023-08-10T11:02:29.654Z: ---------------------
2023-08-10T11:02:29.656Z: Checking user settings...
2023-08-10T11:02:29.657Z: User settings should be defined in your VS Code or Theia Settings under zopeneditor.userbuild.userSettings
2023-08-10T11:02:29.659Z:     dbbWorkspace: /u/J070188/dbb
    dbbHlq: J070188.DBB
    dbbLogDir: /u/J070188/dbb/logs
    dbbDefaultZappProfile: dbb-build
    localLogDir: .reports
2023-08-10T11:02:29.665Z: Using .gitattributes file at c:\Trv\DepotsGIT\ceab3-environn-osintrn-central-mvpdbb\.gitattributes
2023-08-10T11:02:29.667Z: ---------------------
2023-08-10T11:02:29.670Z: The default Zowe CLI profile specified as TMVS in zopeneditor.zowe setting. Will try loading that.
2023-08-10T11:02:29.672Z: Using Zowe profile TMVS
2023-08-10T11:12:30.039Z: An error occurred: Timed out waiting for password.
2023-08-10T11:12:30.040Z: IBM User Build setup stopped because of one or more errors.
Initialized IBM Z Open Editor logger on level "DEBUG".
2023-08-10T13:01:48.280+02:00 INFO : ZAPP: A valid ZAPP file change was detected that requires restarting the Z Open Editor extension. All language servers will be stopped now and restarted on demand.
2023-08-10T13:01:48.307+02:00 DEBUG: Zowe CLI Secure Credentials is active. Will initialize Z Open Editor to utilize it.
2023-08-10T13:01:48.458+02:00 DEBUG: Received request to stop all language servers.
2023-08-10T13:01:48.460+02:00 DEBUG: IBM Z Open Editor extension has been deactivated for a restart.
2023-08-10T13:01:48.463+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"activated","properties":{"editor":"Visual Studio Code"}}
2023-08-10T13:01:48.467+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"deactivated","properties":{"editor":"Visual Studio Code"},"measurements":{"sinceActivated":0.004}}
This log file is available at c:\Users\S0070188\AppData\Roaming\CodeMainframe\logs\20230805T155725\window5\exthost\IBM.zopeneditor\zopeneditor-20230810-104510.log
Initialized IBM Z Open Editor logger on level "DEBUG".
2023-08-10T13:01:48.510+02:00 DEBUG: Zowe CLI Secure Credentials is successfully activated for Z Open Editor.
2023-08-10T13:01:48.554+02:00 DEBUG: Zowe CLI Secure Credentials is active. Will initialize Z Open Editor to utilize it.
2023-08-10T13:01:48.603+02:00 DEBUG: Zowe CLI Secure Credentials is successfully activated for Z Open Editor.
2023-08-10T13:01:48.999+02:00 INFO : Zowe Explorer was modified for IBM Remote System Explorer API (RSE API) support by IBM Z Open Editor.
2023-08-10T13:01:49.233+02:00 DEBUG: ZCodeFormat: No zcodeformat file was found in c:\Trv\DepotsGIT\ceab3-environn-osintrn-central-mvpdbb. Formatter settings in other workspaces or the default formatter settings will be used. Started watcher for when a zcodeformat file does get created.
2023-08-10T13:01:49.413+02:00 DEBUG: ZAPP: A valid ZAPP file was found in "c:\Trv\DepotsGIT\ceab3-environn-osintrn-central-mvpdbb" and will be used instead of user settings.
2023-08-10T13:01:51.207+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"activated","properties":{"editor":"Visual Studio Code"}}
2023-08-10T13:01:51.210+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"java/found","properties":{"editor":"Visual Studio Code","platform":"win32","java.majorversion":"17","java.vendor":"openjdk"},"measurements":{"sinceActivated":0.003}}
2023-08-10T13:01:51.214+02:00 DEBUG: JavaFinder: Used the "zopeneditor.JAVA_HOME" user setting to locate Java.
2023-08-10T13:01:51.294+02:00 INFO : IBM Z Open Editor extension has (re)started.
2023-08-10T13:01:51.547+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"zowe/profileTypes","properties":{"event.value":"zosmf","editor":"Visual Studio Code"}}
2023-08-10T13:01:51.581+02:00 DEBUG: Z Open Editor environment summary:
- Z Open Editor version: 3.2.1
- Editor platform: Visual Studio Code
- Editor platform version: 1.80.2
- Required minimal editor platform version: ^1.53.2
- Editor installation root directory: c:\ProgramData\Microsoft VS Code\resources\app
- Editor installation id: 140a2f19e1bea09ae365bf4ff12bab3019365d67c48ced072ee7deddea3e0ac7
- Editor workspaces: c:\Trv\DepotsGIT\ceab3-environn-osintrn-central-mvpdbb
- Is a valid Java configured: true
  - Java: c:\trv\install\modules java UdD-M\jre-17.0.7.7\bin\java.exe
  - Java memory allocation: 1024
  - Java startup user settings: Not defined.
- Key user settings:
  - Unreachable Code enabled: true
  - HLASM version used: 2.4
  - HLASM macros file used: c:\Users\S0070188\.vscodeMainframe\ibm.zopeneditor-3.2.1\resources\hlasm-macros-v2r4.json
  - HLASM instructions file used: c:\Users\S0070188\.vscodeMainframe\ibm.zopeneditor-3.2.1\resources\hlasm-instructions.json
  - HLASM Macro resolution enabled: true
  - Enforce Case Sensitive Include File Names: false
  - ZAPP schema used: file:///c%3A/Users/S0070188/.vscodeMainframe/ibm.zopeneditor-3.2.1/resources/zapp-schema-1.0.0.json
  - Variables defined by all ZAPP documents in workspace: zopeneditor.userbuild.userSettings.dbbWorkspace,application,zopeneditor.userbuild.userSettings.dbbHlq,zopeneditor.userbuild.userSettings.dbbLogDir,dependencyFile,buildFile,buildFile.basename
  - Found the following ZAPP variable declarations in VS Code settings: []
  - IBM User Build enabled: true
  - Zowe CLI API profile management used: v2 team config in use.
  - Zowe CLI Secure Credentials enabled: true
  - Zowe data providers used: zosmf
  - Zowe CLI profiles of types rse, zosmf or ssh found: EMVS(zosmf),EMVS-JENKINS(zosmf),GMVS(zosmf),GMVS-JENKINS(zosmf),SYSB(zosmf),SYSB-JENKINS(zosmf),TMVS(zosmf),TMVS-JENKINS(zosmf),EMVS-SSH(ssh),GMVS-SSH(ssh),SYSB-SSH(ssh),TMVS-SSH(ssh),EMVS(zosmf),EMVS-JENKINS(zosmf),GMVS(zosmf),GMVS-JENKINS(zosmf),SYSB(zosmf),SYSB-JENKINS(zosmf),TMVS(zosmf),TMVS-JENKINS(zosmf),EMVS-SSH(ssh),GMVS-SSH(ssh),SYSB-SSH(ssh),TMVS-SSH(ssh)
  - Zowe CLI files profile name specified in VS Code user settings: TMVS
  - Zowe CLI SSH profile name specified in VS Code user settings: TMVS-SSH
  - Zowe CLI files profile used for remote include files: TMVS
  - Zowe CLI SSH profile used: TMVS-SSH
  - Zowe CLI profiles configured for user build: TMVS (zosmf), TMVS-SSH (ssh)
  - Zowe Explorer RSE API Mappings File setting: Not defined.
  - Maximum number of parallel downloads over Zowe profiles: 5
  - Include file download strategy: Directly tries to download files from data sets.
  - Zowe Temp-Dir value: Not defined.
  - COBOL Property Groups defined: cobol-includes
  - COBOL include file extensions: .cpy,.copybook,.copy,.cobcopy
  - COBOL disabled problems: false
  - PL/I Property Groups defined: 
  - PL/I include file extensions: .inc,.include,.plinc,.pcx,.pci
  - PL/I disabled problems: false
  - HLASM Property Groups defined: hlasm-includes
  - HLASM include file extensions: .s,.assemble,.asm,.hlasm,.hla,.copyasm,.macasm,.bms
  - HLASM disabled problems: false
  - REXX disabled problems: false
  - VS Code Files Associations: *.COBCOPY*:cobol,*.COBSRCE*:cobol,*.COPYBOOK*:cobol,*.COPYCOB*:cobol,*.COPY*:cobol,*.PL1*:pl1,*.PLI*:pl1,*.INC*:pl1,*.INCLUDE*:pl1,*.JCL*:jcl,*.CNTL*:jcl,*.ASM*:hlasm,*.ASSEMBLE*:hlasm,*.HLASM*:hlasm,*.HLA*:hlasm,*.EXEC*:rexx,*.REXX*:rexx,*.REXXINC*:rexx,*.copyasm:hlasm,*.macasm:hlasm,*.bms:hlasm,*.rex:rexx,*.rexx:rexx,*.COBOL*:cobol,*.COB*:cobol,*.MACLIB*:hlasm,*.SRCELIB*:cobol,*.BMS*:hlasm,*.COBCOPY:cobol,*.COPYBOOK:cobol,*.COPY:cobol,*.COPYLIB:cobol,*.JCL:jcl,*.CNTL:jcl,*.ASM:hlasm,*.HLASM:hlasm,*.COBOL:cobol,*.COB:cobol,*.build:yaml
- Zowe Explorer VS Code Extension version: 2.9.2
  - Successfully activated: true
  - Installation path: c:\Users\S0070188\.vscodeMainframe\zowe.vscode-extension-for-zowe-2.9.2
  - Log file location: c:\Users\S0070188\.vscodeMainframe\zowe.vscode-extension-for-zowe-2.9.2\logs
- Other VS Code extensions visible: ...
2023-08-10T13:01:52.110+02:00 INFO : Zowe Explorer was modified for IBM Remote System Explorer API (RSE API) support by IBM Z Open Editor.
2023-08-10T13:01:52.422+02:00 DEBUG: ZLanguageServer.buildServerOptions: Starting COBOL language server from "language-server".
2023-08-10T13:01:52.613+02:00 DEBUG: ZLanguageServer: Will start a language server with command "c:\trv\install\modules java UdD-M\jre-17.0.7.7\bin\java.exe -Declipse.application=com.ibm.wazi.lsp.cobol.core.languageServer,-Dosgi.bundles.defaultStartLevel=4,-Declipse.product=com.ibm.wazi.lsp.cobol.core.languageServerProduct,-Xmx1024m,-jar,c:\Users\S0070188\.vscodeMainframe\ibm.zopeneditor-3.2.1\language-server\plugins\org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar,-configuration,c:\Users\S0070188\.vscodeMainframe\ibm.zopeneditor-3.2.1\language-server\cobol_config_win,-data,C:\Users\S0070188\AppData\Local\Temp\_ws_1691665312613".
2023-08-10T13:01:52.618+02:00 DEBUG: AbstractZLanguageClient.initializeLanguageClient: Started initializing a new COBOL language client with these initialization options: {"enableUnreachableCodeWarnings":true,"publishDiagnostics":true,"includeFileExtensions":[".cpy",".copybook",".copy",".cobcopy"],"compilerOptions":""}.
2023-08-10T13:01:52.635+02:00 DEBUG: AbstractZLanguageClient.startLanguageClient: Language client for COBOL started.
2023-08-10T13:01:55.984+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"document/didOpen","properties":{"editor":"Visual Studio Code","language":"cobol"},"measurements":{"sinceActivated":4.777}}
...
2023-08-10T13:01:56.090+02:00 DEBUG: ZLanguagesResourceResolver.documentRequested: The COBOL language server requested the following include file: "SGFDAPP". The ID for this request was assigned as "m01nrq" There are 1 pending requests being processed.
2023-08-10T13:01:56.093+02:00 DEBUG: ZLanguagesResourceResolver.findIncludeFiles(RequestId:m01nrq): Started looking for "SGFDAPP" in 1 property groups: [cobol-includes] and will search in that order.
2023-08-10T13:01:56.096+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"includes/requested/local","properties":{"editor":"Visual Studio Code","language":"cobol"},"measurements":{"sinceActivated":4.889}}
2023-08-10T13:01:56.099+02:00 DEBUG: ZLanguagesResourceResolver.findIncludeFiles(RequestId:m01nrq): Looking for local or downloaded "SGFDAPP" in ["src/**","pacbase/**",".imports/**"] using file extensions [".cpy",".copybook",".copy",".cobcopy"].
2023-08-10T13:01:56.418+02:00 DEBUG: ZLanguagesResourceResolver: The download queue has been configured to maximally perform 5 parallel downloads. You can change this value with the "zopeneditor.zowe.{maximumParallelFileDownloads}" user setting.
2023-08-10T13:01:56.422+02:00 DEBUG: ZoweResourceResolver.checkMVSConnection: Running a Zowe profile connection test using the profile "TMVS" by reading data set "sys1.proclib".
...
2023-08-10T13:01:57.204+02:00 DEBUG: ZoweResourceResolver.downloadMVSDataset(RequestId:m01nrq): Looking for data set member "DSGETU.PERMIBL.SIRIS.COPY(SGFDAPP)" on MVS using Zowe CLI Profile "TMVS". 
...
2023-08-10T13:01:57.474+02:00 DEBUG: ZoweResourceResolver.downloadMVSDataset(RequestId:m01nrq): Data set member "DSGETU.PERMIBL.SIRIS.COPY(SGFDAPP)" was found and content is being downloaded to "c:\Users\S0070188\.vscodeMainframe\ibm.zopeneditor-3.2.1\resources\temp\zopeneditor\_D_\TMVS\DSGETU.PERMIBL.SIRIS.COPY\SGFDAPP.cpy".
...
2023-08-10T13:01:57.513+02:00 DEBUG: ZLanguagesResourceResolver.shouldDownload(RequestId:m01nrq): Got a location path: C:\Users\S0070188\.vscodeMainframe\ibm.zopeneditor-3.2.1\resources\temp\zopeneditor\_D_\TMVS\DSGETU.PERMIBL.SIRIS.COPY.
...
2023-08-10T13:01:57.533+02:00 DEBUG: ZLanguagesResourceResolver.findIncludeFiles(RequestId:m01nrq): Looking for local or downloaded "SGFDAPP" in ["src/**","pacbase/**",".imports/**","C:\\Users\\S0070188\\.vscodeMainframe\\ibm.zopeneditor-3.2.1\\resources\\temp\\zopeneditor\\_D_\\TMVS\\DSGETU.PERMIBL.SIRIS.COPY"] using file extensions [".cpy",".copybook",".copy",".cobcopy"].
2023-08-10T13:01:57.600+02:00 DEBUG: ZLanguagesResourceResolver.resolve(RequestId:m01nrq): Found include file "SGFDAPP" in "file:///c%3A/Users/S0070188/.vscodeMainframe/ibm.zopeneditor-3.2.1/resources/temp/zopeneditor/_D_/TMVS/DSGETU.PERMIBL.SIRIS.COPY/SGFDAPP.cpy"
2023-08-10T13:01:57.603+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"includes/found/success","properties":{"editor":"Visual Studio Code","language":"cobol"},"measurements":{"sinceActivated":6.396}}
2023-08-10T13:01:57.606+02:00 INFO : The COBOL language server requested the include file "SGFDAPP", which was found and available as file "file:///c%3A/Users/S0070188/.vscodeMainframe/ibm.zopeneditor-3.2.1/resources/temp/zopeneditor/_D_/TMVS/DSGETU.PERMIBL.SIRIS.COPY/SGFDAPP.cpy".
2023-08-10T13:01:57.610+02:00 DEBUG: ZLanguagesResourceResolver.buildResponse(RequestId:m01nrq): File "SGFDAPP" was found.
2023-08-10T13:01:57.612+02:00 DEBUG: ZLanguagesResourceResolver.buildResponse(RequestId:m01nrq): Finished request m01nrq. 7 pending requests left to process.
...
2023-08-10T13:02:29.627+02:00 DEBUG: UsageReporter: Sending the following telemetry data: {"eventName":"userbuild/setup","properties":{"editor":"Visual Studio Code","language":"cobol"},"measurements":{"sinceActivated":38.42}}
kristinochka commented 10 months ago

Hello! It’s possible you have an incorrect password for the SSH profile. When you use ZOSMF, an SSH profile needs to be configured to run certain commands.
It’s possible your Zowe Team Config Profile is configured in such a way that you need to separately specify passwords for different profiles.

Also, the extension is suppose to prompt for credentials if any of the profiles have incorrect credentials. Do you not get a prompt at the top of the editor?

FALLAI-Denis commented 10 months ago

Hi @kristinochka

No, no prompt for credentials...

image

I use "user config" for Zowe, from C:\Users\<user>\.zowe\zowe.config.json (Windows context). For SSH, I use a key to connect to mainframe.

        "TMVS": {
            "type": "zosmf",
            "properties": {
                "host": "tmvs",
                "port": 8444,
                "rejectUnauthorized": false,
                "encoding": "1147"
            },
            "secure": [
                "user",
                "password"
            ]
        },

        "TMVS-SSH": {
            "type": "ssh",
            "properties": {
                "host": "TMVS",
                "port": 22,
                "user": "J070188",
                "privateKey": "C:\\Users\\S0070188\\.ssh\\id_rsa"
            },
            "secure": [
                "password"
            ]
        },

            "autoStore": true

image

Test of SSH profile from the same folder as "run setup for IBM User Build": image

Test of zOSMF profile from the same folder as "run setup for IBM User Build": image

Note that the password is indicated in the SSH profile because it is required even if an SSH key is used to connect (and in this case the password is not used). To see if ZOE uses the connection by key and not the connection by password, because it is certain that the password memorized for the profile is not kept up to date. See:

Is there a way to enable a verbose log on the User Build process?

kristinochka commented 10 months ago

I am able to reproduce the issue when using an ssh key.

FALLAI-Denis commented 9 months ago

Hi,

We need to use the IBM User Build feature right now... Is there any plan to correct this anomaly in the near future? What workaround? switch to user/password management for ssh instead of user/public key?

phaumer commented 9 months ago

@FALLAI-Denis yes, the workaround is to use passwords for now. This bug is a high priority for us to fix.

phaumer commented 8 months ago

@FALLAI-Denis with Z Open Editor v3.3.0 we added full support for SSH keys. Let us know if this now works for you.