Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.

glot-run permissions? #12

Closed
cezarfloroiu opened this issue Jan 6, 2017 · 14 comments
Closed

glot-run permissions? #12

cezarfloroiu opened this issue Jan 6, 2017 · 14 comments

Comments

@cezarfloroiu
Copy link

cezarfloroiu commented Jan 6, 2017

Hi

I installed everything and all works except running a code through glot-run API which throws 500 internal server error.

I have this error and I wonder if there aren't any security settings/permissions I need to check . My error is econnrefused....

I confirmed with curl docker api is enabled and running on 2375 and that I put the right IP/PORT in the env DOCKER_API_URL settings.

The container glot/python is installed and tested standalone.

Any idea? Thanks!!

22:09:16.410 [error] Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.639.0> exit with reason: {[{reason,{badmatch,{error,econnrefused}}},{mfa,{language_run_resource,accept_post,2}},{stacktrace,[{docker,container_create,1,[{file,"/glot-run/_build/default/lib/glot/src/docker/docker.erl"},{line,13}]},{language_run,run,3,[{file,"/glot-run/_build/default/lib/glot/src/models/language_run.erl"},{line,11}]},{language_run_resource,run_code,3,[{file,"/glot-run/_build/default/lib/glot/src/resources/language_run_resource.erl"},{line,97}]},{cowboy_rest,call,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,process_content_type,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,777}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.995>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.639.0>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{83,199,179,80},57446}},{host,<<"ec2-52-90-7-66.compute-1.amazonaws.com">>},{host_info,undefined},{port,80},{path,<<"/languages/python/latest">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[{version,<<"latest">>},{name,<<"python">>}]},{headers,[{<<"accept-encoding">>,<<"gzip,deflate">>},{<<"authorization">>,<<"Token mytoken">>},{<<"content-type">>,<<"application/json">>},{<<"content-length">>,<<"110">>},{<<"host">>,<<"ec2-1.amazonaws.com">>},{<<"connection">>,<<"Keep-Alive">>},{<<"user-agent">>,<<"Apache-HttpClient/4.1.1 (java 1.5)">>}]},{p_headers,[{<<"content-type">>,{<<"application">>,<<"json">>,[]}},{<<"if-modified-since">>,undefined},{<<"if-none-match">>,undefined},{<<"if-unmodified-since">>,undefined},{<<"if-match">>,undefined},{<<"accept">>,undefined},{<<"connection">>,[<<"keep-alive">>]}]},{cookies,undefined},{meta,[{media_type,{<<"application">>,<<"json">>,'*'}},{charset,undefined}]},{body_state,waiting},{buffer,<<"{\n \"language\": \"python\",\n \"files\": [{\n \"name\": \"main.py\",\n \"content\": \"print(\\\"Hello World!\\\")\"\n }]\n}">>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[{<<"content-type">>,[<<"application">>,<<"/">>,<<"json">>,<<>>]}]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,<<"python">>,<<"latest">>}}],[{cowboy_rest,process_content_type,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,777}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]}

This is the command I ran:

docker run \
  -it -p 80:80 \
  --detach \
  --restart always \
  --env API_ENVIRONMENT="development" \
  --env API_HTTP_LISTEN_IP="0.0.0.0" \
  --env API_HTTP_LISTEN_PORT="80" \
  --env DATA_PATH="/home/app/data/" \
  --env LOG_PATH="/home/app/log/" \
  --env BASE_URL="http://ec2-xxxxxxxx-1.amazonaws.com" \
  --env ADMIN_TOKEN="secret" \
  --env DOCKER_API_URL="http://127.0.0.1:2375" \
  --env DOCKER_RUN_TIMEOUT="15" \
  --env MAX_OUTPUT_SIZE="100000" \
  --volume /containers/glot-run/data:/home/app/data \
  --volume /containers/glot-run/log:/home/app/log \
  javierprovecho/glot-run
@prasmussen
Copy link
Owner

prasmussen commented Jan 7, 2017

As you are running glot-run inside a docker container you wont be able to reach the docker daemon on 127.0.0.1:2375, you would have to configure your docker daemon to listen on a ip that can be reached from inside the glot-run container and put that ip in DOCKER_API_URL.

