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

Fix - install ps, which is necessary for starting Bloop #2332

Merged
merged 3 commits into from
Aug 7, 2023

Conversation

lwronski
Copy link
Contributor

@lwronski lwronski commented Aug 6, 2023

The latest docker image version, debian:stable-slim, doesn't include ps. I added the installation of ps to ensure bloop starts correctly; without it, the following error was thrown during Bloop's initialization:

 Exception in thread "main" java.io.IOException: Cannot run program "ps": 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 scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:75)
 	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:119)
 	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:135)
 	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:108)
 	at libdaemonjvm.internal.Processes$.isRunning(Processes.scala:20)
 	at libdaemonjvm.internal.LockProcess$Default.$anonfun$isRunning$2(LockProcess.scala:16)
 	at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:23)
 	at scala.Option.getOrElse(Option.scala:189)
 	at libdaemonjvm.internal.LockProcess$Default.isRunning(LockProcess.scala:16)
 	at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6(Lock.scala:76)
 	at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6$adapted(Lock.scala:75)
 	at scala.Option.flatMap(Option.scala:271)
 	at libdaemonjvm.server.Lock$.ifFiles$1(Lock.scala:75)
 	at libdaemonjvm.server.Lock$.tryAcquire(Lock.scala:94)
 	at bloop.Bloop$.loop$1(Bloop.scala:95)
 	at bloop.Bloop$.main(Bloop.scala:113)
 	at bloop.Bloop.main(Bloop.scala)
 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:1143)
 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
 	at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:75)
 	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBuilderImpl.scala:119)
 	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:135)
 	at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:108)
 	at libdaemonjvm.internal.Processes$.isRunning(Processes.scala:20)
 	at libdaemonjvm.internal.LockProcess$Default.$anonfun$isRunning$2(LockProcess.scala:16)
 	at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:23)
 	at scala.Option.getOrElse(Option.scala:189)
 	at libdaemonjvm.internal.LockProcess$Default.isRunning(LockProcess.scala:16)
 	at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6(Lock.scala:76)
 	at libdaemonjvm.server.Lock$.$anonfun$tryAcquire$6$adapted(Lock.scala:75)
 	at scala.Option.flatMap(Option.scala:271)
 	at libdaemonjvm.server.Lock$.ifFiles$1(Lock.scala:75)
 	at libdaemonjvm.server.Lock$.tryAcquire(Lock.scala:94)
 	at bloop.Bloop$.loop$1(Bloop.scala:95)
 	at bloop.Bloop$.main(Bloop.scala:113)
 	at bloop.Bloop.main(Bloop.scala)
 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)

Copy link
Member

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though would be good not to require ps to exist at all

@lwronski lwronski merged commit 654950a into VirtusLab:main Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants