Failed to connect to maven-erlang-plugin-back

  • Anonymous - 2011-04-15

    Hi all,

    Perhaps I'm missing something, but I'm unable to use this plugin due to troubles connecting to the erlang backend.  I'm getting the following error:

    [DEBUG] Using command: erl
    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 7.306s
    [INFO] Finished at: Fri Apr 15 10:50:40 PDT 2011
    [INFO] Final Memory: 5M/81M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal eu.lindenbaum:maven-erlang-plugin:2.0.0:reload-dependencies (default-reload-dependencies) on project ActivityRepositoryR
    iakMapReduce: failed to connect to maven-erlang-plugin-backend after 10 retries: Cannot connect to peer node -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal eu.lindenbaum:maven-erlang-plugin:2.0.0:reload-dependencies (default-rel
    oad-dependencies) on project ActivityRepositoryRiakMapReduce: failed to connect to maven-erlang-plugin-backend after 10 retries: Cannot connect to peer node
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
            at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
            at org.apache.maven.DefaultMaven.doExecute(
            at org.apache.maven.DefaultMaven.execute(
            at org.apache.maven.cli.MavenCli.execute(
            at org.apache.maven.cli.MavenCli.doMain(
            at org.apache.maven.cli.MavenCli.main(
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(
            at java.lang.reflect.Method.invoke(
            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(
    Caused by: org.apache.maven.plugin.MojoExecutionException: failed to connect to maven-erlang-plugin-backend after 10 retries: Cannot connect to peer node
            at eu.lindenbaum.maven.erlang.MavenSelf.connect(
            at eu.lindenbaum.maven.erlang.MavenSelf.eval(
            at eu.lindenbaum.maven.erlang.MavenSelf.exec(
            at eu.lindenbaum.maven.ErlangMojo.execute(
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
            ... 19 more

    I'm performing a simple

    mvn install

    on a erlang-otp packaged project.

    My environment is as follows:
    Apache Maven 3.0.2 (r1056850; 2011-01-08 16:58:10-0800)
    Java version: 1.6.0_24, vendor: Apple Inc.
    OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"
    Erlang version:R14B02

    Thanks for any help you can provide.

  • Anonymous - 2011-04-15

    I should mention that I was able to get this working on the older 1.0.0-beta version of the plugin.

  • Olle Törnström

    Hi dimnone,

    we have not officially fixed the plugin for Maven 3.x yet, so the 2.0.0 plugin-release works best with Maven2, even though it should not matter for backend node initialization and connection.

    I am also using a Mac OS X 10.6.7 setup, but I've chosen to stay with Maven 2.2.1 for a little longer, meaning that I've compiled and re-installed the 2.2.1 version after the Apple update

    I've done some tests with a couple of simple projects using Maven3 but I can't reproduce your problem.

    I think it would help if you could describe your project setup a bit more, perhaps providing your POM for us to take a look.

    Other things to try out and consider is how your hostname is resolved. The backend node is started using the "-name" parameter so it tries to use a fully qualified hostname as backend node name.

    I hope this helps and please let us know how it goes.

  • Tobias Schlager

    Tobias Schlager - 2011-04-18


    compared to 1.0.0-beta the new version now uses jinterface and distributed erlang instead of

    erl -eval

    To me this sounds like a typical erlang vm name resolution problem. Did you already try distributed erlang on your machine (e.g. by connecting two shell nodes using net_kernerl:connect/1)? On some machines there's something weird going on when trying to connect to nodes started with short hostnames.

    Switching to long names (e,g, @localhost.localdomain) for the default backend nodes could be a topic for a future plugin release.

  • Anonymous - 2011-05-24

    Hi all,

    I know it's been a while since I posted this issue; I was working on another project and finally got a chance to revisit this.  Thanks to both of you for your responses.  With schlagert's hint about trying running a distributing erlang I was able to find the problem.  The .erlang.cookie in my home directory was owned by root and ultimately was causing a permissions issue.  i deleted this file and reran and the plugin ran just fine.

  • Tobias Schlager

    Tobias Schlager - 2011-05-26

    Hi dimnone,

    glad I could help.

    We also know of other problems with backend node connectivity.  At least on some MacOS X hosts jinterface could not connect to the backend nodes. Version 2.1.0 will contain a patch that will force the backend nodes to be started with

    erl -name node@IP

    where the IP is read from one of the currently active network interfaces. The loopback device will be considered last. This should solve some of these problems.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks