[
https://issues.apache.org/jira/browse/NIFI-2685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15481759#comment-15481759
]
Andre commented on NIFI-2685:
-----------------------------
[~tkurc]
NIFI-827 is source of the bootstrap setting mentioned above, it predates
NIFI-615 and the inclusion of ResizeImage processor, reason perhaps why the bug
was not previously identified.
There seem to be no other uses of AWT across NiFi and we can also pinpoint the
issue to:
https://github.com/apache/nifi/blob/7e7d79fc6a0376ed27c37bd75ef5bd57d439979d/nifi-nar-bundles/nifi-media-bundle/nifi-media-processors/src/main/java/org/apache/nifi/processors/image/ResizeImage.java#L171
as far as I could tell, the only way of getting AWT to ignore the display
setting is (1) to unset DISPLAY prior to execution, (2) set a java property via
code or via {{-D}}
I am on the same page with you regarding the environmental aspect of this bug,
however, independently of the trigger for this issue, it seems reasonable to me
that surefire should be configured to closely match the environment NIFI will
run on, in this case a headless environment as set by the bootstrap.
Let me know your preferred approach (close with won't fix) or to push the pom
change.
Cheers
> Builds fails due to "java.awt.AWTError: Can't connect to X11 window server "
> ----------------------------------------------------------------------------
>
> Key: NIFI-2685
> URL: https://issues.apache.org/jira/browse/NIFI-2685
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Andre
> Assignee: Andre
> Priority: Trivial
>
> When building NiFi on a machine with ssh X11 forwarding enabled, maven may
> fail to build due to the following error:
> {code}
> testResize(org.apache.nifi.processors.image.TestResizeImage) Time elapsed:
> 2.22 sec <<< FAILURE!
> java.lang.AssertionError: java.awt.AWTError: Can't connect to X11 window
> server using 'localhost:12.0' as the value of the DISPLAY variable.
> at
> org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:192)
> at
> org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:151)
> at
> org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:146)
> at
> org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:141)
> at
> org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:136)
> at
> org.apache.nifi.processors.image.TestResizeImage.testResize(TestResizeImage.java:44)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)