Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cro run reliably hangs for 5-7 minutes, perl6 service.p6 is not #88

Open
Altai-man opened this issue Apr 20, 2019 · 0 comments
Open

cro run reliably hangs for 5-7 minutes, perl6 service.p6 is not #88

Altai-man opened this issue Apr 20, 2019 · 0 comments

Comments

@Altai-man
Copy link
Member

Needs docker and docker-compose to reproduce.

Steps to reproduce:
0)Have docker service up and running.
1)Clone https://github.com/Altai-man/VaultTest
2)docker-compose build
3)docker-compose start vault # to start a server to connect to
4)Execute docker ps to get port of vaulttest_vault_1 container, e.g. 0.0.0.0:$PORT->8200/tcp, you need to get that $PORT.
5)CRO_TRACE=1 VAULT_DEV_ROOT_TOKEN_ID=my-very-big-and-dev-only-token VAULT_PERL6_PORT="$PORT" VAULT_PERL6_HOST="0.0.0.0" perl6 -Ilib service.p6 # replace $PORT with previously gotten port. This command reliably returns a fast response with some json.
6)CRO_TRACE=1 VAULT_DEV_ROOT_TOKEN_ID=my-very-big-and-dev-only-token VAULT_PERL6_PORT="$PORT" VAULT_PERL6_HOST="0.0.0.0" cro run . <- this command will reliably hang for 5-7 minutes before eventually resolving await with a correct response.

Working log:

[koto@dispair VaultTest]$ CRO_TRACE=1 VAULT_DEV_ROOT_TOKEN_ID=my-very-big-and-dev-only-token VAULT_PERL6_PORT="32770" VAULT_PERL6_HOST="0.0.0.0" perl6 -Ilib service.p6 
1
[TRACE(anon 1)] RequestSerializerExtension EMIT HTTP Request
  POST /v1/auth/token/create HTTP/1.1
  Host: localhost:32770
  content-type: application/json
  X-Vault-Token: my-very-big-and-dev-only-token
[TRACE(anon 1)] Cro::HTTP::RequestSerializer EMIT TCP Message
  50 4f 53 54 20 2f 76 31 2f 61 75 74 68 2f 74 6f  POST /v1/auth/to
  6b 65 6e 2f 63 72 65 61 74 65 20 48 54 54 50 2f  ken/create HTTP/
  31 2e 31 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c  1.1..Host: local
  68 6f 73 74 3a 33 32 37 37 30 0d 0a 63 6f 6e 74  host:32770..cont
  65 6e 74 2d 74 79 70 65 3a 20 61 70 70 6c 69 63  ent-type: applic
  61 74 69 6f 6e 2f 6a 73 6f 6e 0d 0a 58 2d 56 61  ation/json..X-Va
  75 6c 74 2d 54 6f 6b 65 6e 3a 20 6d 79 2d 76 65  ult-Token: my-ve
  72 79 2d 62 69 67 2d 61 6e 64 2d 64 65 76 2d 6f  ry-big-and-dev-o
  6e 6c 79 2d 74 6f 6b 65 6e 0d 0a 43 6f 6e 74 65  nly-token..Conte
  6e 74 2d 6c 65 6e 67 74 68 3a 20 32 31 0d 0a 0d  nt-length: 21...
  0a                                               .

[TRACE(anon 1)] Cro::HTTP::RequestSerializer EMIT TCP Message
  7b 22 70 6f 6c 69 63 69 65 73 22 3a 20 5b 22 77  {"policies": ["w
  65 62 22 5d 7d                                   eb"]}

[TRACE(anon 1)] Cro::TCP::Connector EMIT TCP Message
  48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d  HTTP/1.1 200 OK.
  0a 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20  .Cache-Control: 
  6e 6f 2d 73 74 6f 72 65 0d 0a 43 6f 6e 74 65 6e  no-store..Conten
  74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74  t-Type: applicat
  69 6f 6e 2f 6a 73 6f 6e 0d 0a 44 61 74 65 3a 20  ion/json..Date: 
  53 61 74 2c 20 32 30 20 41 70 72 20 32 30 31 39  Sat, 20 Apr 2019
  20 31 35 3a 33 34 3a 30 30 20 47 4d 54 0d 0a 43   15:34:00 GMT..C
  6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 34  ontent-Length: 4
  34 35 0d 0a 0d 0a 7b 22 72 65 71 75 65 73 74 5f  45....{"request_
  69 64 22 3a 22 66 31 31 65 37 63 36 66 2d 61 62  id":"f11e7c6f-ab
  37 61 2d 37 62 33 36 2d 34 37 36 64 2d 38 61 31  7a-7b36-476d-8a1
  39 38 32 39 30 30 36 63 65 22 2c 22 6c 65 61 73  9829006ce","leas
  65 5f 69 64 22 3a 22 22 2c 22 72 65 6e 65 77 61  e_id":"","renewa
  62 6c 65 22 3a 66 61 6c 73 65 2c 22 6c 65 61 73  ble":false,"leas
  65 5f 64 75 72 61 74 69 6f 6e 22 3a 30 2c 22 64  e_duration":0,"d
  61 74 61 22 3a 6e 75 6c 6c 2c 22 77 72 61 70 5f  ata":null,"wrap_
  69 6e 66 6f 22 3a 6e 75 6c 6c 2c 22 77 61 72 6e  info":null,"warn
  69 6e 67 73 22 3a 5b 22 50 6f 6c 69 63 79 20 5c  ings":["Policy \
  22 77 65 62 5c 22 20 64 6f 65 73 20 6e 6f 74 20  "web\" does not 
  65 78 69 73 74 22 5d 2c 22 61 75 74 68 22 3a 7b  exist"],"auth":{
  22 63 6c 69 65 6e 74 5f 74 6f 6b 65 6e 22 3a 22  "client_token":"
  73 2e 49 51 36 66 53 6a 35 42 6e 38 53 6b 30 76  s.IQ6fSj5Bn8Sk0v
  63 79 4f 32 70 38 55 76 5a 69 22 2c 22 61 63 63  cyO2p8UvZi","acc
  65 73 73 6f 72 22 3a 22 74 65 47 34 46 55 70 4c  essor":"teG4FUpL
  63 55 5a 48 52 76 37 43 42 44 6a 62 4c 79 77 75  cUZHRv7CBDjbLywu
  22 2c 22 70 6f 6c 69 63 69 65 73 22 3a 5b 22 64  ","policies":["d
  65 66 61 75 6c 74 22 2c 22 77 65 62 22 5d 2c 22  efault","web"],"
  74 6f 6b 65 6e 5f 70 6f 6c 69 63 69 65 73 22 3a  token_policies":
  5b 22 64 65 66 61 75 6c 74 22 2c 22 77 65 62 22  ["default","web"
  5d 2c 22 6d 65 74 61 64 61 74 61 22 3a 6e 75 6c  ],"metadata":nul
  6c 2c 22 6c 65 61 73 65 5f 64 75 72 61 74 69 6f  l,"lease_duratio
  6e 22 3a 32 37 36 34 38 30 30 2c 22 72 65 6e 65  n":2764800,"rene
  77 61 62 6c 65 22 3a 74 72 75 65 2c 22 65 6e 74  wable":true,"ent
  [67 bytes not displayed]

[TRACE(anon 1)] Cro::HTTP::ResponseParser EMIT HTTP Response
  HTTP/1.1 200 OK
  Cache-Control: no-store
  Content-Type: application/json
  Date: Sat, 20 Apr 2019 15:34:00 GMT
  Content-Length: 445
[TRACE(anon 1)] ResponseParserExtension EMIT HTTP Response
  HTTP/1.1 200 OK
  Cache-Control: no-store
  Content-Type: application/json
  Date: Sat, 20 Apr 2019 15:34:00 GMT
  Content-Length: 445
2
Cro::HTTP::Response.new(request => Cro::HTTP::Request.new(body-parser-selector => Cro::HTTP::BodyParserSelector::RequestDefault, body-serializer-selector => Cro::HTTP::BodySerializerSelector::RequestDefault, connection => Any, method => "POST", target => "/v1/auth/token/create", original-target => Str, auth => Any, http-version => Str, http2-stream-id => Int), status => 200, body-parser-selector => Cro::HTTP::BodyParserSelector::ResponseDefault, body-serializer-selector => Cro::HTTP::BodySerializerSelector::ResponseDefault, http-version => "1.1", http2-stream-id => Int)
3
{"request_id":"f11e7c6f-ab7a-7b36-476d-8a19829006ce","lease_id":"","renewable":false,"lease_duration":0,"data":null,"wrap_info":null,"warnings":["Policy \"web\" does not exist"],"auth":{"client_token":"s.IQ6fSj5Bn8Sk0vcyO2p8UvZi","accessor":"teG4FUpLcUZHRv7CBDjbLywu","policies":["default","web"],"token_policies":["default","web"],"metadata":null,"lease_duration":2764800,"renewable":true,"entity_id":"","token_type":"service","orphan":false}}

4
Listening at http://0.0.0.0:32770

Hanging log(first part):

[koto@dispair VaultTest]$ CRO_TRACE=1 VAULT_DEV_ROOT_TOKEN_ID=my-very-big-and-dev-only-token VAULT_PERL6_PORT="32770" VAULT_PERL6_HOST="0.0.0.0" perl6 -Ilib ../../Work/cro/cro/bin/cro run .
▶ Starting vault-perl6 (vault-perl6)
🔌 Endpoint HTTP will be at http://localhost:20000/
📓 vault-perl6 1
👓 vault-perl6 ⚡ EMIT [anon 1] RequestSerializerExtension
                HTTP Request
⚠ vault-perl6   POST /v1/auth/token/create HTTP/1.1
⚠ vault-perl6   Host: localhost:32770
⚠ vault-perl6   content-type: application/json
⚠ vault-perl6   X-Vault-Token: my-very-big-and-dev-only-token
👓 vault-perl6 ⚡ EMIT [anon 1] Cro::HTTP::RequestSerializer
                TCP Message
⚠ vault-perl6   50 4f 53 54 20 2f 76 31 2f 61 75 74 68 2f 74 6f  POST /v1/auth/to
⚠ vault-perl6   6b 65 6e 2f 63 72 65 61 74 65 20 48 54 54 50 2f  ken/create HTTP/
⚠ vault-perl6   31 2e 31 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c  1.1..Host: local
⚠ vault-perl6   68 6f 73 74 3a 33 32 37 37 30 0d 0a 63 6f 6e 74  host:32770..cont
⚠ vault-perl6   65 6e 74 2d 74 79 70 65 3a 20 61 70 70 6c 69 63  ent-type: applic
⚠ vault-perl6   61 74 69 6f 6e 2f 6a 73 6f 6e 0d 0a 58 2d 56 61  ation/json..X-Va
⚠ vault-perl6   75 6c 74 2d 54 6f 6b 65 6e 3a 20 6d 79 2d 76 65  ult-Token: my-ve
⚠ vault-perl6   72 79 2d 62 69 67 2d 61 6e 64 2d 64 65 76 2d 6f  ry-big-and-dev-o
⚠ vault-perl6   6e 6c 79 2d 74 6f 6b 65 6e 0d 0a 43 6f 6e 74 65  nly-token..Conte
⚠ vault-perl6   6e 74 2d 6c 65 6e 67 74 68 3a 20 32 31 0d 0a 0d  nt-length: 21...
⚠ vault-perl6   0a                                               .
⚠ vault-perl6 
👓 vault-perl6 ⚡ EMIT [anon 1] Cro::HTTP::RequestSerializer
                TCP Message
⚠ vault-perl6   7b 22 70 6f 6c 69 63 69 65 73 22 3a 20 5b 22 77  {"policies": ["w
⚠ vault-perl6   65 62 22 5d 7d                                   eb"]}
⚠ vault-perl6 
👓 vault-perl6 ⚡ EMIT [anon 1] Cro::TCP::Connector
                TCP Message
⚠ vault-perl6   48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d  HTTP/1.1 200 OK.
⚠ vault-perl6   0a 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20  .Cache-Control: 
⚠ vault-perl6   6e 6f 2d 73 74 6f 72 65 0d 0a 43 6f 6e 74 65 6e  no-store..Conten
⚠ vault-perl6   74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74  t-Type: applicat
⚠ vault-perl6   69 6f 6e 2f 6a 73 6f 6e 0d 0a 44 61 74 65 3a 20  ion/json..Date: 
⚠ vault-perl6   53 61 74 2c 20 32 30 20 41 70 72 20 32 30 31 39  Sat, 20 Apr 2019
⚠ vault-perl6   20 31 35 3a 33 38 3a 30 30 20 47 4d 54 0d 0a 43   15:38:00 GMT..C
⚠ vault-perl6   6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 34  ontent-Length: 4
⚠ vault-perl6   34 35 0d 0a 0d 0a 7b 22 72 65 71 75 65 73 74 5f  45....{"request_
⚠ vault-perl6   69 64 22 3a 22 37 35 34 39 64 61 66 30 2d 31 65  id":"7549daf0-1e
⚠ vault-perl6   65 30 2d 62 63 31 37 2d 36 64 34 62 2d 39 39 30  e0-bc17-6d4b-990
⚠ vault-perl6   33 39 63 37 37 38 33 66 62 22 2c 22 6c 65 61 73  39c7783fb","leas
⚠ vault-perl6   65 5f 69 64 22 3a 22 22 2c 22 72 65 6e 65 77 61  e_id":"","renewa
⚠ vault-perl6   62 6c 65 22 3a 66 61 6c 73 65 2c 22 6c 65 61 73  ble":false,"leas
⚠ vault-perl6   65 5f 64 75 72 61 74 69 6f 6e 22 3a 30 2c 22 64  e_duration":0,"d
⚠ vault-perl6   61 74 61 22 3a 6e 75 6c 6c 2c 22 77 72 61 70 5f  ata":null,"wrap_
⚠ vault-perl6   69 6e 66 6f 22 3a 6e 75 6c 6c 2c 22 77 61 72 6e  info":null,"warn
⚠ vault-perl6   69 6e 67 73 22 3a 5b 22 50 6f 6c 69 63 79 20 5c  ings":["Policy \
⚠ vault-perl6   22 77 65 62 5c 22 20 64 6f 65 73 20 6e 6f 74 20  "web\" does not 
⚠ vault-perl6   65 78 69 73 74 22 5d 2c 22 61 75 74 68 22 3a 7b  exist"],"auth":{
⚠ vault-perl6   22 63 6c 69 65 6e 74 5f 74 6f 6b 65 6e 22 3a 22  "client_token":"
⚠ vault-perl6   73 2e 35 52 4b 6b 34 6e 69 74 46 55 38 46 7a 50  s.5RKk4nitFU8FzP
⚠ vault-perl6   31 44 73 53 46 50 46 6b 41 6c 22 2c 22 61 63 63  1DsSFPFkAl","acc
⚠ vault-perl6   65 73 73 6f 72 22 3a 22 37 43 66 4d 62 45 6e 43  essor":"7CfMbEnC
⚠ vault-perl6   65 46 36 6a 39 31 68 57 51 75 69 44 54 39 61 62  eF6j91hWQuiDT9ab
⚠ vault-perl6   22 2c 22 70 6f 6c 69 63 69 65 73 22 3a 5b 22 64  ","policies":["d
⚠ vault-perl6   65 66 61 75 6c 74 22 2c 22 77 65 62 22 5d 2c 22  efault","web"],"
⚠ vault-perl6   74 6f 6b 65 6e 5f 70 6f 6c 69 63 69 65 73 22 3a  token_policies":
⚠ vault-perl6   5b 22 64 65 66 61 75 6c 74 22 2c 22 77 65 62 22  ["default","web"
⚠ vault-perl6   5d 2c 22 6d 65 74 61 64 61 74 61 22 3a 6e 75 6c  ],"metadata":nul
⚠ vault-perl6   6c 2c 22 6c 65 61 73 65 5f 64 75 72 61 74 69 6f  l,"lease_duratio
⚠ vault-perl6   6e 22 3a 32 37 36 34 38 30 30 2c 22 72 65 6e 65  n":2764800,"rene
⚠ vault-perl6   77 61 62 6c 65 22 3a 74 72 75 65 2c 22 65 6e 74  wable":true,"ent
⚠ vault-perl6   [67 bytes not displayed]
⚠ vault-perl6 
👓 vault-perl6 ⚡ EMIT [anon 1] Cro::HTTP::ResponseParser
                HTTP Response
⚠ vault-perl6   HTTP/1.1 200 OK
⚠ vault-perl6   Cache-Control: no-store
⚠ vault-perl6   Content-Type: application/json
⚠ vault-perl6   Date: Sat, 20 Apr 2019 15:38:00 GMT
⚠ vault-perl6   Content-Length: 445
👓 vault-perl6 ⚡ EMIT [anon 1] ResponseParserExtension
                HTTP Response
⚠ vault-perl6   HTTP/1.1 200 OK
⚠ vault-perl6   Cache-Control: no-store
⚠ vault-perl6   Content-Type: application/json
⚠ vault-perl6   Date: Sat, 20 Apr 2019 15:38:00 GMT
⚠ vault-perl6   Content-Length: 445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant