IBM / ansible-for-i

the tool is to provide several customized modules for Ansible to manage IBM i systems.
GNU General Public License v3.0
55 stars 51 forks source link

ibmi_rtv_command fails with "MESSAGE_ID": "CPD7C8D", "MESSAGE_TEXT": "Error in line 25: Invalid character in program." #123

Closed krka01 closed 2 years ago

krka01 commented 2 years ago

Hi,

ibm.power_ibmi.ibmi_rtv_command fails with "MESSAGE_ID": "CPD7C8D", "MESSAGE_TEXT": "Error in line 25: Invalid character in program.", "MESSAGE_SECOND_LEVEL_TEXT": "&N Cause . . . . . : The program includes a character, outside of a literal string, that is not a blank or one of the following: A-Z, a-z, 0-9, question mark, exclamation point, period, underscore, ampersand, asterisk, parenthesis, minus sign, plus sign, back slash, single quotation mark, double quotation mark, semicolon, colon, less than sign, greater than sign, comma, percent sign, not sign, and slash. &N Recovery . . . : Ensure that only the characters listed above are used, and try the request again."

Have tried both RTVJOBA and RTVDTAARA as the provided examples but receives the same error. Have anyone got the ibm.power_ibmi.ibmi_rtv_command to work?

Thanks in advance.

changlexc commented 2 years ago

I tried on my system, it's OK. Do you mind send all the output for me from your manage node(the system you run this command)? And if possible, send me the ansible log from the target system(IBMi) under /var/log/?

krka01 commented 2 years ago

Hi,

Thanks for the response.

