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

Failed to get Db2 level: NOT AUTHORIZED TO COMMAND WRKPTFGRP #239

Closed
JDubbTX opened this issue Jun 19, 2024 · 5 comments
Closed

Failed to get Db2 level: NOT AUTHORIZED TO COMMAND WRKPTFGRP #239

JDubbTX opened this issue Jun 19, 2024 · 5 comments
Labels
question Further information is requested

Comments

@JDubbTX
Copy link

JDubbTX commented Jun 19, 2024

My organization does not give developers authority to this command, which is why the command is failing. This happens upon connection. Please use another method to get the DB2 level that does not involve 'WRK*' commands.

image

Failed to get Db2 level: NOT AUTHORIZED TO COMMAND WRKPTFGRP. (42501)
{"assetPath":"c:\\Users\\jweirich\\.vscode\\extensions\\halcyontechltd.vscode-db2i-1.0.0\\dist\\codeforiserver-1.4.9.jar","assetExists":true}
{"basename":"codeforiserver-1.4.9.jar"}
{"code":0,"signal":null,"stdout":"/home/JWEIRIC9/.vscode/","stderr":""}
{"remotePath":"/home/JWEIRIC9/.vscode/codeforiserver-1.4.9.jar","ExecutablePathDir":"$HOME/.vscode/"}
{"code":3,"transferred":[]}
Context Version
Code for IBM i version 2.11.0
Visual Studio Code version 1.89.1
Operating System win32_x64
Active extensions
COBOL (cobol): 10.6.15
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Db2 for IBM i (vscode-db2i): 1.0.0
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.18.0
Extension Authoring (extension-editing): 1.0.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
IBM i Debug (ibmidebug): 2.0.0
JSON Language Features (json-language-features): 1.0.0
Merge Conflict (merge-conflict): 1.0.0
NPM support for VS Code (npm): 1.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
TODO Highlight (vscode-todo-highlight): 1.0.5
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
WSL (remote-wsl): 0.88.2

Remote system
Setting Value
IBM i OS V7R4M0
Tech Refresh n/a
CCSID Origin 65535
Runtime CCSID 65535
Default CCSID 37
SQL Enabled
Source dates Disabled

Enabled features

/QOpenSys/pkgs/bin /usr/bin /QSYS.lib/ILEDITOR.lib /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin
bash attr GETNEWLIBL.PGM QZDFMDB2.PGM startDebugService.sh
chsh iconv
git setccsid
grep
ls
md5sum
sort
stat
tar
Shell env
BUILDLIB=QGPL
CURLIB=QGPL
HOME=/home/JWEIRIC9
HOST=gnfdev.nulsc.biz
LIBLS=QTEMP QGPL ECNCT
LOGIN=jweiric9
LOGNAME=jweiric9
MAIL=/var/spool/mail/jweiric9
OLDPWD=/home/JWEIRIC9
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin:
PWD=/home/JWEIRIC9
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=****
SSH_CONNECTION=*****
TZ=<UTC-05x00S>5
USER=jweiric9
USERNAME=jweiric9
WORKDIR=/home/JWEIRIC9
_=/QOpenSys/pkgs/bin/env
Variants
{
  "american": "#@$",
  "local": "#@$"
}
Errors
[
  {
    "command": "/QOpenSys/usr/bin/qsh",
    "code": 1,
    "stderr": "CPD0032:  Not authorized to command CRTLIB in library *LIBL.\nCPF0001:  Error found on CRTLIB command.\nCPC2206:  Ownership of object QZSHSYSTEM in QTEMP type *USRSPC changed.",
    "cwd": "/home/JWEIRIC9"
  },
  {
    "command": "ls undefined",
    "code": 2,
    "stderr": "ls: cannot access 'undefined': No such file or directory",
    "cwd": "/home/JWEIRIC9"
  }
]
@worksofliam worksofliam transferred this issue from codefori/vscode-ibmi Jun 19, 2024
@worksofliam
Copy link
Contributor

@ajshedivy is this something we shall work on together? Related to fetching system information for the SELF feature I think/?

@worksofliam
Copy link
Contributor

ServerComponent.writeOutput(`Failed to get Db2 level: ${e.message}`);

@worksofliam
Copy link
Contributor

@JDubbTX Actually there are two issues here. The database component should continue working even if the log shows Failed to get Db2 level: NOT AUTHORIZED TO COMMAND WRKPTFGRP. (42501).

It's failing to upload the server component to the right directory. May I recommend you delete /home/JWEIRIC9/.vscode/ and then try and connect again? Nothing else uses this directory but the database extension.

rm -rf /home/JWEIRIC9/.vscode/

@worksofliam worksofliam added the question Further information is requested label Jun 19, 2024
@JDubbTX
Copy link
Author

JDubbTX commented Jun 19, 2024

@worksofliam That did the trick - that particular warning is now gone. I did notice an rpglint.json in that folder, so I backed it up to my home folder. Isn't that used if doing remote IFS development?

@worksofliam
Copy link
Contributor

@JDubbTX No - that folder isn't really used for anything but the Db2 for IBM i extension I believe.

@JDubbTX JDubbTX closed this as completed Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants