Overview
This article explains the exit codes returned by JetPatch's built-in and user-uploaded scripts on Linux and Windows endpoints.
For more detailed logging, review the connector logs on the endpoint.
For issues affecting multiple machines, check the manager logs.
JetPatch Built-In Scripts
The following table covers exit codes for JetPatch built-in scripts.
| Script (OS) | Exit Code | Description | Meaning and Next Step |
| execute patch (All) | 1 | {"Installations": [{"UpdateId":"", "KB":"", "status":"install/remove/download_fail", "transactionId":""}]} | All: Failed RP installation (exit code 1) |
| execute patch (Linux) | 5 | Could not get script file output | Check the endpoint's date and time settings - it may be incorrect. |
|
Check if Linux Reboot is Required Check if Linux Reboot is Required and Reboot if Needed |
10 |
Check if Linux Reboot is Required Check if Linux Reboot is Required and Reboot if Needed |
No Restart Required. |
| execute patch (Linux) | 11 | Could not get script file output | The script didn't get the maintenance window start time from the Manager. |
| execute patch (Linux) | 12 | Could not get script file output |
The script didn't get the maintenance window end time from the Manager. Retry. |
| Collect Endpoint Updates (Linux) | 13 | This endpoint is not registered to Red Hat Subscription Management. Please check the Red Hat subscription. |
No subscription found for this endpoint. Check RHEL subscription and run: yum repolist yum updateinfo list |
| execute patch (Linux) | 13 | Could not get script file output | The script didn't get package/advisories to install/remove. |
| Collect Endpoint Updates (Linux) | 62 | The system is busy with other YUM commands. Please check the yum service on the endpoint. | Another process is locking the YUM command. |
| All Scripts (Linux) | 62 |
Timeout reached from the Connector side. The script ran longer than the expected time. |
|
| Collect Endpoint Updates (Linux) | 85 |
{ "Packages": [] } { "Advisories": [] } |
The output has empty data. 1. Verify Endpoint Readiness Ensure the endpoint is correctly configured and verify 100% success. 2. Check if advisories/packages are being retrieved properly Commands: SUSE: zypper lp RHEL/OL/Amazon: yum updateinfo list For SUSE, refer to this cheat sheet. For RHEL/OL/Amazon, advisory data should look like: RHSA-2014:1031 Important/Sec. 389-ds-base-1.3.1.6-26.el7_0.x86_64 RHBA-2015:0626 bugfix 389-ds-base-1.3.3.1-15.el7_1.x86_64 If advisory data is not visible, verify the repository XML file. If correct, run: yum clean all. 3. Further Actions If advisories and packages are pulling properly: Run to reset the local update file: rm -rf /var/cache/JetPatch/scan_result.txt && /usr/local/scan_updates.sh true null null This clears the local updates file and generates a new one in the next scan. If advisories are not being pulled: Ensure the local repository is configured to pull advisories. |
| Collect Endpoint Updates (Linux) | 95 | No message | Unsupported OS. |
| Linux Reboot Command (Linux) | 127 | "...at command not found" — the at command needs to be installed. | Install the Linux at command. |
| execute patch (Windows) | 216 | PowerShell version is not supported — please upgrade to PowerShell 3. | PowerShell version not compatible with JetPatch script. Upgrade endpoint PowerShell to version 3+. |
| All Scripts (Windows) | 258 | Timeout reached from the Connector side. The task ran longer than the expected time. | Contact JetPatch support for troubleshooting and to extend the built-in timeout. |
| All JetPatch built-in scripts | 340 | The output of the script could not be parsed. |
Most often points to bad WSUS behavior. Follow the steps in |
| Pre/Post Patching scripts (All) | 340 | The word "Exception" is in the output. |
For example: a PowerShell exception or another script exception. Windows: Verify that the PowerShell policy is enabled properly. |
| execute patch (All) | 341 | { "Installations": [] } |
The output has empty data. Linux: Likely endpoint issue - troubleshoot the endpoint. Windows: See article |
| Collect Endpoint Updates (Linux) | 341 | The output of the script as expected. |
1. Check that basic package manager commands work on the machine (yum, apt-get, etc). 2. The JetPatch server may be unable to access the advisory mailing list (relevant for CentOS): CentOS 6/7: https://lists.centos.org/pipermail/centos-announce/ CentOS 8: https://cefs.steve-meier.de/ SUSE 11: https://lists.suse.com/pipermail/sle-updates/ If a proxy needs to be configured, see this article. To test for CentOS, login to the JetPatch server and run: curl -kv https://lists.centos.org/pipermail/centos-announce/ |
| Collect Endpoint Updates (AIX) | 341 | The output of the script as expected. |
No patches on the NIM repository are relevant for this device. Next Steps: Download patches to the NIM server and wait for the next collection, or run it manually. Read more on working with the NIM repository here. |
| execute patch (All) | 342 | The output of the script was not changed from the previous execution. |
The execution didn't change any patch status on the endpoint. Note: To manage Microsoft Defender updates with JetPatch, configure it accordingly, otherwise exit code 342 will occur: WSUS | WSUS-Less System Level Checks — WSUS Reasons: 1. Replica WSUS Sync: Immediately trying to patch endpoints connected to a replica WSUS. Sync can take up to 90 minutes. See article. 2. Manual Install Impact with WSUS: When a user manually installs patches via Windows Update, JetPatch only detects the change once the endpoint checks in with WSUS - which may take up to 24 hours. 3. WSUS Sync Approval: JetPatch expects to deploy additional updates but WSUS Sync Approval fails. If not approved on WSUS, try approving it manually or duplicating the RP plan and reactivating it. 4. WSUS Cleanup: If WSUS contains outdated or superseded patches, clean up WSUS and run a full WSUS sync. Machine Level Checks: 1. Run Windows Update manually on one affected machine. 2. Analyze the Windows Update log on the same affected machine. |
| All scripts (All) | -1 | Error creating virtual process. |
The connector was unable to create the process. This may be due to machine resource issues. |
Common Exit Codes for User-Uploaded Windows Scripts
The following table lists the most common exit codes for user-uploaded Windows scripts (not built by JetPatch). More information can be found here.
| Exit Code | Description | Next Step |
| -1 | JetPatch fails scripts that do not have any output. | Change the script to print a line at the beginning or end. |
| 1 | Incorrect function / General error. | Check which command raises this error. |
| 2 | The system cannot find the file specified. | Check the script code where it searches for files. |
| 3 | The system cannot find the path specified. | Check the script code where it searches for paths. |
| 5 | Access is denied. | Check Connector user permissions and relevant access for files/folders. |
| 258 | The wait operation timed out from the OS or the Connector. | Extend the task timeout in JetPatch. |
| 340 | The operation has timed out (external timeout - in WSUS server). |
Perform maintenance on WSUS. |
Common Exit Codes for User-Uploaded Linux Scripts
The following table lists the most common exit codes for user-uploaded Linux scripts (not built by JetPatch). More information can be found here.
| Exit Code | Description | Next Step |
| -1 | JetPatch fails scripts that do not have any output. | Change the script to print a line at the beginning or end. |
| 1 | General error. | Check which command raises this error. |
| 2 | Custom script issue. |
Missing keyword or command, format issue (including hidden characters), or file permission problem. |
| 3 | The system cannot find the path specified. | Check the script code where it searches for paths. |
| 5 | Access is denied. | Check Connector user permissions and relevant access for files/folders. |
| 62 | The wait operation timed out from the Connector. | Extend the task timeout in JetPatch. |
| 127 | Command not found. | Check which command raises this error, then install or fix the required action. |
| 258 | The wait operation timed out. | Extend the task timeout in JetPatch. |
|
Note: Linux supports exit codes between 0–255. An exit value greater than 255 returns an exit code modulo 256. For example, exit 3809 gives an exit code of 225 (3809 % 256 = 225). |
User Scripts Information
It is recommended to check whether exit codes have been configured for the script:
1. In JetPatch, go to System → Scripts.
2. Find the required script (filters can be used) and choose Edit.
3. In the script configuration, go to the Exit Codes tab and review any configured exit codes.
Comments
0 comments
Please sign in to leave a comment.