I run the managing node in a Widows 10 WSL envirionment (ansible core 2.11.6 and collection ibm.power_ibmi 1.6.0. The the target system is an IBM i 7.4 system with 2937 Swedish as the primary language with CCSID 278. I suspect this could be language conversion problem, but I am not sure. The user on the managing node is using locale en_US.UTF-8 and I have changed the target user with no locale set and with both sv_SE and en_US, but the ibmi_rtv_command still fails. Executing the playbook does not create any entries in the /var/log/ibmi_ansible_modules.log

Output (I have changed the system as mysystem.domain.com and the user as MYUSER):

TASK [Call RTVDTAARA to get content of a data area] *** fatal: [mysystem.domain.com]: FAILED! => {"args_dict": {"RTNVAR": "chars"}, "changed": false, "job_log": [{"FROM_INSTRUCTION": "003C", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QREPMSGS", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPD7C8D", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": "&N Cause . . . . . : The program includes a character, outside of a literal string, that is not a blank or one of the following: A-Z, a-z, 0-9, question mark, exclamation point, period, underscore, ampersand, asterisk, parenthesis, minus sign, plus sign, back slash, single quotation mark, double quotation mark, semicolon, colon, less than sign, greater than sign, comma, percent sign, not sign, and slash. &N Recovery . . . : Ensure that only the characters listed above are used, and try the request again.", "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "Error in line 25: Invalid character in program.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:02.310048", "MESSAGE_TYPE": "DIAGNOSTIC", "ORDINAL_POSITION": 11, "SEVERITY": 30, "TO_INSTRUCTION": "13", "TO_LIBRARY": "QSYS", "TO_MODULE": "QC2SYS", "TO_PROCEDURE": "system", "TO_PROGRAM": "QC2SYS"}, {"FROM_INSTRUCTION": "1661", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QSYGRAUT", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPC2201", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": null, "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "Objektbehörighet har kopierats.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:02.158589", "MESSAGE_TYPE": "COMPLETION", "ORDINAL_POSITION": 10, "SEVERITY": 0, "TO_INSTRUCTION": "5841", "TO_LIBRARY": "QXMLSERV", "TO_MODULE": "PLUGILE", "TO_PROCEDURE": "ILECMDEXC", "TO_PROGRAM": "XMLSTOREDP"}, {"FROM_INSTRUCTION": "1661", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QSYGRAUT", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPI2201", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": null, "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "Användaren PUBLIC har fått behörighet till objektet XMLREXX av typen FILE i QTEMP.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:02.158505", "MESSAGE_TYPE": "INFORMATIONAL", "ORDINAL_POSITION": 9, "SEVERITY": 0, "TO_INSTRUCTION": "1661", "TO_LIBRARY": "QSYS", "TO_MODULE": null, "TO_PROCEDURE": null, "TO_PROGRAM": "QSYGRAUT"}, {"FROM_INSTRUCTION": "005B", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QDDCPFM", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPC7305", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": null, "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "Member HOW added to file XMLREXX in QTEMP.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:02.153713", "MESSAGE_TYPE": "COMPLETION", "ORDINAL_POSITION": 8, "SEVERITY": 0, "TO_INSTRUCTION": "5841", "TO_LIBRARY": "QXMLSERV", "TO_MODULE": "PLUGILE", "TO_PROCEDURE": "ILECMDEXC", "TO_PROGRAM": "XMLSTOREDP"}, {"FROM_INSTRUCTION": "054B", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QDDCPF", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPC7301", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": null, "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "File XMLREXX created in library QTEMP.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:02.145469", "MESSAGE_TYPE": "COMPLETION", "ORDINAL_POSITION": 7, "SEVERITY": 0, "TO_INSTRUCTION": "5841", "TO_LIBRARY": "QXMLSERV", "TO_MODULE": "PLUGILE", "TO_PROCEDURE": "ILECMDEXC", "TO_PROGRAM": "XMLSTOREDP"}, {"FROM_INSTRUCTION": "9558", "FROM_LIBRARY": "QSYS", "FROM_MODULE": "QSQSRVR", "FROM_PROCEDURE": "QSQSRVR", "FROM_PROGRAM": "QSQSRVR", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPF9898", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": "&N Cause . . . . . : This message is used by application programs as a general escape message.", "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "SERVER MODE CONNECTING JOB IS 975108/QSECOFR/QP0ZSPWP.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:01.793312", "MESSAGE_TYPE": "COMPLETION", "ORDINAL_POSITION": 6, "SEVERITY": 40, "TO_INSTRUCTION": "9558", "TO_LIBRARY": "QSYS", "TO_MODULE": "QSQSRVR", "TO_PROCEDURE": "QSQSRVR", "TO_PROGRAM": "QSQSRVR"}, {"FROM_INSTRUCTION": "9467", "FROM_LIBRARY": "QSYS", "FROM_MODULE": "QSQSRVR", "FROM_PROCEDURE": "QSQSRVR", "FROM_PROGRAM": "QSQSRVR", "FROM_USER": "MYUSER", "MESSAGE_FILE": null, "MESSAGE_ID": null, "MESSAGE_LIBRARY": null, "MESSAGE_SECOND_LEVEL_TEXT": null, "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "User Profile = MYUSER ", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:01.789864", "MESSAGE_TYPE": "COMPLETION", "ORDINAL_POSITION": 5, "SEVERITY": 0, "TO_INSTRUCTION": "9467", "TO_LIBRARY": "QSYS", "TO_MODULE": "QSQSRVR", "TO_PROCEDURE": "QSQSRVR", "TO_PROGRAM": "QSQSRVR"}, {"FROM_INSTRUCTION": "11F3", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QWTCHGJB", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPF1301", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": "&N Orsak . . . . . : Jobb-resursens konteringsuppgifter för jobbet 971904/QUSER/QSQSRVR bokfördes inte i systemets konteringsjournal QSYS/QACGJRN. &P -- Orsakskoder och deras betydelse visas nedan: &P -- 1-Systemvärdet QACGLVL (konteringsnivå) anger att den här nivån av resurskontering inte skulle göras när jobbet lades ut. &P -- 2-Konteringsjournalen QSYS/QACGJRN kan inte ta emot data. Konteringsdata skickades till historikloggen (QHST) som texten i meddelandet CPF1303. Se CPF1302 i historikloggen (QHST) för åtgärder. &P -- 3-Konteringsjournalen QSYS/QACGJRN var allokerad av ett annat jobb. Konteringsdata skickades till historikloggen (QHST) som texten i meddelandet CPF1303.", "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "ACGDTA för 971904/QUSER/QSQSRVR har inte journalförts. Orsakskod 1.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:01.789787", "MESSAGE_TYPE": "INFORMATIONAL", "ORDINAL_POSITION": 4, "SEVERITY": 30, "TO_INSTRUCTION": "9376", "TO_LIBRARY": "QSYS", "TO_MODULE": "QSQSRVR", "TO_PROCEDURE": "QSQSRVR", "TO_PROGRAM": "QSQSRVR"}, {"FROM_INSTRUCTION": "31A6", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QWTCHGJB", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPD1672", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": "&N Orsak . . . . . : Begäran att ändra jobbattributen har avslutats. Det uppstod dock fel under bearbetningen. &N Åtgärd . . . . : Se tidigare meddelanden för mer information.", "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "Jobbet har ändrats, men fel har uppstått.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:01.789614", "MESSAGE_TYPE": "DIAGNOSTIC", "ORDINAL_POSITION": 3, "SEVERITY": 0, "TO_INSTRUCTION": "9369", "TO_LIBRARY": "QSYS", "TO_MODULE": "QSQSRVR", "TO_PROCEDURE": "QSQSRVR", "TO_PROGRAM": "QSQSRVR"}, {"FROM_INSTRUCTION": "31A6", "FROM_LIBRARY": "QSYS", "FROM_MODULE": null, "FROM_PROCEDURE": null, "FROM_PROGRAM": "QWTCHGJB", "FROM_USER": "MYUSER", "MESSAGE_FILE": "QCPFMSG", "MESSAGE_ID": "CPD0912", "MESSAGE_LIBRARY": "QSYS", "MESSAGE_SECOND_LEVEL_TEXT": "&N Orsak . . . . . : Skrivaren finns inte. &N Åtgärd . . . . : Skapa enhetsbeskrivning för skrivaren (kommandot CRTDEVPRT) eller ändra skrivarens namn (parametern PRTDEV) och försök igen.", "MESSAGE_SUBTYPE": null, "MESSAGE_TEXT": "Det finns ingen skrivare med namnet PRT01.", "MESSAGE_TIMESTAMP": "2022-01-17T15:26:01.788507", "MESSAGE_TYPE": "DIAGNOSTIC", "ORDINAL_POSITION": 2, "SEVERITY": 20, "TO_INSTRUCTION": "9369", "TO_LIBRARY": "QSYS", "TO_MODULE": "QSQSRVR", "TO_PROCEDURE": "QSQSRVR", "TO_PROGRAM": "QSQSRVR"}], "msg": "non-zero return code:255, error: {'error': '* error RTVDTAARA DTAARA(QSYS/QAENGWTTM) RTNVAR(?)', 'error1': 'CPF7CFD', 'version': 'XML Toolkit 2.0.2-dev', 'xmlhint': 'RTVDTAARA DTAARA(QSYS/QAENGWTTM) RTNVAR(?)', 'xmlhint2': 'RTVDTAARA DTAARA(QSYS/QAENGWTTM) RTNVAR(?)', 'jobipc': '*na', 'jobipcskey': 'FFFFFFFF', 'jobname': 'QSQSRVR', 'jobuser': 'QUSER', 'jobnbr': '971904', 'curuser': 'MYUSER', 'ccsid': '278', 'dftccsid': '278', 'paseccsid': '0', 'syslibl': 'QSYS QSYS2 QHLPSYS QUSRSYS', 'usrlibl': 'QGPL OUTQLIB QTEMP'}", "output": {}, "rc": 255}

PLAY RECAP ** mysystem.domain.com : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

changlexc commented 2 years ago

Have you ever tried reinstall 5770DG1, then install the newest XML Service PTFs( SI75969 for V7R4, SI75968 for V7R3)?

changlexc commented 2 years ago

By the way, the module ibmi_module_config could change the log_dir to /tmp and log_level to debug if you still can not get log entries unner /var/log, the /var/log dir sometimes may have authority problem so the user that run Ansible can not write log into it.

For example:

- name: Config the logging as debug level
  ibm.power_ibmi.ibmi_module_config:
    section: log_config
    log_dir: /tmp
    log_level: debug
krka01 commented 2 years ago

Thanks for the reply. I looked into this issue again and discovered the following

We have recently installed PTF on some of our IBM i 7.4 systems with TR5 and the latest cumulative and group PTF's and we have also installed the most recent version of the following python package/modules from the IBM i Open Source repository:

On those systems we have patched the ibm.power_ibmi.ibmi_rtv_command actually works now, but those system we have not patched yet still fails, so this problem seems to be either something with the python package/modules or an IBM i PTF fixed the problem.

Never the less, I think this issue can be closed.