average-airport-82192
10/04/2022, 7:47 PM#!/bin/bash -eo pipefail
for i in `seq 1 10`;
do
curl -v -X GET '<http://localhost:4468/relation-tuples>' | grep '{"relation_tuples":\[\],"next_page_token":""}' && exit 0
sleep 2
done
echo Failed waiting for keto && exit 1
Note: Unnecessary use of -X or --request, GET is already inferred.
* Uses proxy env variable NO_PROXY == '127.0.0.1,localhost,circleci-internal-outer-build-agent'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:4468...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 4468 (#0)
> GET /relation-tuples HTTP/1.1
> Host: localhost:4468
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Tue, 04 Oct 2022 19:41:32 GMT
< Content-Length: 19
<
{ [19 bytes data]
100 19 100 19 0 0 19000 0 --:--:-- --:--:-- --:--:-- 19000
* Connection #0 to host localhost left intact
but other times the same check passes on the first try:
#!/bin/bash -eo pipefail
for i in `seq 1 10`;
do
curl -v -X GET '<http://localhost:4468/relation-tuples>' | grep '{"relation_tuples":\[\],"next_page_token":""}' && exit 0
sleep 2
done
echo Failed waiting for keto && exit 1
Note: Unnecessary use of -X or --request, GET is already inferred.
* Uses proxy env variable NO_PROXY == '127.0.0.1,localhost,circleci-internal-outer-build-agent'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:4468...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 4468 (#0)
> GET /relation-tuples HTTP/1.1
> Host: localhost:4468
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Tue, 04 Oct 2022 18:43:05 GMT
< Content-Length: 44
<
{ [44 bytes data]
100 44 100 44 0 0 22000 0 --:--:-- --:--:-- --:--:-- 22000
* Connection #0 to host localhost left intact
{"relation_tuples":[],"next_page_token":""}
average-airport-82192
10/04/2022, 7:49 PMaverage-airport-82192
10/04/2022, 7:50 PMbright-wire-30388
10/04/2022, 7:52 PMaverage-airport-82192
10/04/2022, 7:56 PMlsof
shows the following, but ill still get 404s from known good keto urls
> lsof -i :4468
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
keto 13377 nick 33u IPv6 0x9d2250f89fcca365 0t0 TCP *:4468 (LISTEN)
average-airport-82192
10/04/2022, 7:58 PMaverage-airport-82192
10/04/2022, 8:30 PMaverage-airport-82192
10/04/2022, 9:35 PMaverage-airport-82192
10/04/2022, 9:36 PMaverage-airport-82192
10/04/2022, 9:36 PMsteep-lamp-91158
steep-lamp-91158
steep-lamp-91158
average-airport-82192
10/05/2022, 4:28 PMaverage-airport-82192
10/05/2022, 4:30 PMaverage-airport-82192
10/05/2022, 4:58 PMsteep-lamp-91158
average-airport-82192
10/05/2022, 5:34 PMcurl -v -X GET '<http://localhost:4468/relation-tuples>'
(used a different port for our test env but I've seen it on both)average-airport-82192
10/05/2022, 5:35 PMaverage-airport-82192
10/05/2022, 5:55 PMlisten tcp 0.0.0.0:4466: bind: address already in use
when it happens toosteep-lamp-91158
average-airport-82192
10/10/2022, 4:31 PMsteep-lamp-91158
steep-lamp-91158
average-airport-82192
10/14/2022, 5:29 PMsteep-lamp-91158
lsof -i :4466
whether it is the same PID on that port.steep-lamp-91158
average-airport-82192
10/17/2022, 6:36 PMsteep-lamp-91158