Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug Service 2.0 does not start #2144

Open
DamianoBonato opened this issue Jun 27, 2024 · 27 comments
Open

Debug Service 2.0 does not start #2144

DamianoBonato opened this issue Jun 27, 2024 · 27 comments
Labels
debug Debug client issue (IBM)

Comments

@DamianoBonato
Copy link

👉🏻 Issue text goes here.
Good morning, when i try to start the debug service , i get this error message :

image

J have installed Java 11 and the PTF SI85976 .
Thank for the help .
Damiano Bonato


@sebjulliand
Copy link
Collaborator

Hi!
Can you share the content of your Code for IBM i output right after this message shows up?
code for i output

Thanks!

@DamianoBonato
Copy link
Author

Hi , thanks for your feedback . Here is the content of the output :

.: echo "This should be the only text!"
{
"code": 0,
"signal": null,
"stdout": "This should be the only text!",
"stderr": ""
}

.: echo $HOME && cd && test -w $HOME
{
"code": 0,
"signal": null,
"stdout": "/home/VSCODE",
"stderr": ""
}

/home/VSCODE: /QOpenSys/usr/bin/qsh
liblist
{
"code": 0,
"signal": null,
"stdout": "QSYS SYS\nQSYS2 SYS\nQHLPSYS SYS\nQUSRSYS SYS\nQSHELL PRD\nZEFIARC USR\nZEFICSD USR\nZEFIFILP USR\nZEFIOBJP USR\nZEFIFIL USR\nZEFIOBJ USR\nZEFIECO USR\nZEFIUTL USR\nZEFILOGS10 USR\nZEFIDIV USR\nZEFIHLP USR\nZEFIJRN USR\nZEFIAGE USR\nONE_FILZFR USR\nONE_OBJZFR USR\nONE_W_ZFR USR\nONE_W_LOG USR\nONE_WRK02 USR\nONE_BAS02 USR\nLOG_CSD USR\nLOGF10 USR\nLOGH10 USR\nLOGO10 USR\nLOGS10 USR\nLOGRGZS10 USR\nLOG_TRANS0 USR\nZEFICNVCSD USR\nIFSTOOL USR\nECO§CSDO5 USR\nECO§CSDD5 USR\nECO_SYS5 USR\nECO_PTF5 USR\nECO_OBJ5 USR\nECO_DAT5 USR\nECO_DDS5 USR\nCSD§SIO5 USR\nZIP USR\nAASLIB3001 USR\nAASSTP3000 USR\nAASUTL3000 USR\nSIPEUTL USR\nSIPESBS USR\nPEEK USR\nQGPL USR",
"stderr": ""
}

/home/VSCODE: /QOpenSys/usr/bin/qsh
system "CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')"
{
"code": 1,
"signal": null,
"stdout": "",
"stderr": "CPF2111: La libreria ILEDITOR esiste già."
}

/home/VSCODE: [ -d "/tmp" ]
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: echo $SHELL
{
"code": 0,
"signal": null,
"stdout": "/QOpenSys/pkgs/bin/bash",
"stderr": ""
}

