Java gearman-client wont connect to german job server

23 views Asked by At

I am trying to use Gearman with my Spring project. But when i try to connect to the job server, it gets stuck, no exception, the client seems to go into some kind of endless loop.

I use docker for the gearman job server like this:

docker run --name gearman -p 4730:4730 dockage/gearmand

In my pom.xml i add this:

    <dependency>
        <groupId>org.gearman</groupId>
        <artifactId>gearman-java</artifactId>
        <version>0.6</version>
    </dependency>

In my controller endpoint i do this:

GearmanJobServerConnection connection = new GearmanNIOJobServerConnection("localhost", 4730);
GearmanClient client = new GearmanClientImpl();
client.addJobServer(connection);
//some other code

It just gets stuck on the third line. No exception is thrown. If i try again with the job server disabled, i get a proper exception.

What am i doing wrong?

0

There are 0 answers