[jsonrpc] Server exited with status 1

A couple of weeks ago I started getting restarts with eglot & Julia in Emacs. The *Messages* buffer tells me that

[eglot] Connected! Server `EGLOT (TrustRegionMethods/(julia-mode ess-julia-mode julia-ts-mode))' now managing `(julia-mode ess-julia-mode julia-ts-mode)' buffers in project `TrustRegionMethods'.
[jsonrpc] Server exited with status 1
[Eglot] (warning) Reconnecting after unexpected server exit.
[eglot] Reconnected!
[eglot] Connected! Server `EGLOT (TrustRegionMethods/(julia-mode ess-julia-mode julia-ts-mode))' now managing `(julia-mode ess-julia-mode julia-ts-mode)' buffers in project `TrustRegionMethods'.
[jsonrpc] Server exited with status 1
[eglot] (warning) Reconnecting after unexpected server exit.
[eglot] Reconnected!
[eglot] Connected! Server `EGLOT (TrustRegionMethods/(julia-mode ess-julia-mode julia-ts-mode))' now managing `(julia-mode ess-julia-mode julia-ts-mode)' buffers in project `TrustRegionMethods'.
[jsonrpc] Server exited with status 1
[eglot] (warning) Reconnecting after unexpected server exit.
[eglot] Reconnected!
[eglot] Connected! Server `EGLOT (TrustRegionMethods/(julia-mode ess-julia-mode julia-ts-mode))' now managing `(julia-mode ess-julia-mode julia-ts-mode)' buffers in project `TrustRegionMethods'.
[jsonrpc] Server exited with status 1
[eglot] (warning) Reconnecting after unexpected server exit.
[eglot] Reconnected!

This repeats forever every few seconds. (This happens with all packages I am working on, example above uses TrustRegionMethods.jl but that is just an example.) Versions:

  • eglot 1.17
  • eglot-jl 20240911.1352
  • Emacs 29.4
  • Julia 1.11.2

Happy to debug this further, but I don’t know how to start.

1 Like

You might be able to find more information in a buffer named *EGLOT (xxxx) events*

You’re mainly looking for lines starting with [stderr], since this is the output of the Language Server. When it starts the LS, eglot-jl outputs something like:

[stderr] ┌ Info: Running language server
[stderr] │   env = "~/.emacs.d/elpa/eglot-jl-20240911.1352/Project.toml"
[stderr] │   src_path = "/path/to/the/sources"
[stderr] │   project_path = "/path/to/the/project"
[stderr] └   depot_path = ""

And when the LS itself starts, it outputs something like:

[stderr] ============== Startup timings ==============
[stderr]        0.0 - LS startup started (0.0s since last event)
[stderr]     0.0098 - connection established (0.0098s since last event)
[stderr]   0.083334 - (async) listening to client events (0.073534s since last event)
[stderr]     0.1215 - (async) listening to symbol server events (0.03817s since last event)
[stderr]    0.12159 - starting combined listener (8.893e-5s since last event)
[stderr]    0.14547 - symbols received (0.023874s since last event)
[stderr]    0.14675 - extended methods computed (0.001282s since last event)
[stderr]    0.14676 - project deps computed (9.0599e-6s since last event)
[stderr]    0.14676 - env map computed (9.5367e-7s since last event)
[stderr]    0.14676 - initial lint done (5.0068e-6s since last event)
[stderr]    0.19734 - LSP/initialize (0.050572s since last event)
[stderr]     1.6691 - LSP/initialized (1.4717s since last event)
[stderr] =============================================

Do you find such stanzas? Are they followed by error messages?

2 Likes

Thanks for your quick reply. In fact LS does not seem to start, it claims a parsing error, though the file should be valid Julia 1.11 code. See the log, I am unable to narrow it down to anything specific.

I found the root cause, it is

Using Compat.jl while it is fixed.

2 Likes