/home/VSCODE: rm -rf /tmp/code4itempO_CKP3mEgk0KY7j5o1znvs && mkdir -p /tmp/code4itempO_CKP3mEgk0KY7j5o1znvs
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/: /QOpenSys/usr/bin/qsh
system "RUNSQLSTM SRCSTMF('/tmp/code4itempO_CKP3mEgk0KY7j5o1znvs/getnewlibl.sql') COMMIT(*NONE) NAMING(*SQL)"
{
"code": 0,
"signal": null,
"stdout": "5770SS1 V7R3M0 160422 Esecuzione istruzioni SQL GETNEWLIBL 27/06/24 15:36:14 PAGE 1\n File flusso origine......./tmp/code4itempO_CKP3mEgk0KY7j5o1znvs/getnewlibl.sql\n Release destinazione......V7R1M0\n Commit.................*NONE\n Denominazione.............*SQL\n Livello generazione.......10\n Formato data..............*JOB\n Separatore data...........*JOB\n Formato ora...............*HMS\n Separatore ora ...........*JOB\n Margine destro............80\n Raccolta predefinita......*NONE\n Indicatore IBM SQL........*NOFLAG\n Indicatore ANS............*NONE\n Virgola decimale..........*JOB\n Sequenza di ordinamento...*JOB\n ID lingua.................*JOB\n File di stampa............*LIBL/QSYSPRT\n CCSID file origine........1208\n CCSID lavoro..............1144\n Elaborazione istruzioni...*RUN\n Permessa la copia dati....*OPTIMIZE\n Consentito il blocco......*ALLREAD\n Regole SQL................*DB2\n Opzioni risultati decimali:\n Precisione massima.......31\n Scala massima...........31\n Scala divisione minima....0\n Accesso contemporaneo\n risoluzione..........*DFT\n Sensibile a ora sistema.*YES\n Membro origine modificato in 27/06/24 15:36:13\n 5770SS1 V7R3M0 160422 Esecuzione istruzioni SQL GETNEWLIBL 27/06/24 15:36:14 PAGE 2\n Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Ultima modifica\n 1 CREATE OR REPLACE PROCEDURE ILEDITOR.GETNEWLIBL(IN COMMAND VARCHAR(2000))\n 2 DYNAMIC RESULT SETS 1\n 3 BEGIN\n 4 DECLARE clibl CURSOR FOR\n 5 SELECT ORDINAL_POSITION, TYPE as PORTION, SYSTEM_SCHEMA_NAME\n 6 FROM QSYS2.LIBRARY_LIST_INFO;\n 7 CALL QSYS2.QCMDEXC(COMMAND);\n 8 OPEN clibl;\n 9 END;\n 10\n 11 call QSYS2.QCMDEXC( 'grtobjaut ILEDITOR/GETNEWLIBL *PGM *PUBLIC *ALL' );\n * * * * * F I N E O R I G I N E * * * * *\n 5770SS1 V7R3M0 160422 Esecuzione istruzioni SQL GETNEWLIBL 27/06/24 15:36:14 PAGE 3\n Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Ultima modifica\n ID MES SEV RECORD TESTO\n SQL7989 0 1 Posizione 1 Procedura GETNEWLIBL creata in ILEDITOR.\n SQL7985 0 11 Posizione 1 Istruzione CALL completata.\n Riepilogo messaggi\n Totale Informativo Avvertenza Errore Grave Terminale\n 2 2 0 0 0 0\n Trovati nell'origine 00 errori gravi\n * * * * * F I N E D E L L A L I S T A * * * * *",
"stderr": "CPD4090: Non è stata trovata l'unità di stampa PRT01. La coda di emissione è stata modificata con QPRINT nella libreria QGPL.\nCPC7301: File QSQLSRC creato nella libreria QTEMP.\nCPC7303: Il file QSQLSRC nella libreria QTEMP è stato modificato.\nCPC7305: Membro GETNEWLIBL aggiunto al file QSQLSRC in QTEMP.\nCPC7301: File QSQLT00000 creato nella libreria QTEMP.\nCPC7305: Membro GETNEWLIBL aggiunto al file QSQLT00000 in QTEMP.\nCZS0607: Il modulo GETNEWLIBL è stato creato nella libreria QTEMP il giorno 27/06/24 alle 15:36:14.\nCPC5D07: Programma GETNEWLIBL creato nella libreria ILEDITOR.\nCPC2191: È stato cancellato l'oggetto GETNEWLIBL in QTEMP di tipo *MODULE.\nCPI2201: È stata concessa all'utente *PUBLIC l'autorizzazione sull'oggetto GETNEWLIBL in ILEDITOR di tipo *PGM.\nCPC2201: È stata concessa l'autorizzazione sugli oggetti."
}

/home/VSCODE: rm -rf /tmp/code4itempO_CKP3mEgk0KY7j5o1znvs
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_UY27N AS (select LONG_COMMENT from qsys2.sysroutines where routine_schema = 'ILEDITOR' and routine_name = 'GETMBRINFO') WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_UY27N *FIRST) TOSTMF(''/tmp/vscodetemp-O_0MVyQU46'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_0MVyQU46"
/home/VSCODE: rm -rf /tmp/code4itempO_HmG25YYQIXqlanXSgnMm && mkdir -p /tmp/code4itempO_HmG25YYQIXqlanXSgnMm
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/: /QOpenSys/usr/bin/qsh
system "RUNSQLSTM SRCSTMF('/tmp/code4itempO_HmG25YYQIXqlanXSgnMm/getMemberInfo.sql') COMMIT(*NONE) NAMING(*SQL)"
{
"code": 1,
"signal": null,
"stdout": "5770SS1 V7R3M0 160422 Esecuzione istruzioni SQL GETMEMBERI 27/06/24 15:36:18 PAGE 1\n File flusso origine......./tmp/code4itempO_HmG25YYQIXqlanXSgnMm/getMemberInfo.sql\n Release destinazione......V7R1M0\n Commit.................*NONE\n Denominazione.............*SQL\n Livello generazione.......10\n Formato data..............*JOB\n Separatore data...........*JOB\n Formato ora...............*HMS\n Separatore ora ...........*JOB\n Margine destro............80\n Raccolta predefinita......*NONE\n Indicatore IBM SQL........*NOFLAG\n Indicatore ANS............*NONE\n Virgola decimale..........*JOB\n Sequenza di ordinamento...*JOB\n ID lingua.................*JOB\n File di stampa............*LIBL/QSYSPRT\n CCSID file origine........1208\n CCSID lavoro..............1144\n Elaborazione istruzioni...*RUN\n Permessa la copia dati....*OPTIMIZE\n Consentito il blocco......*ALLREAD\n Regole SQL................*DB2\n Opzioni risultati decimali:\n Precisione massima.......31\n Scala massima...........31\n Scala divisione minima....0\n Accesso contemporaneo\n risoluzione..........*DFT\n Sensibile a ora sistema.*YES\n Membro origine modificato in 27/06/24 15:36:17\n 5770SS1 V7R3M0 160422 Esecuzione istruzioni SQL GETMEMBERI 27/06/24 15:36:18 PAGE 2\n Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Ultima modifica\n 1 create or replace procedure ILEDITOR.QUSRMBRD(\n 2 inout Buf char( 135 )\n 3 , in BufLen integer\n 4 , in Format char( 8 )\n 5 , in QObj char( 20 )\n 6 , in Mbr char( 10 )\n 7 , in Ovr char( 1 )\n 8 )\n 9 language CL\n 10 parameter style general\n 11 program type main\n 12 external name 'QSYS/QUSRMBRD'\n 13 ;\n 14 create or replace function ILEDITOR.GETMBRINFO( inLib char(10), inFil char(10),\n 14 inMbr char(10) )\n 15 returns table (\n 16 Library varchar( 10 )\n 17 , File varchar( 10 )\n 18 , Member varchar( 10 )\n 19 , Attr varchar( 10 )\n 20 , Extension varchar( 10 )\n 21 , created timestamp(0)\n 22 , changed timestamp(0)\n 23 , Description varchar( 50 )\n 24 , isSource char( 1 )\n 25 )\n 26 specific GETMBRINFO\n 27 modifies sql data\n 28 begin\n 29 declare buffer char( 135 ) for bit data not null default '';\n 30 declare BUFLEN integer constant 135 ;\n 31 declare FORMAT char( 8 ) constant 'MBRD0100' ;\n 32 declare OVR char( 1 ) constant '0' ;\n 33\n 34 call ILEDITOR.QUSRMBRD( buffer, BUFLEN, FORMAT, upper( inFil ) concat upper( i\n 34 nLib ), upper( inMbr ), OVR );\n 35\n 36 pipe ( rtrim( substr( Buffer, 19, 10 ) )\n 37 , rtrim( substr( Buffer, 9, 10 ) )\n 38 , rtrim( substr( Buffer, 29, 10 ) )\n 39 , rtrim( substr( Buffer, 39, 10 ) )\n 40 , rtrim( substr( Buffer, 49, 10 ) )\n 41 , timestamp_format( case substr( Buffer, 59, 1 )\n 42 when '1' then '20' else '19' end concat\n 43 substr( Buffer, 60, 12 ) , 'YYYYMMDDHH24MISS')\n 44 , timestamp_format( case substr( Buffer, 72, 1 )\n 45 when '1' then '20' else '19' end concat\n 46 substr( Buffer, 73, 12 ), 'YYYYMMDDHH24MISS')\n 47 , rtrim( substr( Buffer, 85, 50 ) )\n 48 , case substr( Buffer, 135, 1 ) when '1' then 'Y' else 'N' end\n 49 );\n 50 return;\n 51 end;\n 52\n 53 comment on function ILEDITOR.GETMBRINFO is '1 - Validate member information';\n 54\n 5770SS1 V7R3M0 160422 Esecuzione istruzioni SQL GETMEMBERI 27/06/24 15:36:18 PAGE 3\n Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Ultima modifica\n 55 call QSYS2.QCMDEXC( 'grtobjaut ILEDITOR/GETMBRINFO *SRVPGM *PUBLIC *ALL' );\n * * * * * F I N E O R I G I N E * * * * *\n 5770SS1 V7R3M0 160422 Esecuzione istruzioni SQL GETMEMBERI 27/06/24 15:36:18 PAGE 4\n Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 SEQNBR Ultima modifica\n ID MES SEV RECORD TESTO\n SQL7909 10 1 Posizione 1 QUSRMBRD è stato creato, modificato o\n rilasciato, ma l'oggetto non è stato modificato.\n SQL7906 30 21 Posizione 16 Funzione SQL non supportata sul release\n precedente. La funzione è - Lunghezza.\n SQL7906 30 22 Posizione 16 Funzione SQL non supportata sul release\n precedente. La funzione è - Lunghezza.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n SQL7906 30 21 Posizione 16 Funzione SQL non supportata sul release\n precedente. La funzione è - Lunghezza.\n SQL7906 30 22 Posizione 16 Funzione SQL non supportata sul release\n precedente. La funzione è - Lunghezza.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n SQL7906 30 14 Posizione 1 Funzione SQL non supportata sul release\n precedente. La funzione è - TIMESTAMP.\n Riepilogo messaggi\n Totale Informativo Avvertenza Errore Grave Terminale\n 13 0 1 0 12 0\n Trovati nell'origine 30 errori gravi\n * * * * * F I N E D E L L A L I S T A * * * * *",
"stderr": "CPD4090: Non è stata trovata l'unità di stampa PRT01. La coda di emissione è stata modificata con QPRINT nella libreria QGPL.\nSQL7909: QUSRMBRD è stato creato, modificato o rilasciato, ma l'oggetto non è stato modificato.\nSQL9010: Il comando RUNSQLSTM o RUNSQL non è riuscito."
}

/home/VSCODE: rm -rf /tmp/code4itempO_HmG25YYQIXqlanXSgnMm
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_OPW2W AS (select os.OBJNAME as ODOBNM , coalesce(os.OBJTEXT, '') as ODOBTX , os.OBJATTRIBUTE as ODOBAT from table( SYSTOOLS.SPLIT( INPUT_LIST => 'LOGF10,QGPL,QTEMP,LOGS10,LOG_CSD,LOGF10,LOGO10,AASSTP3000,BRD_LOG,BRD_STD,ZEFIOBJ,ZEFIFIL,ZEFILOGS10', DELIMITER => ',' ) ) libs , table( QSYS2.OBJECT_STATISTICS( OBJECT_SCHEMA => 'QSYS', OBJTYPELIST => '*LIB', OBJECT_NAME => libs.ELEMENT ) ) os) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_OPW2W *FIRST) TOSTMF(''/tmp/vscodetemp-O_1ctug3g3'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_RCYH3 AS (select job_name, local_port from qsys2.netstat_job_info where cast(local_port_name as VarChar(14) CCSID 37) = 'is-debug-ile' fetch first row only) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_RCYH3 *FIRST) TOSTMF(''/tmp/vscodetemp-O_83LT6jT2'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_LPDHU AS (select OS_VERSION concat '.' concat OS_RELEASE as VERSION from sysibmadm.env_sys_info) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_LPDHU *FIRST) TOSTMF(''/tmp/vscodetemp-O_Igb251cV'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: test -r /QIBM/ProdData/IBMiDebugService/package.json
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: test -r /QIBM/ProdData/IBMiDebugService/package.json
/home/VSCODE: test -r /QIBM/ProdData/IBMiDebugService/package.json
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_83LT6jT2"
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_KT0GE AS (select distinct job_name, local_port from qsys2.netstat_job_info j where job_name = (select job_name from qsys2.netstat_job_info j where local_port = 8005 and remote_address = '0.0.0.0' fetch first row only)) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_KT0GE *FIRST) TOSTMF(''/tmp/vscodetemp-O_UFSoVelb'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
/home/VSCODE: rm -rf "/tmp/vscodetemp-O_Igb251cV"
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_HCXC8 AS (select max(ptf_group_level) as HIGHEST_DB2_PTF_GROUP_LEVEL from qsys2.group_ptf_info where PTF_GROUP_DESCRIPTION like 'DB2 FOR IBM I%' and ptf_group_status = 'INSTALLED') WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_HCXC8 *FIRST) TOSTMF(''/tmp/vscodetemp-O_IjRaK2UD'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
/home/VSCODE: rm -rf "/tmp/vscodetemp-O_1ctug3g3"
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_PZB5N AS (select os.OBJNAME as ODOBNM , coalesce(os.OBJTEXT, '') as ODOBTX , os.OBJATTRIBUTE as ODOBAT from table( SYSTOOLS.SPLIT( INPUT_LIST => 'LOGF10,QGPL,QTEMP,LOGS10,LOG_CSD,LOGF10,LOGO10,AASSTP3000,BRD_LOG,BRD_STD,ZEFIOBJ,ZEFIFIL,ZEFILOGS10', DELIMITER => ',' ) ) libs , table( QSYS2.OBJECT_STATISTICS( OBJECT_SCHEMA => 'QSYS', OBJTYPELIST => '*LIB', OBJECT_NAME => libs.ELEMENT ) ) os) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_PZB5N *FIRST) TOSTMF(''/tmp/vscodetemp-O_BKoTDpQq'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_X6BFZ AS (select job_name, local_port from qsys2.netstat_job_info where cast(local_port_name as VarChar(14) CCSID 37) = 'is-debug-ile' fetch first row only) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_X6BFZ *FIRST) TOSTMF(''/tmp/vscodetemp-O_N2vXrEdn'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_BKoTDpQq"
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_D6Y2D AS (select os.OBJNAME as ODOBNM , coalesce(os.OBJTEXT, '') as ODOBTX , os.OBJATTRIBUTE as ODOBAT from table( SYSTOOLS.SPLIT( INPUT_LIST => 'LOGF10,QGPL,QTEMP,LOGS10,LOG_CSD,LOGF10,LOGO10,AASSTP3000,BRD_LOG,BRD_STD,ZEFIOBJ,ZEFIFIL,ZEFILOGS10', DELIMITER => ',' ) ) libs , table( QSYS2.OBJECT_STATISTICS( OBJECT_SCHEMA => 'QSYS', OBJTYPELIST => '*LIB', OBJECT_NAME => libs.ELEMENT ) ) os) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_D6Y2D *FIRST) TOSTMF(''/tmp/vscodetemp-O_k0Dh6aBD'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
/home/VSCODE: rm -rf "/tmp/vscodetemp-O_UFSoVelb"
/home/VSCODE: test -f /QIBM/UserData/IBMiDebugService/certs/debug_service.pfx
/home/VSCODE: rm -rf "/tmp/vscodetemp-O_IjRaK2UD"
/home/VSCODE: ls $HOME/.vscode/codeforiserver-1.4.9.jar
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: test -f /QIBM/UserData/IBMiDebugService/certs/debug_service.crt
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_N2vXrEdn"
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_MH1AB AS (select distinct job_name, local_port from qsys2.netstat_job_info j where job_name = (select job_name from qsys2.netstat_job_info j where local_port = 8005 and remote_address = '0.0.0.0' fetch first row only)) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_MH1AB *FIRST) TOSTMF(''/tmp/vscodetemp-O_e6dpYEil'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "/home/VSCODE/.vscode/codeforiserver-1.4.9.jar",
"stderr": ""
}

/home/VSCODE: echo $SHELL
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: test -f /QIBM/UserData/IBMiDebugService/.code4i.debug
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "/QOpenSys/pkgs/bin/bash",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: test -f /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_k0Dh6aBD"
{
"code": 1,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_e6dpYEil"
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: test -f /QIBM/UserData/IBMiDebugService/certs/debug_service.pfx
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: test -f /QIBM/UserData/IBMiDebugService/certs/debug_service.crt
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_SCHJU AS (select job_name, local_port from qsys2.netstat_job_info where cast(local_port_name as VarChar(14) CCSID 37) = 'is-debug-ile' fetch first row only) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_SCHJU *FIRST) TOSTMF(''/tmp/vscodetemp-O_KLflRifW'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_KLflRifW"
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_6U8PJ AS (select distinct job_name, local_port from qsys2.netstat_job_info j where job_name = (select job_name from qsys2.netstat_job_info j where local_port = 8005 and remote_address = '0.0.0.0' fetch first row only)) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_6U8PJ *FIRST) TOSTMF(''/tmp/vscodetemp-O_rSUqtXqk'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_rSUqtXqk"
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_S62XP AS (select trim(coalesce(usr.special_authorities,'') concat ' ' concat coalesce(grp.special_authorities, '')) AUTHORITIES from qsys2.user_info_basic usr left join qsys2.user_info_basic grp on grp.authorization_name = usr.group_profile_name where usr.authorization_name = 'VSCODE') WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_S62XP *FIRST) TOSTMF(''/tmp/vscodetemp-O_tMuRPZkP'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_tMuRPZkP"
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/QIBM/UserData/IBMiDebugService: /QOpenSys/usr/bin/qsh
system "SBMJOB CMD(STRQSH CMD('/QOpenSys/pkgs/bin/bash -c /QIBM/ProdData/IBMiDebugService/bin/startDebugService.sh')) JOB(DBGSVCE) JOBQ(QSYS/QUSRNOMAX) JOBD(QSYS/QSYSJOBD) USER(*CURRENT)"
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": "CPC1221: Il lavoro 769912/VSCODE/DBGSVCE è stato sottomesso alla coda lavori QUSRNOMAX nella libreria QSYS."
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_VPYCK AS (select job_name_short, job_user, job_number, subsystem_library_name concat '/' concat subsystem as subsystem, authorization_name, job_status, memory_pool from table(qsys2.active_job_info(job_name_filter => 'DBGSVCE')) where job_name = '769912/VSCODE/DBGSVCE' fetch first row only) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_VPYCK *FIRST) TOSTMF(''/tmp/vscodetemp-O_iGxlNXlT'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_FNWR3 AS (select job_name_short, job_user, job_number, subsystem_library_name concat '/' concat subsystem as subsystem, authorization_name, job_status, memory_pool from table(qsys2.active_job_info(job_name_filter => 'DBGSVCE')) where job_name = '769912/VSCODE/DBGSVCE' fetch first row only) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_FNWR3 *FIRST) TOSTMF(''/tmp/vscodetemp-O_FnkfVTca'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_iGxlNXlT"
/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_WDHNO AS (select distinct job_name, local_port from qsys2.netstat_job_info j where job_name = (select job_name from qsys2.netstat_job_info j where local_port = 8005 and remote_address = '0.0.0.0' fetch first row only)) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_WDHNO *FIRST) TOSTMF(''/tmp/vscodetemp-O_pRy58qIz'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
CREATE TABLE QTEMP.O_7ZLLU AS (select job_name_short, job_user, job_number, subsystem_library_name concat '/' concat subsystem as subsystem, authorization_name, job_status, memory_pool from table(qsys2.active_job_info(job_name_filter => 'DBGSVCE')) where job_name = '769912/VSCODE/DBGSVCE' fetch first row only) WITH DATA;
Call QSYS2.QCMDEXC('CPYTOIMPF FROMFILE(QTEMP/O_7ZLLU *FIRST) TOSTMF(''/tmp/vscodetemp-O_OZumVWM0'') MBROPT(*REPLACE) STMFCCSID(1208) RCDDLM(*CRLF) DTAFMT(*DLM) RMVBLANK(*TRAILING) ADDCOLNAM(*SQL) FLDDLM('','') DECPNT(*PERIOD)')
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_FnkfVTca"
{
"code": 0,
"signal": null,
"stdout": "DB2>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.\nDB2>\n ?>\nDB20000I THE SQL COMMAND COMPLETED SUCCESSFULLY.",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

/home/VSCODE: rm -rf "/tmp/vscodetemp-O_pRy58qIz"
/home/VSCODE: rm -rf "/tmp/vscodetemp-O_OZumVWM0"
{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

{
"code": 0,
"signal": null,
"stdout": "",
"stderr": ""
}

@worksofliam worksofliam added the debug Debug client issue (IBM) label Jun 28, 2024
@sebjulliand
Copy link
Collaborator

@DamianoBonato I think I had the same issue recently.
The output won't give any clue in this case (sorry about that). To get the actual root cause, you'll have to:

  • Try to start the service
  • Wait for the failure notification to show up
  • Take note of (or copy/paste) the identifier of the service job that ended (number/user/name)
  • Open a 5250 session
  • Run DSPJOB number/user/name
  • Select opion 4. Display spooled files
  • There should be only a QPRINT file in there. Use option 5 to open it.
    image
  • Copy/paste here everything that's in it

This should give more information about what went wrong.

@DamianoBonato
Copy link
Author

Ciao Sebastien , here the spool file :

                       Visualizzazione file di spool                        

File . . . . . : QPRINT Pagina/Riga 1/6
Controllo . . . . Colonne 1 - 78
Ricerca . . . . .
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment 11.0.8.0-IBM (build 11.0.8+10)
Eclipse OpenJ9 VM 11.0.8.0-IBM (build openj9-0.21.0, JRE 11 OS/400 ppc64-64-Bit Compressed References 20210119_000000 (JIT enabled,
OpenJ9 - 34cf4c0
OMR - 113e542
JCL - 95bb504 based on jdk-11.0.8+10)
Incorrect Java version. Java 11 is required.

It seems like a Java 11 problem. Java 11 is installed on the system IBM i. Maybe it’s an issue with some service configuration files. In which configuration file is the use of Java 11 set? I hope I have been clear. Sorry for my poor English. ChatGPT is helping me.

Thank you very much, Sebastien.

@sebjulliand
Copy link
Collaborator

Ciao @DamianoBonato !
No worries, it's perfectly clear now.

The main problem is you're using Java 11 from the open source repository (installed through yum). The Debug Service provided by IBM expects you to use Java 11 installed through licensed product 5770JV1 option 19: https://www.ibm.com/support/pages/download-installation-and-usage-java-11-ibm-i-os

Your best bet is to install Java 11 this way and it will be fine.

Alternatively, I'm trying to see if the Debug Service can actually run on Open Source Java 11. I can't guarantee it will. If you want to try it, you'll have to modify these scripts:

  • /QIBM/ProdData/IBMiDebugService/bin/startDebugService.sh
  • /QIBM/ProdData/IBMiDebugService/bin/stopDebugService.sh

All these scripts have this line:
image

You have to change it this way (remove java from the string being tested test:
image

You'll also have to update this file: /QIBM/ProdData/IBMiDebugService/bin/DebugService.env

Look for the JAVA_HOME variable and change it to point to your current Java 11 folder.
NB: you'll have to change this every time VSCode connects to your system as it will change it back to the official Java 11 path.

But at least you can give it a try!

@DamianoBonato
Copy link
Author

Thanks, Sebastien. I'll ask the system administrators to review the installation of JAVA 11 and then I'll update you. I'm currently on vacation. I'll see if I can also try the temporary solution.

Ciao !

@sebjulliand
Copy link
Collaborator

Prego! 😉

@DamianoBonato
Copy link
Author

Hi Sebastien, my system administrator colleague confirms that he used the correct method to install Java according to the link you mentioned. Therefore, I deduce that the malfunction of the debug service is due to another reason. What do you think? Thanks again. Let me know if I need to perform any other checks on the IBM i systems.

P.S. Sorry for my stubbornness, but I am trying to introduce the use of VSCode and fully free RPGLE in my company.

@sebjulliand
Copy link
Collaborator

P.S. Sorry for my stubbornness, but I am trying to introduce the use of VSCode and fully free RPGLE in my company.

No worries, that's commendable 😄

Now, I trust your sysadmin. But I also trust the spooled file output, and it prints the output from OpenJDK Runtime Environment. As far as I know, this is the not the output of IBM's JRE.

What to check now:

  • Whats the JAVA_HOME variable in your /QIBM/ProdData/IBMiDebugService/bin/DebugService.env file? (it should be /QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit).
  • What's your system JAVA_HOME?
  • From a terminal, what's the output of this command?
/QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit/bin/java -version

@DamianoBonato
Copy link
Author

DamianoBonato commented Jul 5, 2024

In my file /QIBM/ProdData/IBMiDebugService/bin/DebugService.env there isn't the variable JAVA_HOME .

Here is the content of the file :

 ************Inizio dei dati****************                                                      
#!/bin/sh                                                                                         
#                                                                                                 
#    Licensed Materials - Property of IBM                                                         
#    (C) Copyright IBM Corporation 2022, 2023. All rights reserved.                               
#    US Government Users Restricted Rights - Use, duplication or disclosure                       
#    restricted by GSA ADP Schedule Contract with IBM Corp.                                       
#                                                                                                 
#  The source code for this program is not published or otherwise                                 
#  divested of its trade secrets, irrespective of what has been                                   
#  deposited with the U.S. Copyright Office.                                                      
#                                                                                                 
# Environment settings for IBM i Debug Service for remote debugging                               
#                                                                                                 
# The installation directory of IBM i Debug Service                                               
DBGSRV_ROOT=/QIBM/ProdData/IBMiDebugService                                                       
                                                                                                  
# The directory for IBM i Debug Service working files                                             
# IBM i Debug Service runs as a headless Eclipse application. This is the parent folder for all  
# Eclipse workspaces. The job need write permission to this directory.                                         
DBGSRV_WRK_DIR=/QIBM/UserData/IBMiDebugService                                                                 
                                                                                                               
# The workspace folder for the start debug service application                                                 
STR_DBGSVR_WRK_DIR=$DBGSRV_WRK_DIR/startDebugService_workspace                                                 
                                                                                                               
# The workspace folder for the stop debug service application                                                  
STOP_DBGSVR_WRK_DIR=$DBGSRV_WRK_DIR/stopDebugService_workspace                                                 
                                                                                                               
# Port numbers used by IBM i Debug Service                                                                     
# In secured mode, we need to set both DBGSRV_PORT and DBGSRV_SECURED_PORT.                                    
# In unsecured mode, we only need to set DBGSRV_PORT.                                                          
#                                                                                                              
# DBGSRV_PORT: The port number the debug daemon is listening on.                                               
# In unsecured mode, this port is used for the communication between the debug client and IBM i Debug Service. 
# In secured mode, this port is only used to stop the Debug Service.                                           
DBGSRV_PORT=8001 
# DBGSRV_SECURED_PORT: The port number for secured communication between debug client and IBM i Debug Service. 
# This line can be commented out if secured mode is not used.                                                  
DBGSRV_SECURED_PORT=8005                                                                                       
                                                                                                               
# DBGSRV_SEP_DAEMON_PORT: The port number for secured communication between the debug client and               
# the   st service entry point daemon. DBGSRV_SEP_DAEMON_PORT is used to relay debug information               
# back to the client when a service entry point is hit.                                                        
DBGSRV_SEP_DAEMON_PORT=8008                                                                                    
                                                                                                               
# Uncomment the following line to set the trace flag for Debug Adapter Protocol (DAP) tracing                  
# True to turn DAP tracing on                                                                                  
# TRACE_FLAG=false                                                                                             
                                                                                                               
# Uncomment the following line to set the logging flag                                                         
# True to turn logging on. Logging is turned on by default.                                                    
# Log file path: /QIBM/UserData/IBMiDebugService/DebugService_log.txt                                          
# LOGGING_FLAG=true     
# Uncomment the following line to set the IBMIDEBUG_LOCALONLY environment variable.                 
# IBM i Debug Service can only connect to the debug router (QB5ROUTER) on the same host,            
# if IBMIDEBUG_LOCALONLY is not set or set to true. Setting IBMIDEBUG_LOCALONLY to false will allow 
# IBM i Debug Service to run on a different machine than the debug router.                          
# IBMIDEBUG_LOCALONLY=true   

Second response
"With what command can I determine the my JAVA_HOME ?

Third response

image

Seb edit: format env file content

@DamianoBonato
Copy link
Author

In my opinion, something is missing in my file /QIBM/ProdData/IBMiDebugService/bin/DebugService.env although I'm not sure why.

@sebjulliand
Copy link
Collaborator

This is true. All the values that must be generated by Code for i are missing. This means that the certificates will have to be regenerated.

Moreover, I checked what's the java -version output for Java 11 on PUB400 and as you can see it's a bit different:
image

Maybe Java 11 on your system is not the latest version. This i don't know.
But in their current state, the scripts provided by IBM to manage the Debug Service will not work out of the box with this version of Java 11.

I will work on a future version of Code for i to add an automatic change to these scripts so they can handle these versions discrepancies.

For the time being, you'll have to do the following. First, edit these three scripts:

  • /QIBM/ProdData/IBMiDebugService/bin/encryptKeystorePassword.sh
  • /QIBM/ProdData/IBMiDebugService/bin/startDebugService.sh
  • /QIBM/ProdData/IBMiDebugService/bin/stopDebugService.sh

All these scripts have this line:
image

You have to change it this way (remove java from the string being tested:
image

Once this is done, delete any existing certificate (clear the /QIBM/UserData/IBMiDebugService/certs folder).
Reconnect to your system, go to the IBM i Debugger view. The Debug Service node must ask you to generate its certificate. Click on the button to do so and once its been generated, try to start the Debug Service.

@DamianoBonato
Copy link
Author

Ciao Sebastien ,
After completing the entire procedure, after regenerating the certificates, upon starting the service, I receive the following message :
image
If I execute DSPJOB..
image

@DamianoBonato
Copy link
Author

"In the IBM i system of one of our clients, after completing all the steps you suggested, I get the following message."
image
Thank you again for your support and patience, but without you, I wouldn't be able to move forward .

@sebjulliand
Copy link
Collaborator

My pleasure 😄
For the SSH channel open failure, I can't say why, but I can suggest you try to start the service from 5250 directly now that you configured it from Code for i.

Run this command:

SBMJOB CMD(STRQSH CMD('/QOpenSys/pkgs/bin/bash -c /QIBM/ProdData/IBMiDebugService/bin/startDebugService.sh')) JOB(DBGSVCE) JOBQ(QSYS/QUSRNOMAX) JOBD(QSYS/QSYSJOBD) USER(*CURRENT)

Then check DBGSVCE job status; if it's still running after 20 seconds, there are good chances the service is now up and running. At this point, you can refresh the IBM i debugger view and it should show the service as being running.

As for your client's error, this is new...it seems to be a Java version related error. What's their Java version, debug service version and /QIBM/ProdData/IBMiDebugService/bin/DebugService.env content?

@DamianoBonato
Copy link
Author

DamianoBonato commented Jul 5, 2024

As for the debug service on the IBM i system at our headquarters, everything worked fine without doing anything. I can't say why. I just re-established the connection .
J'm very happy !!!
image

"As for the client's Java version..."
image

Debug service version :
image

/QIBM/ProdData/IBMiDebugService/bin/DebugService.env content :

#!/bin/sh
#
#  		Licensed Materials - Property of IBM
#  		(C) Copyright IBM Corporation 2022, 2023. All rights reserved.
#  		US Government Users Restricted Rights - Use, duplication or disclosure
#  		restricted by GSA ADP Schedule Contract with IBM Corp.
#  
#  The source code for this program is not published or otherwise
#  divested of its trade secrets, irrespective of what has been
#  deposited with the U.S. Copyright Office.
#
# Environment settings for IBM i Debug Service for remote debugging
#
# The installation directory of IBM i Debug Service
DBGSRV_ROOT=/QIBM/ProdData/IBMiDebugService

# The directory for IBM i Debug Service working files
# IBM i Debug Service runs as a headless Eclipse application. This is the parent folder for all
# Eclipse workspaces. The job need write permission to this directory.
DBGSRV_WRK_DIR=/QIBM/UserData/IBMiDebugService

# The workspace folder for the start debug service application
STR_DBGSVR_WRK_DIR=$DBGSRV_WRK_DIR/startDebugService_workspace

# The workspace folder for the stop debug service application
STOP_DBGSVR_WRK_DIR=$DBGSRV_WRK_DIR/stopDebugService_workspace

# Port numbers used by IBM i Debug Service
# In secured mode, we need to set both DBGSRV_PORT and DBGSRV_SECURED_PORT.
# In unsecured mode, we only need to set DBGSRV_PORT.
#
# DBGSRV_PORT: The port number the debug daemon is listening on.
# In unsecured mode, this port is used for the communication between the debug client and IBM i Debug Service.
# In secured mode, this port is only used to stop the Debug Service.
DBGSRV_PORT=8001

# DBGSRV_SECURED_PORT: The port number for secured communication between debug client and IBM i Debug Service.
# This line can be commented out if secured mode is not used.
DBGSRV_SECURED_PORT=8005

# DBGSRV_SEP_DAEMON_PORT: The port number for secured communication between the debug client and
# the   st service entry point daemon. DBGSRV_SEP_DAEMON_PORT is used to relay debug information
# back to the client when a service entry point is hit.
DBGSRV_SEP_DAEMON_PORT=8008

# Uncomment the following line to set the trace flag for Debug Adapter Protocol (DAP) tracing
# True to turn DAP tracing on
# TRACE_FLAG=false

# Uncomment the following line to set the logging flag
# True to turn logging on. Logging is turned on by default.
# Log file path: /QIBM/UserData/IBMiDebugService/DebugService_log.txt
# LOGGING_FLAG=true

# Uncomment the following line to set the IBMIDEBUG_LOCALONLY environment variable.
# IBM i Debug Service can only connect to the debug router (QB5ROUTER) on the same host, 
# if IBMIDEBUG_LOCALONLY is not set or set to true. Setting IBMIDEBUG_LOCALONLY to false will allow 
# IBM i Debug Service to run on a different machine than the debug router. 
# IBMIDEBUG_LOCALONLY=true

Edit Seb: added format

@sebjulliand
Copy link
Collaborator

Nice! I'm glad it works on your system. I guess the command was correctly submitted for Code for i but it just failed to check its status (because of an issue that will be fixed soon). But it ran fine, so...hooray!

For the client's issue, their problem is they are trying to use Debug Service v2 with Java 8, apparently.
image

Do they have Java 11 installed on their system?

@DamianoBonato
Copy link
Author

The client's Java version is as follows :
image
The PTF is installed
image
image

Thank you Sebastien, because I don't even get such competent and fast support from my colleagues at work.

@sebjulliand
Copy link
Collaborator

Prego 😊
Can you check if they have Java 11 installed here? /QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit
If it isn't they won't be able to start the debugger until it is installed. Since they have installed the PTF for debugger v2, they will need Java 11.

@DamianoBonato
Copy link
Author

It seems that Java is installed

image

If I understand your request correctly...

@DamianoBonato
Copy link
Author

Ciao Sebastien ,
I absolutely want to solve the issue with the debug service for the client; I'm giving it my all. I am comparing the debug service configuration files of the IBM i at our office with those of the client.

image

Option 22 :
image
image

Option 22
image

Where does it take the value jdk80 when all configuration files express java 11

Es .
image

image

I don't understand where I'm going wrong.

@sebjulliand
Copy link
Collaborator

Ciao!

I did some research on this JVMCFRE067 error and it seems that it happens when a .class file is damaged.
In this case, that would be /QIBM/ProdData/IBMiDebugService/bin/EncryptPassword.class.

Can you please run these two commands on your system and on your client's from a PASE terminal and compare the output? (paste them both here)

attr /QIBM/ProdData/IBMiDebugService/bin/EncryptPassword.class ccsid
md5sum /QIBM/ProdData/IBMiDebugService/bin/EncryptPassword.class

Thanks!

@chrjorgensen
Copy link
Collaborator

@DamianoBonato As an IBM i system admin I immediately notice that your system admin has not updated the system with PTF group SF99725!

PTF group SF99725 contains all updates for ALL Java versions in 5770-JV1, including Java11. And the Java11 version on the system in trouble is from 2020, which means a lot of fixes and security enhancements has not yet been applied.

Please have the system admin update the IBM i with all latest PTF groups (or at least the Java PTF group) - a new function such as the debug service will not run well on old versions of the OS components. Keeping the system updated saves a lot of time and trouble - and worries about security!

@DamianoBonato
Copy link
Author

Thank you, Sebastien. I will have the system administrator check what you reported and will update you. Thanks again.

@DamianoBonato
Copy link
Author

Ciao Sebastien , On both systems, the command attr /QIBM/ProdData/IBMiDebugService/bin/EncryptPassword.class ccsid gives the following value
image
image
PTFs updated but the result is still this :
image
Thank you for your patience .
Damiano .

@sebjulliand
Copy link
Collaborator

@DamianoBonato try qualifying the full path to md5sum before running it:

/QOpenSys/pkgs/bin/md5sum /QIBM/ProdData/IBMiDebugService/bin/EncryptPassword.class

@DamianoBonato
Copy link
Author

On the customer's system :
image

On my system :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug client issue (IBM)
Projects
None yet
Development

No branches or pull requests

4 participants