[ 
https://issues.apache.org/jira/browse/NIFI-6336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16993125#comment-16993125
 ] 

M Tien edited comment on NIFI-6336 at 12/11/19 1:38 AM:
--------------------------------------------------------

With this example, tried to replicate the error and found that 0 is a valid 
port, according to Java InetSocketAddress documentation.

"A valid port value is between 0 and 65535. A port number of {{zero}} will let 
the system pick up an ephemeral port in a {{bind}} operation."

[https://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html]

>From NiFi's perspective, it only allows ports 1-65535. But NiFi properties are 
>looked at too late and are unable to catch invalid port numbers. Therefore, if 
>0 is not a valid port for NiFi, then it needs to be explicitly handled.


was (Author: mtien):
With this example, tried to replicate the error and found that 0 is a valid 
port, according to Java InetSocketAddress documentation.

"A valid port value is between 0 and 65535. A port number of {{zero}} will let 
the system pick up an ephemeral port in a {{bind}} operation."

[https://docs.oracle.com/javase/7/docs/api/java/net/InetSocketAddress.html]

>From NiFi's perspective, it only allows ports 1-65535. But NiFi properties are 
>looked at too late and are unable to catch invalid port numbers. Therefore, if 
>0 is not a valid port for NiFi, then it needs to be explicitly handled.

 

 

 

 

> Improve startup error messages in log
> -------------------------------------
>
>                 Key: NIFI-6336
>                 URL: https://issues.apache.org/jira/browse/NIFI-6336
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Configuration, Core Framework
>    Affects Versions: 1.9.2
>            Reporter: Andy LoPresto
>            Assignee: M Tien
>            Priority: Major
>              Labels: configuration, error, log, troubleshooting
>
> We frequently have users who encounter startup errors due to configuration 
> but can't understand the error messages to resolve the issues on their own. 
> Improving the specific error messages, and providing context around them, 
> would help users diagnose their own issues and supporters/community members 
> offer better, more targeted solutions-oriented advice rather than having to 
> ask investigatory questions and wait for synchronous conversations. 
> Example issue where one of the ports (not clear from error messages) isn't 
> specified in a cluster {{nifi.properties}} configuration file so the 
> application fails to start up (happened during 1.7.1 to 1.9.2 migration). 
> {code}
> Caused by: org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name 'flowService': FactoryBean threw exception on object 
> creation; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'flowController' defined in class path resource [nifi-context.xml]: 
> Cannot resolve reference to bean 'clusterCoordinator' while setting bean 
> property 'clusterCoordinator'; nested exception is 
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'clusterCoordinator': FactoryBean threw exception on object 
> creation; nested exception is java.lang.IllegalArgumentException: Port must 
> be inclusively in the range [1, 65535].  Port given: 0
> {code}
> At least including the {{nifi.properties}} property/key in this error would 
> make the issue and solution much clearer. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to