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

**URL:** <https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149>\
**Category:** App Development\
**Created:** [August 30, 2022, 6:55pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149 "2022-08-30T18:55:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [August 30, 2022, 6:55pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/1 "2022-08-30T18:55:23Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [August 30, 2022, 7:04pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/2 "2022-08-30T19:04:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [August 30, 2022, 7:08pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/3 "2022-08-30T19:08:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [August 30, 2022, 7:12pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/4 "2022-08-30T19:12:50Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [August 31, 2022, 1:31pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/5 "2022-08-31T13:31:00Z")

</div>

Thank you! Problem solved!

---

<div class="post-metadata">

**Author:** ![Teja\_Satyanarayana](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/teja_satyanarayana/32/5418_2.png) [@Teja\_Satyanarayana](https://forum.canton.network/u/Teja_Satyanarayana)\
**Post date:** [February 11, 2023, 6:42pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/7 "2023-02-11T18:42:16Z")

</div>

Facing similar issue , Any help will be greatly appreciated.

 ![Captures1](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/4/4fa23862aba5966da76c53af9ae8529ef7a61e48.png)

 ![Captures2](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/c/c338739ff5d1c6a61f5008af2088f3be941eda08.png)

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [February 12, 2023, 8:08am UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/8 "2023-02-12T08:08:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ayush\_Aman](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/ayush_aman/32/6968_2.png) [@Ayush\_Aman](https://forum.canton.network/u/Ayush_Aman)\
**Post date:** [July 19, 2023, 7:45am UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/9 "2023-07-19T07:45:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rohit\_daml1](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/rohit_daml1/32/6997_2.png) [@rohit\_daml1](https://forum.canton.network/u/rohit_daml1)\
**Post date:** [October 12, 2023, 9:35am UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/11 "2023-10-12T09:35:51Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![bguimaraes](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@bguimaraes](https://forum.canton.network/u/bguimaraes)\
**Post date:** [July 12, 2024, 5:25pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/12 "2024-07-12T17:25:49Z")

</div>

![image](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/7/7ae666be84978b89f47c72b9e6c8ba6a14834b40.png)  
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?

---

<div class="post-metadata">

**Author:** ![bguimaraes](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@bguimaraes](https://forum.canton.network/u/bguimaraes)\
**Post date:** [July 12, 2024, 5:26pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/13 "2024-07-12T17:26:47Z")

</div>

here are the environment vars

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/2/299fa95c70904ffe52c95d24d3ef2f0965ac5aba.png)

---

<div class="post-metadata">

**Author:** ![a\_putkov](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/a_putkov/32/2971_2.png) [@a\_putkov](https://forum.canton.network/u/a_putkov)\
**Post date:** [July 15, 2024, 4:38pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/14 "2024-07-15T16:38:20Z")

</div>

@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”.

---

<div class="post-metadata">

**Author:** ![bguimaraes](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@bguimaraes](https://forum.canton.network/u/bguimaraes)\
**Post date:** [July 15, 2024, 9:07pm UTC](https://forum.canton.network/t/daml-extension-error-message-the-daml-language-server-crashed-5-times-in-last-3-minutes-the-server-will-not-be-restarted/5149/15 "2024-07-15T21:07:05Z")

</div>

working like a charm thanks a lot!!
