You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Sentry CLI Execution Failure when using Sentry Maven plugin
3
+
description: "Troubleshoot and resolve Sentry CLI execution failures when using the Sentry Maven plugin."
4
+
sidebar_order: 1001
5
+
---
6
+
7
+
The Sentry Maven plugin may fail to execute Sentry CLI in certain environments.
8
+
9
+
## Symptoms
10
+
11
+
- A build using `sentry-maven-plugin` fails during execution of `sentry-cli` (e.g. to collect and upload a source bundle).
12
+
- Enabling debug logs for `sentry-cli` doesn't show meaningful errors from `sentry-cli` itself.
13
+
14
+
To enable debug logs, set
15
+
16
+
```xml
17
+
<debug>false</debug>
18
+
<debugSentryCli>true</debugSentryCli>
19
+
```
20
+
21
+
in your `<configuration>` for `sentry-maven-plugin`.
22
+
23
+
You might see similar lines in the logs:
24
+
25
+
```
26
+
[ERROR] Error while attempting to run Sentry CLI:
27
+
org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "/bin/sh" [...]
28
+
```
29
+
30
+
## Solution
31
+
32
+
Add the following JVM option to switch the process launch mechanism to `vfork`:
33
+
34
+
```bash
35
+
-Djdk.lang.Process.launchMechanism=vfork
36
+
```
37
+
38
+
## Related Issue
39
+
40
+
For more details about this issue and the investigation process, see [GitHub Issue #169](https://github.com/getsentry/sentry-maven-plugin/issues/169).
41
+
42
+
If this doesn't solve the problem, please [open a new issue on GitHub](https://github.com/getsentry/sentry-maven-plugin/issues/new/choose).
0 commit comments