Failed to connect to maven-erlang-plugin-back

Help
Anonymous
2011-04-15
2013-04-26
  • 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] BUILD FAILURE
    [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(MojoExecutor.java:217)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    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(MavenSelf.java:109)
            at eu.lindenbaum.maven.erlang.MavenSelf.eval(MavenSelf.java:166)
            at eu.lindenbaum.maven.erlang.MavenSelf.exec(MavenSelf.java:127)
            at eu.lindenbaum.maven.mojo.app.DependencyLoader.execute(DependencyLoader.java:33)
            at eu.lindenbaum.maven.ErlangMojo.execute(ErlangMojo.java:133)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
            ... 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

    Hi,

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

    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.

     

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

Sign up for the SourceForge newsletter:





No, thanks