Error setting up backend server for development with "lein ring server"


I’ve been trying to setup a development environment for metabase, and am currently having trouble setting up the backend server. Running lein run works fine, and successfully setups the backend. However, when I try to instead setup a backend server with lein ring server, it gives the following error:

{:clojure.main/message “Syntax error (IOException) compiling at (/tmp/form-init7619529550495970411.clj:1:73).\nServer returned HTTP response code: 500 for URL: http://localhost:3000/\n”,
{:clojure.error/phase :compile-syntax-check,
:clojure.error/line 1,
:clojure.error/column 73,
:clojure.error/source “form-init7619529550495970411.clj”,
:clojure.error/path “/tmp/form-init7619529550495970411.clj”,

Because as a new user I can’t post more than two links (as the error logs contain links), I’ve created a PasteBin with the full error log:

PasteBin link to the console output after running lein ring server:

What could be causing this error?

EDIT: Added my environment information
Currently on release-0.33.2 (tag: v0.33.2)
Port 3000 is unused. (Checked using “sudo lsof -i -P -n | grep LISTEN” and “netstat -tulpn | grep LISTEN”)
openjdk version “1.8.0_212”
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

Hi @JohnnyMarc
Are you on the latest master or release-0.33.x ?
Do you have another service running on port 3000?
Which Java and version? java -version

Hi @flamber,

I’ve added my environment information at the end of my post. Thanks.

You have starting the front-end too, right?
The IOException makes me think it’s something to do with file access rights.
What do you see on /tmp/form-init7619529550495970411.clj:1:73
Do you see any other errors/exceptions before?

Hey, @flamber

  • The front-end is up and running on port 8080.
  • File /tmp/form-init7619529550495970411.clj no longer exists. Seems like a temporary file used during the compilation process.
  • Everything was fine up to that point.

I’ve also added pastebins to the full error messages in the original post above, in case the one shown in the post isn’t detailed enough.

It shouldn’t delete the file if it failed, so not sure if that has something to do with the file exception.
I have never tried to compile on Alpine, so I’m not sure if it has something to do with that.

@camsaul Can you understand this IOException, when running lein ring server ?

Hey everyone, unfortunately I’m at a loss to explain why that error might be happening. I would try running on a different system or checking file perms as @flamber suggested.