# java.io.IOException: Cannot run program

**URL:** <https://community.sonarsource.com/t/java-io-ioexception-cannot-run-program/126895>\
**Category:** SonarQube Server / Community Build\
**Created:** [September 28, 2024, 6:14am UTC](https://community.sonarsource.com/t/java-io-ioexception-cannot-run-program/126895 "2024-09-28T06:14:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![caglary](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/caglary/32/62481_2.png) [@caglary](https://community.sonarsource.com/u/caglary)\
**Post date:** [September 28, 2024, 6:14am UTC](https://community.sonarsource.com/t/java-io-ioexception-cannot-run-program/126895/1 "2024-09-28T06:14:44Z")

</div>

Hi,

We are considering to switch from SonarQube Community Edition to Developer Edition. One of our code base could not analyzed by sonarqube scanner in developer edition. Scanner failed with an error[1]. In community edition scanner was able to completed successfully. Our sales representative does not provide any help.

- SonarQube Version: 10.6 Developer Edition Trial Edition
- how is SonarQube deployed: Docker
- steps: in ci file there is such configuration to run sonarqube scanner. I switched scanner host address, token and project key.

```auto
sonarqube-check:
  image:
    name: sonarsource/sonar-scanner-cli:10.0
    entrypoint: [""]
  variables:
    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
    GIT_DEPTH: "0"
    SONAR_SCANNER_JAVA_OPTS: "-Xmx512m"
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
  script:
    - sonar-scanner -Dsonar.qualitygate.wait=true -X

```

- what have you tried so far to achieve this:
- I tried to increase RAM limit with `SONAR_SCANNER_OPTS` and `-Xmx512m`

[1]

```auto
20:37:46.933 ERROR: Exception in thread pool-5-thread-1
java.lang.IllegalStateException: java.io.IOException: Cannot run program "/builds/metunic/app/blesta/.scannerwork/.sonartmp/11672376920307524952/subprocess" (in directory "."): error=2, No such file or directory
    at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:74)
    at com.sonar.cpp.plugin.CFamilySensor$AutoScanUtils.generateAutoScanMacros(CFamilySensor.java:939)
    at com.sonar.cpp.plugin.CFamilySensor$AutoScanUtils.lambda$generateAutoScanMacros$2(CFamilySensor.java:864)
    at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: Cannot run program "/builds/metunic/app/blesta/.scannerwork/.sonartmp/11672376920307524952/subprocess" (in directory "."): error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:72)
    ... 8 common frames omitted
Caused by: java.io.IOException: error=2, No such file or directory
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 10 common frames omitted

```

---

<div class="post-metadata">

**Author:** ![Abbas](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/abbas/32/5717_2.png) [@Abbas](https://community.sonarsource.com/u/Abbas)\
**Post date:** [September 30, 2024, 9:25am UTC](https://community.sonarsource.com/t/java-io-ioexception-cannot-run-program/126895/4 "2024-09-30T09:25:41Z")

</div>

Hey @caglary,

It seems that you have C and C++ code.  
C and C++ code started to be supported with docker recently through [AutoConfig mode](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/c-family/analysis-modes/).

The issues that you are facing are because older scanner docker images used Alpine, and C&C++ analysis isn’t supported on Alpine.

The issue should be fixed by bumping `sonar-scanner-cli:10.0` to `11.1`.

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [October 13, 2024, 3:51pm UTC](https://community.sonarsource.com/t/java-io-ioexception-cannot-run-program/126895/6 "2024-10-13T15:51:07Z")

</div>

Closed on October 13, 2024, 3:51pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
