c0b / docker-elixir

Official Docker image for Elixir :whale: :turtle: :rocket:

Home Page:http://elixir-lang.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mix local.rebar --force httpc error

0xAX opened this issue · comments

Hello,

I'm trying to run my elixir application with elixir-1.4 base image. But I'm getting following error:

$ mix local.rebar --force
* creating /root/.mix/rebar

15:52:33.092 [error] GenServer #PID<0.135.0> terminating
** (stop) normal
    (inets) httpc_handler.erl:1676: :httpc_handler.update_session/4
    (inets) httpc_handler.erl:1316: :httpc_handler.maybe_make_session_available/2
    (inets) httpc_handler.erl:1307: :httpc_handler.answer_request/3
    (inets) httpc_handler.erl:371: :httpc_handler.terminate/2
    (stdlib) gen_server.erl:629: :gen_server.try_terminate/3
    (stdlib) gen_server.erl:795: :gen_server.terminate/7
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.4870>, :tls_connection, :undefined}, #PID<0.136.0>}, "HTTP/1.1 200 OK\r\nx-amz-id-2: QcFzHmTb0kHmmU+Ev6Apxx5QA1KtgoxIH5/vgi6C26A0WTCc+TEZwJ/cnGfiQ7Un2vkrU4OU/gQ=\r\nx-amz-request-id: 4DC01FBDC05A747A\r\nx-amz-replication-status: COMPLETED\r\nLast-Modified: Mon, 08 May 2017 12:35:20 GMT\r\nETag: \"034e39a16f5026562499bd0848d14eff\"\r\nCache-Control: public, max-age=604800\r\nx-amz-meta-surrogate-key: installs\r\nx-amz-version-id: _PqAeBBOvSlcxbRraFEd18ofBaqWJyCR\r\nContent-Type: binary/octet-stream\r\nServer: AmazonS3\r\nVia: 1.1 varnish\r\nFastly-Debug-Digest: 864530c58fa2f5e6f7b455ba1b8a8fd668c94f688c98b6cdc85319515ff6f6b1\r\nContent-Length: 350\r\nAccept-Ranges: bytes\r\nDate: Mon, 26 Jun 2017 15:52:10 GMT\r\nVia: 1.1 varnish\r\nAge: 360126\r\nConnection: keep-alive\r\nX-Served-By: cache-iad2143-IAD, cache-ams4125-AMS\r\nX-Cache: HIT, HIT\r\nX-Cache-Hits: 1, 1\r\nX-Timer: S1498492331.509652,VS0,VE6\r\n\r\nhfGB2dwLVri/QWfHA1wy9bkOnV6jaMG+P5Fku1K7aShGh65+sY1V7+ADIva+nf/o\nAOVZS7+1YW0vanQj+mwJsLMRvjLmPvcRMaqaal7AkT81G5GNy6ExXLMZ1n3Yak6L\nl0dRVI6t/faBgHlv7x2baIy8G/8O2j4XCiYE8n7zL0QnpzZz7Z2YybCgoaYk/oHT\nAzy7Mp8Sy8ugtVjs2nNDVGHZHMhrpHri1R9FxLLRAbbaxCTUF/PXLvYBBBpxSLxJ\nBUbw8RH8u61LkftXsHphA3JCMnXKMYybcpuMA7WOyIpZoqLcM5cCrrCZVLW8DhXN\nAH3LXp27yb4Q+oc8QESFPw==\n"}
State: {:state, {:request, #Reference<0.0.1.450>, #PID<0.73.0>, 0, :https, {'repo.hex.pm', 443}, '/installs/rebar3-1.x.csv.signed', [], :get, {:http_request_h, :undefined, 'keep-alive', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, 'repo.hex.pm', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, [], 'Mix/1.4.4', :undefined, :undefined, :undefined, '0', :undefined, :undefined, :undefined, :undefined, :undefined, ...}, {[], []}, {:http_options, 'HTTP/1.1', :infinity, true, {:essl, []}, :undefined, true, :infinity, false}, 'https://repo.hex.pm/installs/rebar3-1.x.csv.signed', [], :none, [], 1498492352993, :undefined, :undefined, false}, {:session, {{'repo.hex.pm', 443}, #PID<0.135.0>}, false, :https, {:sslsocket, {:gen_tcp, #Port<0.4870>, :tls_connection, :undefined}, #PID<0.136.0>}, {:essl, []}, 1, :keep_alive, false}, :undefined, :undefined, :undefined, {:httpc_response, :parse, [:nolimit, true]}, {[], []}, {[], []}, :new, [], :nolimit, :nolimit, {:options, {:undefined, []}, {:undefined, []}, 0, 2, 5, 120000, 2, :disabled, false, :inet, :default, :default, []}, {:timers, [], :undefined}, :httpc_mix, :inactive}
* creating /root/.mix/rebar3

During execution of mix local.rebar --force. Any ideas how to fix this?

Thank you.

commented

it looks like your network access issue? are you able to curl https://repo.hex.pm

here is what I run:

$ docker run -it --rm elixir bash
root@43124856c359:/# mix local.rebar
* creating root/.mix/rebar
* creating root/.mix/rebar3
root@43124856c359:/# mix local.rebar --force
* creating root/.mix/rebar
* creating root/.mix/rebar3
root@43124856c359:/# find /root/.mix/ -ls
50216581    4 drwxr-xr-x   2 root     root         4096 Jun 26 17:15 /root/.mix/
6291744  768 -rwxr-xr-x   1 root     root       785001 Jun 26 17:15 /root/.mix/rebar3
6291740  200 -rwxr-xr-x   1 root     root       204449 Jun 26 17:15 /root/.mix/rebar
root@43124856c359:/# 

Hello @c0b,

That's quite weird. I'm running mix local.rebar --force in internal CI in a chain of different commands, and seems everything is OK with network, because mix local.hex --force, apt-get .... are ok.

Moreover

$ find /root/.mix/ -ls
  2543    0 drwxr-xr-x   3 root     root          100 Jun 26 18:00 /root/.mix/
  2607  768 -rwxr-xr-x   1 root     root       785001 Jun 26 18:00 /root/.mix/rebar3
  2606  200 -rwxr-xr-x   1 root     root       204449 Jun 26 18:00 /root/.mix/rebar
  ...
commented

is it no longer reproducible?

I still can reproduce it every time in a container, but this error does not affect on a result. rebar3 is downloaded

I'm seeing the same thing within the image on my ci env.

16:46:01.655 [error] GenServer #PID<0.123.0> terminating
** (stop) normal
    (inets) httpc_handler.erl:1676: :httpc_handler.update_session/4
    (inets) httpc_handler.erl:1316: :httpc_handler.maybe_make_session_available/2
    (inets) httpc_handler.erl:1307: :httpc_handler.answer_request/3
    (inets) httpc_handler.erl:371: :httpc_handler.terminate/2
    (stdlib) gen_server.erl:629: :gen_server.try_terminate/3
    (stdlib) gen_server.erl:795: :gen_server.terminate/7
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.4758>, :tls_connection, :undefined}, #PID<0.124.0>}, "HTTP/1.1 200 OK\r\nx-amz-id-2: EedEqk1dwaNEr3x6MJmT2va6pB82VrxymFB5Y7qEiXruKOpI33T0oLA6qMUJhvPE0JTr+FOqMi4=\r\nx-amz-request-id: F7947C137EE883DD\r\nx-amz-replication-status: COMPLETED\r\nLast-Modified: Tue, 28 Jun 2016 23:59:13 GMT\r\nETag: \"0537e095e3db68e52cf054bf83190ee7\"\r\nCache-Control: public, max-age=604800\r\nx-amz-meta-surrogate-key: installs\r\nx-amz-version-id: E_Ixqh.m5j72bG3FTXuR4qXr5kf277MQ\r\nContent-Type: binary/octet-stream\r\nServer: AmazonS3\r\nVia: 1.1 varnish\r\nFastly-Debug-Digest: 8025a25b21acfce8d080645a90dcac45b6142ecd374e9f845fe845a7f6a4097f\r\nContent-Length: 350\r\nAccept-Ranges: bytes\r\nDate: Sun, 02 Jul 2017 16:46:01 GMT\r\nVia: 1.1 varnish\r\nAge: 276954\r\nConnection: keep-alive\r\nX-Served-By: cache-iad2126-IAD, cache-jfk8128-JFK\r\nX-Cache: HIT, HIT\r\nX-Cache-Hits: 2, 1\r\nX-Timer: S1499013962.586914,VS0,VE31\r\n\r\nqc0Jirc+cvQTzArHDejmNxqsxFKx74uBMrS/0VBkMAnR30bgHM571ChHHRBHDqAn\nXiqVWjULStbyUd75AkOncca0XCMCsY5DQrC2qnfwebtNVAXVvbMpr2pK832qGpxS\nVgi5ibZ/DApuLsBXa3nkHjnIze3KOKq08CUZcC389JL0k1ky0QU2IjxRXMoxet9O\nO1G6PEnRmeQLMtF4uiXqA9M0r0TSG5Bi6zAtKo9LOv+ycrBwBMlrPXCJ0x+kEKh7\n4pvtDxxF6xJ77X3peVpWAEWnSm5v3HDQsgsfyYKObhEnMllDWlqCKXas+igVAgUw\nldZ7uCiBSB36GXE7R/hHvA==\n"}
State: {:state, {:request, #Reference<0.0.2.435>, #PID<0.73.0>, 0, :https, {'repo.hex.pm', 443}, '/installs/rebar-1.x.csv.signed', [], :get, {:http_request_h, :undefined, 'keep-alive', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, 'repo.hex.pm', :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, [], 'Mix/1.4.5', :undefined, :undefined, :undefined, '0', :undefined, :undefined, :undefined, :undefined, :undefined, ...}, {[], []}, {:http_options, 'HTTP/1.1', :infinity, true, {:essl, []}, :undefined, true, :infinity, false}, 'https://repo.hex.pm/installs/rebar-1.x.csv.signed', [], :none, [], 1499013961522, :undefined, :undefined, false}, {:session, {{'repo.hex.pm', 443}, #PID<0.123.0>}, false, :https, {:sslsocket, {:gen_tcp, #Port<0.4758>, :tls_connection, :undefined}, #PID<0.124.0>}, {:essl, []}, 1, :keep_alive, false}, :undefined, :undefined, :undefined, {:httpc_response, :parse, [:nolimit, true]}, {[], []}, {[], []}, :new, [], :nolimit, :nolimit, {:options, {:undefined, []}, {:undefined, []}, 0, 2, 5, 120000, 2, :disabled, false, :inet, :default, :default, []}, {:timers, [], :undefined}, :httpc_mix, :inactive}
* creating /root/.mix/rebar
commented

I believe this is an OTP bug that will be fixed in OTP 20, see:
hexpm/hex#308 (comment)

commented

just happen to read this article from Docker Weekly, which has the same mix local.rebar --force as yours, should be working? would @0xAX confirm is latest OTP20 fixed the issue as @coryc5 mentioned?

commented

is this still reproducible with latest Elixir-1.6 images? which is Erlang20 based; /cc @0xAX

Hello @c0b, everything is working as expected now. Thank you for help.

The issue can be closed I think.