elasticmq icon indicating copy to clipboard operation
elasticmq copied to clipboard

ERROR no matching constructor found on class akka.io.TcpIncomingConnection

Open pablodo opened this issue 5 years ago • 12 comments

Version: 1.3.0

Hi everyone, we use this image at my company to run CircleCI Pipelines and now our projects are failing since the latest release with the following error:

[WARN  tini (87)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
15:43:53.193 [main] INFO  org.elasticmq.server.Main$ - Starting ElasticMQ server (1.3.0) ...
15:43:53.216 [elasticmq-akka.actor.default-dispatcher-6] INFO  akka.event.slf4j.Slf4jLogger - Slf4jLogger started
15:43:53.230 [elasticmq-akka.actor.default-dispatcher-7] INFO  o.e.rest.sqs.TheSQSRestServerBuilder - Started SQS rest server, bind address 0.0.0.0:9324, visible server address http://localhost:9324
15:43:53.232 [main] INFO  org.elasticmq.server.Main$ - === ElasticMQ server (1.3.0) started in 45 ms ===
15:43:53.232 [elasticmq-akka.actor.default-dispatcher-7] INFO  o.e.r.s.TheStatisticsRestServerBuilder - Started statistics rest server, bind address 0.0.0.0:9325
15:45:20.005 [elasticmq-akka.actor.default-dispatcher-6] ERROR akka.io.SelectionHandler$$anon$1 - no matching constructor found on class akka.io.TcpIncomingConnection for arguments [class akka.io.TcpExt, class sun.nio.ch.SocketChannelImpl, class akka.io.SelectionHandler$ChannelRegistryImpl, class akka.actor.FunctionRef, class scala.collection.immutable.Nil$, class java.lang.Boolean]
java.lang.IllegalArgumentException: no matching constructor found on class akka.io.TcpIncomingConnection for arguments [class akka.io.TcpExt, class sun.nio.ch.SocketChannelImpl, class akka.io.SelectionHandler$ChannelRegistryImpl, class akka.actor.FunctionRef, class scala.collection.immutable.Nil$, class java.lang.Boolean]
	at akka.util.Reflect$.error$1(Reflect.scala:89)
	at akka.util.Reflect$.findConstructor(Reflect.scala:113)
	at akka.actor.ArgsReflectConstructor.<init>(IndirectActorProducer.scala:99)
	at akka.actor.IndirectActorProducer$.apply(IndirectActorProducer.scala:64)
	at akka.actor.Props.producer(Props.scala:131)
	at akka.actor.Props.<init>(Props.scala:144)
	at akka.actor.Props$.apply(Props.scala:86)
	at akka.io.TcpListener.props$1(TcpListener.scala:137)
	at akka.io.TcpListener.$anonfun$acceptAllPending$1(TcpListener.scala:138)
	at akka.io.SelectionHandler.spawnChildWithCapacityProtection(SelectionHandler.scala:362)
	at akka.io.SelectionHandler$$anonfun$receive$1.applyOrElse(SelectionHandler.scala:317)
	at akka.actor.Actor.aroundReceive(Actor.scala:537)
	at akka.actor.Actor.aroundReceive$(Actor.scala:535)
	at akka.io.SelectionHandler.aroundReceive(SelectionHandler.scala:302)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580)
	at akka.actor.ActorCell.invoke(ActorCell.scala:548)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
	at akka.dispatch.Mailbox.run(Mailbox.scala:231)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:567)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)

pablodo avatar Oct 19 '21 15:10 pablodo

Hi, we are facing the same issue in our Drone CI pipelines:

14:37:34.955 [main] INFO  org.elasticmq.server.Main$ - Starting ElasticMQ server (1.3.0) ...
14:37:34.978 [elasticmq-akka.actor.default-dispatcher-6] INFO  akka.event.slf4j.Slf4jLogger - Slf4jLogger started
14:37:34.988 [elasticmq-akka.actor.default-dispatcher-8] INFO  o.e.rest.sqs.TheSQSRestServerBuilder - Started SQS rest server, bind address 0.0.0.0:9324, visible server address * (depends on incoming request path) 
14:37:34.990 [elasticmq-akka.actor.default-dispatcher-8] INFO  o.e.r.s.TheStatisticsRestServerBuilder - Started statistics rest server, bind address 0.0.0.0:9325
14:37:34.990 [main] INFO  org.elasticmq.server.Main$ - === ElasticMQ server (1.3.0) started in 40 ms ===
14:40:17.236 [elasticmq-akka.actor.default-dispatcher-6] ERROR akka.io.SelectionHandler$$anon$1 - no matching constructor found on class akka.io.TcpIncomingConnection for arguments [class akka.io.TcpExt, class sun.nio.ch.SocketChannelImpl, class akka.io.SelectionHandler$ChannelRegistryImpl, class akka.actor.FunctionRef, class scala.collection.immutable.Nil$, class java.lang.Boolean]
java.lang.IllegalArgumentException: no matching constructor found on class akka.io.TcpIncomingConnection for arguments [class akka.io.TcpExt, class sun.nio.ch.SocketChannelImpl, class akka.io.SelectionHandler$ChannelRegistryImpl, class akka.actor.FunctionRef, class scala.collection.immutable.Nil$, class java.lang.Boolean]
	at akka.util.Reflect$.error$1(Reflect.scala:89)
	at akka.util.Reflect$.findConstructor(Reflect.scala:113)
	at akka.actor.ArgsReflectConstructor.<init>(IndirectActorProducer.scala:99)
	at akka.actor.IndirectActorProducer$.apply(IndirectActorProducer.scala:64)
	at akka.actor.Props.producer(Props.scala:131)
	at akka.actor.Props.<init>(Props.scala:144)
	at akka.actor.Props$.apply(Props.scala:86)
	at akka.io.TcpListener.props$1(TcpListener.scala:137)
	at akka.io.TcpListener.$anonfun$acceptAllPending$1(TcpListener.scala:138)
	at akka.io.SelectionHandler.spawnChildWithCapacityProtection(SelectionHandler.scala:362)
	at akka.io.SelectionHandler$$anonfun$receive$1.applyOrElse(SelectionHandler.scala:317)
	at akka.actor.Actor.aroundReceive(Actor.scala:537)
	at akka.actor.Actor.aroundReceive$(Actor.scala:535)
	at akka.io.SelectionHandler.aroundReceive(SelectionHandler.scala:302)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580)
	at akka.actor.ActorCell.invoke(ActorCell.scala:548)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
	at akka.dispatch.Mailbox.run(Mailbox.scala:231)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:567)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)

klobinoid avatar Oct 19 '21 16:10 klobinoid

do you use the docker container and /opt/elasticmq.conf to insert the queues you want to exist?

I have a similar error, and the root cause is that the queues simply were not created when the container started: https://github.com/softwaremill/elasticmq/issues/553

VTLee avatar Oct 19 '21 16:10 VTLee

do you use the docker container and /opt/elasticmq.conf to insert the queues you want to exist?

yes for both (docker + inserting defined queues to /opt/elasticmq.conf, file is not empty like you montion in https://github.com/softwaremill/elasticmq/issues/553#issue-1030531931)

klobinoid avatar Oct 19 '21 16:10 klobinoid

#553 is not an empty file, its a single queue named 'void'... basically a minimal test case that shows even the most basic queue is not being made.

VTLee avatar Oct 19 '21 19:10 VTLee

Oh I see, my bad. We use the same setup as you pointed out, so I guess the issues might be connected. Let authors decide in which thread they will follow this issue.

klobinoid avatar Oct 20 '21 06:10 klobinoid

I am seeing the exact same issue, with a pretty basic setup, not doing any configuration of /opt/elasticmq.conf, in fact this is it:

version: '3'
services:
  elasticmq:
    image: softwaremill/elasticmq-native
    restart: always
    ports:
    - "9324:9324"
    - "9325:9325"

So seems to be an issue with the latest build?

micdah avatar Oct 20 '21 09:10 micdah

Thanks for the reports, yes that's definitely something with the latest version, we'll investigate shortly (hopefully this week :) )

adamw avatar Oct 20 '21 09:10 adamw

Thanks for the reports, yes that's definitely something with the latest version, we'll investigate shortly (hopefully this week :) )

Excellent, just to mention it 1.3.0 is not working at all for me, the stats API is non-responding and the SQS API seems to crash / not work either.

Of course I have just downgraded to 1.2.3 to keep working, but people trying out :latest might have a bad time - maybe consider pulling the image from docker repository?

micdah avatar Oct 20 '21 09:10 micdah

@micdah Indeed, the native image doesn't work at all. I've removed the latest tag and added it back to the 1.2.3 version, thanks for the suggestion

adamw avatar Oct 20 '21 09:10 adamw

sorry, wrong button ;)

adamw avatar Oct 20 '21 09:10 adamw

It appears that docker hub still shows latest being associated with 1.3.0 release. Any chance you could take a look at it again? image

dominikborkowski avatar Oct 20 '21 12:10 dominikborkowski

Should be fixed in 1.3.1. Please test, and please excuse us for the inconvenience :)

adamw avatar Oct 21 '21 12:10 adamw