Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

scripts/wait_for_endpoint.sh doesn't seem to actually hold conn open for a few seconds #352

Closed
Dieterbe opened this issue Oct 24, 2016 · 4 comments

Comments

@Dieterbe
Copy link
Contributor

Dieterbe commented Oct 24, 2016

I added some log statements in 5688847 and when i run it in raintank-docker i'm seeing output like

2016/10/24 14:46:47 waiting for toxiproxy:9042 to become up...
2016/10/24 14:46:47 returned value 1, expecting 0
2016/10/24 14:46:48 waiting for toxiproxy:9042 to become up...
2016/10/24 14:46:48 toxiproxy:9042 is up. maintained connection for 3 seconds!
2016/10/24 14:46:48 [I] Metrictank starting. Built from 0.5.6-11-gc3441f5 - Go version go1.7.1
2016/10/24 14:46:49 [I] Opened /var/lib/metrictank/partitionOffsets.db
2016/10/24 14:46:49 gocql: unable to dial control conn toxiproxy:9042: read tcp 172.19.0.12:53152->172.19.0.16:9042: read: connection reset by peer
2016/10/24 14:46:49 [metrictank.go:307 main()] [E] failed to initialize cassandra. gocql: unable to create session: control: unable to connect to initial hosts: read tcp 172.19.0.12:53152->172.19.0.16:9042: read: connection reset by peer

judging from the timestamps it's not actually holding the connection open for a few seconds.
@OOM-Killer

also FWIW the cassandra container says

INFO  14:46:49 Starting listening for CQL clients on /0.0.0.0:9042 (unencrypted)...
@OOM-Killer
Copy link
Contributor

@Dieterbe right, that's irritating indeed. I'm purely guessing now, but couldn't it be that some buffering of these logs is happening before they get prefixed with a time stamp by docker and that's why the stamp is not accurate down to the second? I'll investigate that by adding a date to the actual script output, because there we can be sure that no buffering is happening.

@Dieterbe
Copy link
Contributor Author

the dates are coming from the script so they should be accurate

@OOM-Killer
Copy link
Contributor

that's an interesting one. could you try if this fixes it #354 ? I'm writing an explanation into the PR what's going on

@Dieterbe
Copy link
Contributor Author

from circleci:

2016/10/26 15:16:19 waiting for 127.0.0.1:2003 to become up...
2016/10/26 15:16:19 returned value 0, expecting 124
2016/10/26 15:16:20 waiting for 127.0.0.1:2003 to become up...
2016/10/26 15:16:23 127.0.0.1:2003 is up. maintained connection for 3 seconds!

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

2 participants