Just a sidenote on security, on glot.io I run a dedicated docker daemon (in a dedicated vm) for running the glot/<language> images, so that if someone finds a way to break out of the docker container they wont get access to any user data. I would recommend that you do something similar if you are planning on having unknown users using your service.

@javierprovecho
Copy link
Contributor

for dev purposes, if you run everything in containers, and want to use the same docker daemon for running snippets (not recommended in prod for security purposes), you can modify DOCKER_OPTS in /etc/default/docker by adding ... -H tcp://172.17.0.1:2375 ... (or your internal docker gateway) and connect from inside glot-run container to 172.17.0.1:2375

For prod options, prasmussen vm's is great and combined with #13 swarm mode (https://docs.docker.com/engine/swarm/) it would be very scalable

@cezarfloroiu
Copy link
Author

Thanks a lot gentlemen, appreciate the guidance! I changed the docker api to 172.17.0.1 after I previously verified that it is accessible.

Now I see another type of internal error, maybe you have a clue ?. The respons from glot-run API is still 500 Internal Server Error.

I'm using SoapUI to sent a POST to /languages/python/latest and my request contains the authorization & content-type in the header why the payload has the demo json : {"files": [{"name": "main.py", "content": "print(42)"}]}

13:16:08.542 [error] CRASH REPORT Process <0.637.0> with 0 neighbours exited with reason: no function clause matching docker_attach:recv_http(<<"HTTP/1.1 400 Bad Request\r\n">>, {state,#Port<0.997>,{<0.636.0>,#Ref<0.0.1.633>},[],73}) line 55 in gen_fsm:terminate/7 line 626
13:16:08.542 [error] Supervisor docker_attach_sup had child docker_attach started with {docker_attach,start_link,undefined} at <0.637.0> exit with reason no function clause matching docker_attach:recv_http(<<"HTTP/1.1 400 Bad Request\r\n">>, {state,#Port<0.997>,{<0.636.0>,#Ref<0.0.1.633>},[],73}) line 55 in context child_terminated
13:16:08.544 [error] Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.636.0> exit with reason: [{reason,{{function_clause,[{docker_attach,recv_http,[<<"HTTP/1.1 400 Bad Request\r\n">>,{state,#Port<0.997>,{<0.636.0>,#Ref<0.0.1.633>},[],73}],[{file,"/glot-run/_build/default/lib/glot/src/docker/docker_attach.erl"},{line,55}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,518}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]},{gen_fsm,sync_send_event,[<0.637.0>,{attach,<<"5ed6cfbe2cde846e054f9652662d296aacce5ce0a1eeaf5f82d534dbea1e3e7e">>},3600000]}}},{mfa,{language_run_resource,accept_post,2}},{stacktrace,[{gen_fsm,sync_send_event,3,[{file,"gen_fsm.erl"},{line,231}]},{docker,container_attach,1,[{file,"/glot-run/_build/default/lib/glot/src/docker/docker.erl"},{line,47}]},{language_run,run,3,[{file,"/glot-run/_build/default/lib/glot/src/models/language_run.erl"},{line,16}]},{language_run_resource,run_code,3,[{file,"/glot-run/_build/default/lib/glot/src/resources/language_run_resource.erl"},{line,97}]},{cowboy_rest,call,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,process_content_type,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,777}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.995>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.636.0>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{83,199,179,80},60097}},{host,<<"ec2-xxxx-1.amazonaws.com">>},{host_info,undefined},{port,80},{path,<<"/languages/python/latest">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[{version,<<"latest">>},{name,<<"python">>}]},{headers,[{<<"accept-encoding">>,<<"gzip,deflate">>},{<<"authorization">>,<<"Token d11088bc-a29d-4d49-a633-b1b1ae807064">>},{<<"content-type">>,<<"application/json">>},{<<"content-length">>,<<"56">>},{<<"host">>,<<"ec2-xxxxx-1.amazonaws.com">>},{<<"connection">>,<<"Keep-Alive">>},{<<"user-agent">>,<<"Apache-HttpClient/4.1.1 (java 1.5)">>}]},{p_headers,[{<<"content-type">>,{<<"application">>,<<"json">>,[]}},{<<"if-modified-since">>,undefined},{<<"if-none-match">>,undefined},{<<"if-unmodified-since">>,undefined},{<<"if-match">>,undefined},{<<"accept">>,undefined},{<<"connection">>,[<<"keep-alive">>]}]},{cookies,undefined},{meta,[{media_type,{<<"application">>,<<"json">>,'*'}},{charset,undefined}]},{body_state,waiting},{buffer,<<"{\"files\": [{\"name\": \"main.py\", \"content\": \"print(42)\"}]}">>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[{<<"content-type">>,[<<"application">>,<<"/">>,<<"json">>,<<>>]}]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,<<"python">>,<<"latest">>}}]

@prasmussen
Copy link
Owner

The logging when something goes wrong is very lacking at the moment. Can you confirm that you are using version 1.2.1 of glot-run? (You can get the version number by requesting the root url). Can you also paste the output of the docker version response?

@javierprovecho
Copy link
Contributor

Do you have the language registered in glot-run?
Do you have the corresponding image pulled in your Docker daemon?

Glot doesn't come with preregistered languages neither pulls the image. It may be complicated to setup but allows great flexibility.

@cezarfloroiu
Copy link
Author

cezarfloroiu commented Jan 7, 2017

I'm with version 1.2.0 - I pulled the package from docker hub

{"description":"glot - Code Runner API","urls":{"admin":"http://ec2-xxx-1.amazonaws.com/admin","images":"http://ec2-xxx-1.amazonaws.com/images","languages":"http://ec2-xxx-1.amazonaws.com/languages"},"version":"1.2.0"}

The output of docker api/version:
{"Version":"1.12.5","ApiVersion":"1.24","GitCommit":"7392c3b","GoVersion":"go1.6.4","Os":"linux","Arch":"amd64","KernelVersion":"3.13.0-105-generic","BuildTime":"2016-12-16T02:30:42.893103237+00:00"}

Yes, I have the language registered correctly confirmed by calling /languages/
I also have the corresponding images pulled in my docker daemon , and works correctly tested with CLI

@prasmussen
Copy link
Owner

In 1.2.1 there is a fix that makes glot-run work with newer versions of docker, so you need to upgrade as you seem to be running the latest version of docker.

Are you using javierprovecho/glot-run? In that case maybe @javierprovecho can rebuild it for 1.2.1?

@cezarfloroiu
Copy link
Author

Indeed, I am using javierprovecho/glot-run

Would be great if @javierprovecho upgrades the docker image! :)

@javierprovecho
Copy link
Contributor

@cezarfloroiu @prasmussen done! https://hub.docker.com/r/javierprovecho/glot-run/builds/bmwscmozpryw4sr2wqezngt/

Tag is 1.2.1
Pull as docker pull javierprovecho/glot-run:1.2.1
Please check if it works correctly. I can't test it right now.

@cezarfloroiu
Copy link
Author

Now it worked! Thank you so much! 🥇

@lalitlogical
Copy link

lalitlogical commented Apr 14, 2018

Hey @prasmussen ,
I am facing the 500 internal server error. I had gone through all threads above but nothing working for me. I have pull all images with sudo ./pull_base_images.sh & test passes with sudo ./run_tests.sh. I have added the languages also into git-run (before this I am getting the 404). Can you let me know if I need specific docker api version for same or something else?

glot - Code Runner API

{"description":"glot - Code Runner API","urls":{"admin":"http://localhost:8090/admin","images":"http://localhost:8090/images","languages":"http://localhost:8090/languages"},"version":"1.2.1"}

Docker API version

{"Platform":{"Name":""},"Components":[{"Name":"Engine","Version":"18.03.0-ce","Details":{"ApiVersion":"1.37","Arch":"amd64","BuildTime":"2018-03-21T23:08:31.000000000+00:00","Experimental":"false","GitCommit":"0520e24","GoVersion":"go1.9.4","KernelVersion":"4.13.0-37-generic","MinAPIVersion":"1.12","Os":"linux"}}],"Version":"18.03.0-ce","ApiVersion":"1.37","MinAPIVersion":"1.12","GitCommit":"0520e24","GoVersion":"go1.9.4","Os":"linux","Arch":"amd64","KernelVersion":"4.13.0-37-generic","BuildTime":"2018-03-21T23:08:31.000000000+00:00"}

I have started git-run service with below command.

sudo docker run \
  -it -p 8090:8090 \
  --detach \
  --restart always \
  --env API_ENVIRONMENT="development" \
  --env API_HTTP_LISTEN_IP="0.0.0.0" \
  --env API_HTTP_LISTEN_PORT="8090" \
  --env DATA_PATH="/home/app/data/" \
  --env LOG_PATH="/home/app/log/" \
  --env BASE_URL="http://localhost:8090" \
  --env ADMIN_TOKEN="clumeterin" \
  --env DOCKER_API_URL="http://172.17.0.1:2375" \
  --env DOCKER_RUN_TIMEOUT="15" \
  --env MAX_OUTPUT_SIZE="100000" \
  --volume /containers/glot-run/data:/home/app/data \
  --volume /containers/glot-run/log:/home/app/log \
  javierprovecho/glot-run:1.2.1

I am able to create token, fetch languages, create languages etc. But when try to run the code for any languages with below i am facing the issue.

curl -4 -sv -H "Authorization: Token d11088bc-a29d-4d49-a633-b1b1ae807064" -H 'Content-type: application/json' -X POST -d '{"files": [{"name": "main.sh", "content": "echo \"hello\"\n"}]}' localhost:8090/languages/bash/latest

Error Log

06:53:17.073 [error] Error in process <0.641.0> on node 'glot-run@127.0.0.1' with exit value:
{[{reason,{case_clause,[#{created => <<"2018-04-13T08:44:18Z">>,id => <<"f2b7a800-54a8-403a-b0c8-06415784db8d">>,modified => <<"2018-04-13T08:44:18Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T07:32:28Z">>,id => <<"dcf187c9-81ab-4f3b-9759-8c22590aa3f1">>,modified => <<"2018-04-13T07:32:28Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T07:16:06Z">>,id => <<"d9e114bd-12d8-483e-a2c6-8aa91465ef5e">>,modified => <<"2018-04-13T07:16:06Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T08:44:19Z">>,id => <<"a4f2cf5c-3ec4-4849-ab35-e90b3d9d0c6e">>,modified => <<"2018-04-13T08:44:19Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T07:04:36Z">>,id => <<"48685898-0ce4-4a72-91d0-5c13cc843627">>,modified => <<"2018-04-13T07:04:36Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>}]}},{mfa,{language_run_resource,is_authorized,2}},{stacktrace,[{users,valid_token,1,[{file,"/glot-run/_build/default/lib/glot/src/models/users.erl"},{line,16}]},{http_auth,validate_token,4,[{file,"/glot-run/_build/default/lib/glot/src/http/http_auth.erl"},{line,29}]},{cowboy_rest,call,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,is_authorized,2,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,150}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.999>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.641.0>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{172,17,0,1},45560}},{host,<<"localhost">>},{host_info,undefined},{port,8090},{path,<<"/languages/ruby/latest">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[{version,<<"latest">>},{name,<<"ruby">>}]},{headers,[{<<"authorization">>,<<"Token d11088bc-a29d-4d49-a633-b1b1ae807064">>},{<<"cache-control">>,<<"no-cache">>},{<<"postman-token">>,<<"685b7823-02d3-450b-bbe7-20352b62bdfb">>},{<<"content-type">>,<<"text/plain">>},{<<"user-agent">>,<<"PostmanRuntime/7.1.1">>},{<<"accept">>,<<"*/*">>},{<<"host">>,<<"localhost:8090">>},{<<"cookie">>,<<"_rails_seed_without_active_record_session=RGhRcVdTY3BVKzY2bHNxc0ZMTFJPMFpOOHg1ejE3eHU5YUppMk5hOC90Z3VqV1F6VTJsODFFdllqM1pRVklHbS9oOHJ1cU5YZmIxeEFRM0EvbXBRc0E9PS0tSFhzd29pTmdvblUzWUlYcGlDYmNsZz09--53f969fe6232b8abd90c80fb2d11583eaf66e47a">>},{<<"accept-encoding">>,<<"gzip, deflate">>},{<<"content-length">>,<<"68">>},{<<"connection">>,<<"keep-alive">>}]},{p_headers,[{<<"connection">>,[<<"keep-alive">>]}]},{cookies,undefined},{meta,[]},{body_state,waiting},{buffer,<<"{\"files\": [{\"name\": \"main.rb\", \"content\": \"puts \\\"Hello World!\\\"\"}]}">>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,undefined,undefined}}],[{cowboy_rest,is_authorized,2,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,150}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]}
06:53:17.074 [error] Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.641.0> exit with reason: {[{reason,{case_clause,[#{created => <<"2018-04-13T08:44:18Z">>,id => <<"f2b7a800-54a8-403a-b0c8-06415784db8d">>,modified => <<"2018-04-13T08:44:18Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T07:32:28Z">>,id => <<"dcf187c9-81ab-4f3b-9759-8c22590aa3f1">>,modified => <<"2018-04-13T07:32:28Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T07:16:06Z">>,id => <<"d9e114bd-12d8-483e-a2c6-8aa91465ef5e">>,modified => <<"2018-04-13T07:16:06Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T08:44:19Z">>,id => <<"a4f2cf5c-3ec4-4849-ab35-e90b3d9d0c6e">>,modified => <<"2018-04-13T08:44:19Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>},#{created => <<"2018-04-13T07:04:36Z">>,id => <<"48685898-0ce4-4a72-91d0-5c13cc843627">>,modified => <<"2018-04-13T07:04:36Z">>,token => <<"d11088bc-a29d-4d49-a633-b1b1ae807064">>}]}},{mfa,{language_run_resource,is_authorized,2}},{stacktrace,[{users,valid_token,1,[{file,"/glot-run/_build/default/lib/glot/src/models/users.erl"},{line,16}]},{http_auth,validate_token,4,[{file,"/glot-run/_build/default/lib/glot/src/http/http_auth.erl"},{line,29}]},{cowboy_rest,call,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,is_authorized,2,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,150}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.999>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.641.0>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{172,17,0,1},45560}},{host,<<"localhost">>},{host_info,undefined},{port,8090},{path,<<"/languages/ruby/latest">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[{version,<<"latest">>},{name,<<"ruby">>}]},{headers,[{<<"authorization">>,<<"Token d11088bc-a29d-4d49-a633-b1b1ae807064">>},{<<"cache-control">>,<<"no-cache">>},{<<"postman-token">>,<<"685b7823-02d3-450b-bbe7-20352b62bdfb">>},{<<"content-type">>,<<"text/plain">>},{<<"user-agent">>,<<"PostmanRuntime/7.1.1">>},{<<"accept">>,<<"*/*">>},{<<"host">>,<<"localhost:8090">>},{<<"cookie">>,<<"_rails_seed_without_active_record_session=RGhRcVdTY3BVKzY2bHNxc0ZMTFJPMFpOOHg1ejE3eHU5YUppMk5hOC90Z3VqV1F6VTJsODFFdllqM1pRVklHbS9oOHJ1cU5YZmIxeEFRM0EvbXBRc0E9PS0tSFhzd29pTmdvblUzWUlYcGlDYmNsZz09--53f969fe6232b8abd90c80fb2d11583eaf66e47a">>},{<<"accept-encoding">>,<<"gzip, deflate">>},{<<"content-length">>,<<"68">>},{<<"connection">>,<<"keep-alive">>}]},{p_headers,[{<<"connection">>,[<<"keep-alive">>]}]},{cookies,undefined},{meta,[]},{body_state,waiting},{buffer,<<"{\"files\": [{\"name\": \"main.rb\", \"content\": \"puts \\\"Hello World!\\\"\"}]}">>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,undefined,undefined}}],[{cowboy_rest,is_authorized,2,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,150}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]}

http.log

{"headers":{"authorization":"Token d11088bc-a29d-4d49-a633-b1b1ae807064","cache-control":"no-cache","postman-token":"f3c42c05-2380-4c80-b606-fea6f6159e40","content-type":"text/plain","user-agent":"PostmanRuntime/7.1.1","accept":"*/*","host":"localhost:8090","cookie":"_rails_seed_without_active_record_session=RGhRcVdTY3BVKzY2bHNxc0ZMTFJPMFpOOHg1ejE3eHU5YUppMk5hOC90Z3VqV1F6VTJsODFFdllqM1pRVklHbS9oOHJ1cU5YZmIxeEFRM0EvbXBRc0E9PS0tSFhzd29pTmdvblUzWUlYcGlDYmNsZz09--53f969fe6232b8abd90c80fb2d11583eaf66e47a","accept-encoding":"gzip, deflate","content-length":"68","connection":"keep-alive"},"method":"POST","path":"/languages/ruby/latest","peer":{"ip":"172.17.0.1","port":45572},"pid":"<0.644.0>","timestamp":"2018-04-14T06:54:13Z","type":"request"}
{"headers":{"server":"Cowboy","date":"Sat, 14 Apr 2018 06:54:13 GMT","content-length":"0"},"pid":"<0.644.0>","status":500,"timestamp":"2018-04-14T06:54:13Z","type":"response"}

event.log

{"event":"Create container from image glot/bash:latest","pid":"<0.637.0>","timestamp":"2018-04-14T06:52:43Z"}
{"event":"Start container 83ecd097cf618503d7e2f88099a728b6d355f48b46ec9051c563d55aa202fa1f","pid":"<0.637.0>","timestamp":"2018-04-14T06:52:43Z"}
{"event":"Attach container 83ecd097cf618503d7e2f88099a728b6d355f48b46ec9051c563d55aa202fa1f","pid":"<0.637.0>","timestamp":"2018-04-14T06:52:43Z"}
{"event":"Transition to ready state","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:43Z"}
{"event":"Connect to 172.17.0.1:2375","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:43Z"}
{"event":"Transition to recv_http state","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:43Z"}
{"event":"Transition to recv_http_header state","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:44Z"}
{"event":"Transition to attached state","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:44Z"}
{"event":"Send payload to 83ecd097cf618503d7e2f88099a728b6d355f48b46ec9051c563d55aa202fa1f via <0.638.0>","pid":"<0.637.0>","timestamp":"2018-04-14T06:52:44Z"}
{"event":"Send payload","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:44Z"}
{"event":"Transition to recv_response state","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:44Z"}
{"event":"Reply with timeout error","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:59Z"}
{"event":"Stop normal","pid":"<0.638.0>","timestamp":"2018-04-14T06:52:59Z"}
{"event":"Remove container 83ecd097cf618503d7e2f88099a728b6d355f48b46ec9051c563d55aa202fa1f","pid":"<0.637.0>","timestamp":"2018-04-14T06:52:59Z"}
{"event":"Returning result","pid":"<0.637.0>","timestamp":"2018-04-14T06:52:59Z"}

Thanks

@lalitlogical
Copy link

Hey I think, I had installed latest version of docker-ce. let me try 17.12.0ce-0ubuntu version & try with it. I will revert back here.

@lalitlogical
Copy link

No Luck with below docker api version.

{"Platform":{"Name":""},"Components":[{"Name":"Engine","Version":"17.12.0-ce","Details":{"ApiVersion":"1.35","Arch":"amd64","BuildTime":"2017-12-27T20:09:53.000000000+00:00","Experimental":"false","GitCommit":"c97c6d6","GoVersion":"go1.9.2","KernelVersion":"4.13.0-38-generic","MinAPIVersion":"1.12","Os":"linux"}}],"Version":"17.12.0-ce","ApiVersion":"1.35","MinAPIVersion":"1.12","GitCommit":"c97c6d6","GoVersion":"go1.9.2","Os":"linux","Arch":"amd64","KernelVersion":"4.13.0-38-generic","BuildTime":"2017-12-27T20:09:53.000000000+00:00"}

@lalitlogical
Copy link

Right now facing this issue. :(
#19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants