lagom icon indicating copy to clipboard operation
lagom copied to clipboard

failed: CassandraClusteredPersistentEntitySpec

Open patriknw opened this issue 6 years ago • 6 comments

Cassandra bind problem: Failed to bind port 40361 on 127.0.0.1

https://api.travis-ci.com/v3/job/292949867/log.txt

patriknw avatar Mar 03 '20 13:03 patriknw

Same kind of bind problem: https://travis-ci.com/lagom/lagom/jobs/292311699

patriknw avatar Mar 03 '20 13:03 patriknw

The ports are selected in the build file using the same method as Akka's testkit util, see https://github.com/lagom/lagom/blob/81c3002c8980321499d25dc56c5a6e402cfd759b/build.sbt#L196-L208

The ports are then used on all AbstractClusteredPersistentEntityConfig. Maybe we should simply have some fixed port per test extension.

octonato avatar Mar 03 '20 14:03 octonato

Hmm, I think this is not a problem of reserving the ports, but when connecting the client to the embedded server.

octonato avatar Mar 03 '20 14:03 octonato

It’s a bind issue, so I think it’s starting the embedded server that fails.

patriknw avatar Mar 03 '20 17:03 patriknw

https://travis-ci.com/github/lagom/lagom/jobs/326474445

chbatey avatar May 04 '20 06:05 chbatey

https://github.com/lagom/lagom/pull/2804/files had a fix for this kind of situation, but didn't cover the CassandraClusteredPersistentEntitySpec. This seems to start in a different way.

It's about when we reserve the Cassandra port and when we start the ActorSystem.

In this failing test, we are reserving the Cassandra port in a sbt task (I don't know why), then we start the ActorSystem (it picks same port for remote) and we then start Cassandra with the port that is now in use by remote.

octonato avatar May 04 '20 12:05 octonato