prasmussen / glot-run

API for running code inside docker containers

Home Page:https://run.glot.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting 204 No content

sanket-kiwi opened this issue · comments

Hi,

I tried to setup glot on aws server using both DOCKER_OPTIONS and socat for networking bridging. Javascript was working fine but for rest of the languages i was getting 204 No Content. No error is coming. If i am running languages images directly they are giving correct response.

echo '{ "language": "java", "files": [{ "name": "Main.java", "content": "class Main {\n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n}" }] }' | docker run -i --rm glot/java:latest

For this i am getting correct response but getting 204 No Content in glot-run api response.

==> event.log <==
{"event":"Create container from image glot/java:latest","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:36Z"}
{"event":"Start container 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Attach container 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to ready state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Connect to 172.18.0.1:2375","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to recv_http state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to recv_http_header state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to attached state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Send payload to 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41 via <0.1196.0>","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Send payload","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to recv_response state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Socket closed","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Reply with data","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Stop normal","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Remove container 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}

==> http.log <==
{"headers":{"host":"172.17.85.73:8073","connection":"keep-alive","content-length":"203","authorization":"Token 9hbI0QhxcmaGnh5SJds8","postman-token":"61fec6ec-9a6f-e950-802e-32068e036ab8","cache-control":"no-cache","origin":"chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36","content-type":"application/json","accept":"*/*","accept-encoding":"gzip, deflate","accept-language":"en-GB,en-US;q=0.8,en;q=0.6"},"method":"POST","path":"/languages/java/latest","peer":{"ip":"172.17.85.53","port":56656},"pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:36Z","type":"request"}
{"body":"{\n  \"language\": \"java\",\n  \"files\": [{\n    \"name\": \"Main.java\",\n    \"content\": \"class Main {\\n    public static void main(String[] args) {\\n        System.out.println(\\\"Hello World!\\\");\\n    }\\n}\"\n  }]\n}\n","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:36Z","type":"request_body"}

==> event.log <==
{"event":"Returning result","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:38Z"}

==> http.log <==
{"headers":{"server":"Cowboy","date":"Wed, 01 Nov 2017 05:34:38 GMT","content-length":"0","content-type":"application/json"},"pid":"<0.1194.0>","status":204,"timestamp":"2017-11-01T05:34:38Z","type":"response"}

I am using Ubuntu version 16.04 and Docker version 17.9 CE.

Any help appreciated. Thank you.

Exactly same here..