Skip to content
Discussions/App Development/DAML Extension error message: The DAML language server crashed 5 times in last 3 minutes. The server will not be restartedForum ↗

DAML Extension error message: The DAML language server crashed 5 times in last 3 minutes. The server will not be restarted

App Development13 posts1,604 views2 likesLast activity Jul 2024
NE
Neelam_DwivediOP
Aug 2022

I am following the ‘Introduction to DAML’ course and getting this error message when opening Main.daml from VS code. I have tried installing/uninstalling the DAML extension multiple times. Any help will be greatly appreciated!

CO
cocreature
Aug 2022

Hi @Neelam_Dwivedi and welcome to the forum!

Please go to View -> Output in VScode and then select Daml Language Server in the drop down at the bottom right and share all output with us.

NE
Neelam_Dwivedi
Aug 2022

Here you go:

2022-08-30 18:47:03.50 [INFO] [LanguageServer]
Flushed 0 logs
damlc: ScenarioServiceException “Failed to run java: bin/java: readCreateProcessWithExitCode: posix_spawnp: illegal operation (Inappropriate ioctl for device)”
[Info - 2:47:03 PM] Connection to server got closed. Server will restart.

2022-08-30 18:47:03.63 [INFO] [LanguageServer]
Flushed 0 logs
damlc: ScenarioServiceException “Failed to run java: bin/java: readCreateProcessWithExitCode: posix_spawnp: illegal operation (Inappropriate ioctl for device)”
[Info - 2:47:03 PM] Connection to server got closed. Server will restart.

2022-08-30 18:47:03.77 [INFO] [LanguageServer]
Flushed 0 logs
damlc: ScenarioServiceException “Failed to run java: bin/java: readCreateProcessWithExitCode: posix_spawnp: illegal operation (Inappropriate ioctl for device)”
[Info - 2:47:03 PM] Connection to server got closed. Server will restart.

2022-08-30 18:47:03.93 [INFO] [LanguageServer]
Flushed 0 logs
damlc: ScenarioServiceException “Failed to run java: bin/java: readCreateProcessWithExitCode: posix_spawnp: illegal operation (Inappropriate ioctl for device)”
[Info - 2:47:03 PM] Connection to server got closed. Server will restart.

2022-08-30 18:47:04.08 [INFO] [LanguageServer]
Flushed 0 logs
damlc: ScenarioServiceException “Failed to run java: bin/java: readCreateProcessWithExitCode: posix_spawnp: illegal operation (Inappropriate ioctl for device)”
[Error - 2:47:04 PM] Connection to server got closed. Server will not be restarted.

CO
cocreature
Aug 2022

That looks like JAVA_HOME is set but it is set to an empty string. Try unsetting it completely and relying on Java being in PATH or alternatively fix it so that it points to your Java installation. It is probably configured in one of these files: ~/.bash_profile, ~/.bashrc, ~/.zshrc, /etc/profile.

NE
Neelam_Dwivedi
Aug 2022

Thank you! Problem solved!

TE
Teja_Satyanarayana
Feb 2023

Facing similar issue , Any help will be greatly appreciated.

CO
cocreature
Feb 2023

JAVA_HOME needs to be set to /usr/lib/jvm/java-11topenjdk-amd64 without the /bin/java at the end.

AY
Ayush_Aman
Jul 2023

I’m also facing the same issue, java home is set to usr/bin/java and path is set to /home/ayush/.daml/bin:/home/ayush/.daml/bin:/home/ayush/.daml/bin:/home/ayush/.daml/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
Thanks.

RO
rohit_daml1
Oct 2023

in $JAVA_HOME, its shows /usr/lib/jvm/java-1.11.0-openjdk-amd64
but in output of DAML server crash:
ScenarioServiceException “Failed to run java: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: readCreateProcessWithExitCode: runInteractiveProcess: exec: does not exist (No such file or directory)”

from where do I delete /bin/java… I didn’t find it in $JAVA_HOME
Its shows in - where java:
/usr/bin/java
/bin/java

Do i delete it from there and how ?

BG
bguimaraes
Jul 2024


Hey guys i’ve been trying to setup my java_home and path exactly like i see in the instructions plus videos and its still not working can anybody help?

BG
bguimaraes
Jul 2024

here are the environment vars

A_
a_putkov
Jul 2024

@bguimaraes
Try removing “\bin” at the end of the current value of your JAVA_HOME variable. In other words, try setting JAVA_HOME to “C:\Program Files\Java\jdk-17”.

BG
bguimaraes
Jul 2024

working like a charm thanks a lot!!

← Back to Discussions