Remote-dev-server is missing project after restart

Hi folks

I am struggling with a running remote-dev-server which is restarting (first shuts down on a Application.exit()) and then is not bound to it’s initial project any more.
One can see this when calling remote-dev-server status $PROJECT. It returns the status as json.
Initially, when remote-dev-server is started, status is sane:

{
  "appPid": 56,
  "appVersion": "IU-243.23654.153",
  "runtimeVersion": "21.0.5b631.30",
  "unattendedMode": true,
  "backendUnresponsive": false,
  "modalDialogIsOpened": true,
  "idePath": "/idea-server",
  "ideIdentityString": "/home/user/.config/JetBrains/IntelliJIdea2024.3",
  "joinLink": "tcp://127.0.0.1:5990#jt=8a5064db-8a65-41dc-a034-847f161fe9e1&p=IU&fp=30357BE4901A7442E5DCD005BD494A87FE2B4BF29E240874E22F6F5EB62E63A7&cb=243.23654.153&newUi=true&jb=21.0.5b631.30",
  "httpLink": " https://code-with-me.jetbrains.com/remoteDev#idePath=%2Fidea-server&projectPath=%2Fprojects%2Fquarkus-quickstarts&host=workspace83aeff33a7df4318-f65bfbc56-xqh76&port=22&user=user&type=ssh&deploy=false&newUi=true ",
  "gatewayLink": "jetbrains-gateway://connect#idePath=%2Fidea-server&projectPath=%2Fprojects%2Fquarkus-quickstarts&host=workspace83aeff33a7df4318-f65bfbc56-xqh76&port=22&user=user&type=ssh&deploy=false&newUi=true",
  "projects": [
    {
      "projectName": "quarkus-quickstarts",
      "projectPath": "/projects/quarkus-quickstarts",
      "dateLastOpened": 1751984968209,
      "joinLink": "tcp://127.0.0.1:5990#jt=8a5064db-8a65-41dc-a034-847f161fe9e1&p=IU&fp=30357BE4901A7442E5DCD005BD494A87FE2B4BF29E240874E22F6F5EB62E63A7&cb=243.23654.153&newUi=true&jb=21.0.5b631.30",
      "httpLink": " https://code-with-me.jetbrains.com/remoteDev#idePath=%2Fidea-server&projectPath=%2Fprojects%2Fquarkus-quickstarts&host=workspace83aeff33a7df4318-f65bfbc56-xqh76&port=22&user=user&type=ssh&deploy=false&newUi=true ",
      "gatewayLink": "jetbrains-gateway://connect#idePath=%2Fidea-server&projectPath=%2Fprojects%2Fquarkus-quickstarts&host=workspace83aeff33a7df4318-f65bfbc56-xqh76&port=22&user=user&type=ssh&deploy=false&newUi=true",
      "controllerConnected": false,
      "secondsSinceLastControllerActivity": 12803,
      "backgroundTasksRunning": false,
      "users": [
        "user"
      ]
    }
  ]
}

After the restart, the project is missing:

{
  "appPid": 1670,
  "appVersion": "IU-243.23654.153",
  "runtimeVersion": "21.0.5b631.30",
  "unattendedMode": false,
  "backendUnresponsive": false,
  "modalDialogIsOpened": false,
  "idePath": "/idea-server",
  "ideIdentityString": "/home/user/.config/JetBrains/IntelliJIdea2024.3"
}

The problem can’t be reproduced at 100% but it happens quite frequently. Mostly after a period of idle.
I’d higly appreciate any hints that would help me pin point the cause and how to fix this.

ps. I filed this to the eclipse-che issue tracker, where I also have complete logs, if that helps:

Hi,
The server IDE was not restarted - it was closed.

Here is the server starts:

2025-07-08 10:55:48,838 [     62]   INFO - #c.i.p.i.b.AppStarter - args: remoteDevHost /projects/quarkus-quickstarts

Here it is closed:

at com.intellij.openapi.application.ExitStarter$Companion.forceExitApplication$lambda$1(ExitStarter.kt:32)

(The cause is unknown - it might be the command from the client “Close client an host IDE”, for example)

The log lines after, such as

2025-07-08 14:57:28,629 [     99]   INFO - #c.i.p.i.b.AppStarter - args: remoteDevStatus /projects/quarkus-quickstarts

do not indicate a start of a new host IDE instance.
These are healthcheck requests (likely from the Gateway), that answer that “no, it is not up”.
The command exits afterwards.

You can see the same health checks above as

2025-07-08 14:29:28,208 [12819432]   INFO - #c.i.i.CommandLineProcessor - External command line:

where the command is being handled by the active Host instead.

I see the exit (which I had thought wasn’t user triggered) at idea.log · GitHub

2025-07-08 14:29:28,642 [12819866] SEVERE - #c.i.o.u.ObjectTree - getService(...) must not be null
...
at com.intellij.openapi.application.ExitStarter$Companion.forceExitApplication$lambda$1(ExitStarter.kt:32)

but then the remote-dev-server being restarted at idea.log · GitHub


2025-07-08 14:57:28,536 [      6]   INFO - #c.i.p.i.b.AppStarter - ------------------------------------------------------ IDE STARTED ------------------------------------------------------

I see the remote-dev-server being (re-)started but apparently without project at idea.log · GitHub

2025-07-08 14:57:29,770 [   1240]   INFO - #c.j.r.u.UnattendedHostStatusStarter - STATUS:
{
  "appPid": 1670,
  "appVersion": "IU-243.23654.153",
  "runtimeVersion": "21.0.5b631.30",
  "unattendedMode": false,
  "backendUnresponsive": false,
  "modalDialogIsOpened": false,
  "idePath": "/idea-server",
  "ideIdentityString": "/home/user/.config/JetBrains/IntelliJIdea2024.3"
}

What you’re saying is that remote-dev-server wasn’t restarted but rather started afterwards (30mins between the shutdown and the started). Correct?

I’d have to check then what started the remote-dev-server

but then the remote-dev-server being restarted at idea.log · GitHub

It is not being restarted here.
The commands being called here and below are idea remoteDevStatus ..., not idea remoteDevHost ... (or idea serverMode).

It does spawn an IDE instance (a smaller one, to handle the command), but it reports the status - and immediately exits.

Compare "unattendedMode": false, and "unattendedMode": true, records.
See also that "appPid": 56, is being consistent for "unattendedMode": true, (it is being handled by long-living “IDE remote dev server”) and a new pid is used afterwards (that belongs to that short-living process).