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

Error starting Debug Service job after 2.0.2 update - "Environment variable DEBUG_SERVICE_KEYSTORE_PASSWORD is not set." #2412

Open
heymchri opened this issue Dec 11, 2024 · 7 comments
Labels
debug Debug client issue (IBM)

Comments

@heymchri
Copy link

Updated Debug extension from 2.0.1 to 2.0.2.
Stopped Debug Service.
Installed prereq server PTF SJ03030 on server (V7R5M0).
Restarted Debug Service.
Error: Environment variable DEBUG_SERVICE_KEYSTORE_PASSWORD is not set.

It looks like the at some point during the update process (not sure whether it's the extension or the server PTF), the DebugService.env is updated, removing the 4 lines at the end:

JAVA_HOME=/QOpenSys/QIBM/ProdData/JavaVM/jdk11/64bit
DEBUG_SERVICE_KEYSTORE_FILE=/QIBM/UserData/IBMiDebugService/certs/debug_service.pfx
DEBUG_SERVICE_KEYSTORE_PASSWORD=xIfWUJXUBsT7joaYXk6X/OEF74RA0o/hwj2VHG4/5FYyfA5Xo0WQuyrILSwXEVJtBrESmUIykGInkhKWIVSdpg==
CODE4IDEBUG=$([ -f $DBGSRV_WRK_DIR/.code4i.debug ] && cp $DBGSRV_WRK_DIR/.code4i.debug $DBGSRV_WRK_DIR/key.properties)

Is this expected behavior? This would mean that the cert needs to be regenerated which will add these 4 entries back, but that affects all users who have downloaded the client cert before?


Context Version
Code for IBM i version 2.14.5
Visual Studio Code version 1.96.0
Operating System darwin_arm64
Active extensions
.NET Install Tool (vscode-dotnet-runtime): 2.2.3
COBOL (cobol): 24.11.28
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Configuration Editing (configuration-editing): 1.0.0
Db2 for IBM i (vscode-db2i): 1.7.0
Dev Containers (remote-containers): 0.394.0
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.20.0
Excel Viewer (gc-excelviewer): 4.2.62
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
IBM i Debug (ibmidebug): 2.0.2
IBM i Project Explorer (vscode-ibmi-projectexplorer): 2.12.0
JSON Language Features (json-language-features): 1.0.0
Jira and Bitbucket (Atlassian Labs) (atlascode): 3.0.15
Merge Conflict (merge-conflict): 1.0.0
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Overtype (overtype): 0.5.0
Prettier - Code formatter (prettier-vscode): 11.0.0
Print (vscode-print): 0.13.2
Server Ready Action (debug-server-ready): 1.0.0
Source Orbit (vscode-sourceorbit): 1.0.2
TODO Highlight (vscode-todo-highlight): 1.0.5
Task Buttons (vscode-task-buttons): 1.1.3
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
YAML (vscode-yaml): 1.15.0
vscode-icons (vscode-icons): 12.9.0

Remote system
Setting Value
IBM i OS V7R5M0
Tech Refresh 4
CCSID Origin 37
Runtime CCSID 37
Default CCSID 37
SSHD CCSID ?
cqsh true
SQL Enabled
Source dates Disabled

Enabled features

/QOpenSys/pkgs/bin /usr/bin /QSYS.lib/ILEDITOR.lib /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin /QOpenSys/QIBM/ProdData/JavaVM/jdk80 /QOpenSys/QIBM/ProdData/JavaVM/jdk11 /QOpenSys/QIBM/ProdData/JavaVM/jdk17
bash attr GETNEWLIBL.PGM QZDFMDB2.PGM startDebugService.sh 64bit 64bit 64bit
chsh iconv
ls setccsid
md5sum tar
sort uname
stat
tn5250
Shell env
BUILDLIB=AEALIB
CURLIB=AEALIB
HOME=/home/HEYMCHR
HOST=usalil2c.infor.com
LIBLS=XA10M7X1O AMXLIBB AMFLIBB AEALIB AEFLIB XA10FLIB QTEMP QGPL
LOGIN=heymchr
LOGNAME=heymchr
MAIL=/var/spool/mail/heymchr
OLDPWD=/home/HEYMCHR
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/QOpenSys/usr/bin:/usr/bin
PWD=/home/HEYMCHR
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=10.61.4.156 65011 22
SSH_CONNECTION=10.61.4.156 65011 10.39.80.80 22
TGTRLS=V7R4M0
TZ=<EST>5<EDT>,M3.2.0,M11.1.0
USER=heymchr
USERNAME=heymchr
WORKDIR=/home/HEYMCHR
_=/QOpenSys/pkgs/bin/env
Variants
{
  "american": "#@$",
  "local": "#@$"
}
@worksofliam worksofliam added the debug Debug client issue (IBM) label Dec 11, 2024
@worksofliam
Copy link
Contributor

It's quite possible Code for IBM i needs some additional changes to work with debug-2.0.2. I need to look into this more.

@worksofliam
Copy link
Contributor

I guess this is expected behaviour. I suspect that the PTF being installed reset that file back to the default.

@mkwan01
Copy link

mkwan01 commented Dec 13, 2024

@heymchri You need to regenerate the SSL certificates using Code for IBM i. Code for IBM i saves the certificate settings in the DebugService.env file. These settings are gone after installing an updated debug service PTF. If you rerun the certification generation wizard, Code for IBM i will save the settings to DebugService.env again.

Please note that there is no automatic way to regenerate the certificate right now. You can remove the folder "/QIBM/UserData/IBMiDebugService/certs" from the host machine. And Code for IBM i will allow you to generate the certificate again.

@sebjulliand
Copy link
Collaborator

Don't bother removing the folder, you can also right click on the Debug Service item and choose Regenerate Service Certificate
image

@mkwan01
Copy link

mkwan01 commented Dec 13, 2024

Thanks @sebjulliand. The "Regenerate Service Certificate" could be a newer feature. I am not seeing this action in an older Code for IBM i driver.

@heymchri
Copy link
Author

As a workaround, I just save the 4 lines from the DebugService.env file before the PTF apply and then put them back into the replaced DebugService.env file after the PTF apply. Seems to work just fine.

@sebjulliand
Copy link
Collaborator

Thanks @sebjulliand. The "Regenerate Service Certificate" could be a newer feature. I am not seeing this action in an older Code for IBM i driver.

How odd, it's been here for a few months 🤔 (the related commit is from July).

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