You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Mark Bean <ma...@gmail.com> on 2022/01/17 16:06:54 UTC

Build failure on macOS

Is anyone else having trouble building NiFi (main) on macOS? I recently
upgraded to macOS Monterey 12.1 and since then I have not been able to
build NiFi. I'm not sure if the failure started exactly coincidental with
the macOS upgrade, but it stands out as a significant recent change.

I get an error on TestHttpClient.

[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 134
[ERROR] Crashed tests:
[ERROR] org.apache.nifi.remote.client.http.TestHttpClient
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:748)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
[ERROR]         at
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
[ERROR]         at
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
[ERROR]         at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR]         at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR]         at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR]         at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR]         at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR]         at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR]         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR]         at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

I think I've traced this back to starting on commit
12ba579b8f6c506288458fb6cd2191ea26da2cb3. (The commit prior to that does
not have trouble building: b0b1a57b9874cbbbd57122970db96464c7dd1279)

More specifically, the breaking change introduced
io.netty:netty-all:4.1.72.Final. Previously, it was 4.0.44.Final in the
affected module, nifi-commons/nifi-site-to-site-client.)Replacing the
dependency (transitive in org.littleshoot:littleproxy) with 4.0.44.Final
allows a successful build.

So, the question is whether this is macOS [12.1] specific, or if there is
something else in my environment. I am using OpenJDK 1.8.0_312, maven
3.6.3. The build is successful on Linux (Fedora 26).

Thanks,
Mark

Re: Build failure on macOS

Posted by David Handermann <ex...@apache.org>.
Mark,

Thanks for highlighting this issue.  I have not seen any automated build
issues on GitHub, but that appears to be running macOS 11.6.2.

I noticed littleshoot 1.1.2 includes a build profile for Netty 4.1.  In
light of the fact that this works on Linux and other versions of macOS, I
wonder if it has something to do with the Netty native libraries.

Do you have any additional output in the target directory related to that
particular test class?  Unfortunately it looks like LittleProxy has not
been updated in several years, but it is useful in that test class for
verifying connectivity through a proxy server.

Regards,
David Handermann


On Mon, Jan 17, 2022 at 10:07 AM Mark Bean <ma...@gmail.com> wrote:

> Is anyone else having trouble building NiFi (main) on macOS? I recently
> upgraded to macOS Monterey 12.1 and since then I have not been able to
> build NiFi. I'm not sure if the failure started exactly coincidental with
> the macOS upgrade, but it stands out as a significant recent change.
>
> I get an error on TestHttpClient.
>
> [ERROR] Error occurred in starting fork, check output in log
> [ERROR] Process Exit Code: 134
> [ERROR] Crashed tests:
> [ERROR] org.apache.nifi.remote.client.http.TestHttpClient
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:748)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
> [ERROR]         at
>
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
> [ERROR]         at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
> [ERROR]         at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> [ERROR]         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
> [ERROR]         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
> [ERROR]         at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
> [ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
> [ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
> [ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
> [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> [ERROR]         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [ERROR]         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
> [ERROR]         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
> [ERROR]         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
> [ERROR]         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
> [ERROR]         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
>
> I think I've traced this back to starting on commit
> 12ba579b8f6c506288458fb6cd2191ea26da2cb3. (The commit prior to that does
> not have trouble building: b0b1a57b9874cbbbd57122970db96464c7dd1279)
>
> More specifically, the breaking change introduced
> io.netty:netty-all:4.1.72.Final. Previously, it was 4.0.44.Final in the
> affected module, nifi-commons/nifi-site-to-site-client.)Replacing the
> dependency (transitive in org.littleshoot:littleproxy) with 4.0.44.Final
> allows a successful build.
>
> So, the question is whether this is macOS [12.1] specific, or if there is
> something else in my environment. I am using OpenJDK 1.8.0_312, maven
> 3.6.3. The build is successful on Linux (Fedora 26).
>
> Thanks,
> Mark
>