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

ASF GitHub Bot commented on NIFI-5027:
--------------------------------------

Github user pvillard31 commented on the issue:

    https://github.com/apache/nifi/pull/2604
  
    Thanks @bbende. With your last changes:
    
    ````
    #> nifi pg-enable-services -pgid &2 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 2 - Misconfigured CS'
    Currently 0 enabled services and 1 disabled services, attempting to enable 
services...
    
    Finished with 0 enabled services and 1 disabled services
    
    The following services could not be enabled:
    
    Service: 016210d5-759f-1d4a-d095-69323147e9dd - 
StandardRestrictedSSLContextService
    
    Validation Errors:
    - 'StandardRestrictedSSLContextService : 
016210d5-759f-1d4a-d095-69323147e9dd' is invalid because Does not have the 
KeyStore or the TrustStore populated
    
    #>
    #> nifi pg-enable-services -pgid &5 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 5 - Not referenced CS'
    Currently 0 enabled services and 2 disabled services, attempting to enable 
services...
    Currently 1 services are enabling, waiting to finish before proceeding (1 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (2 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (3 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (4 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (5 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (6 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (7 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (8 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (9 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (10 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (11 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (12 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (13 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (14 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (15 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (16 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (17 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (18 
of 20)
    Currently 1 services are enabling, waiting to finish before proceeding (19 
of 20)
    
    One or more services appear to be stuck enabling:
    
    Service: 016210ec-759f-1d4a-3cf3-c507e978ffc5 - DistributedMapCacheServer
    
    Reasons:
    - DistributedMapCacheServer[id=016210ec-759f-1d4a-3cf3-c507e978ffc5] Failed 
to invoke @OnEnabled method due to java.net.BindException: Address already in 
use: Address already in use
    - DistributedMapCacheServer[id=016210ec-759f-1d4a-3cf3-c507e978ffc5] Failed 
to invoke @OnEnabled method due to java.net.BindException: Address already in 
use: Address already in use
    ````
    
    That's great!
    
    Regarding the fact it's only displayed when using the interactive mode: I 
think it would make sense to also print it when using the "scripted" way (maybe 
just the error message you added with your last commit). I'd imagine users 
writing scripts redirecting the standard output to log files or using tools 
like Jenkins/Travis that already give you access to the standard output. If the 
script fails it would be useful to see what happened. Also, but I think it has 
already been mentioned in the previous PR for the CLI, having an exit code not 
equal to 0 could be useful to fail fast.
    
    Test 2:
    ````
    $ ./cli.sh nifi pg-enable-services -pgid 
016210c2-759f-1d4a-c230-abfde87350cf -u http://localhost:8080
    $ echo $?
    0
    ````


> CLI - Add a command to start controller services
> ------------------------------------------------
>
>                 Key: NIFI-5027
>                 URL: https://issues.apache.org/jira/browse/NIFI-5027
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Tools and Build
>            Reporter: Pierre Villard
>            Assignee: Bryan Bende
>            Priority: Major
>         Attachments: TestStartStopCS.xml
>
>
> When importing a versioned process group from the registry, all the 
> components will be stopped (in case of update, only the newly added 
> components will be stopped). We already have a command pg-start to start a 
> process group, but it will fail if the process group relies on controller 
> services that should be enabled first.
> A new command like pg-enable-cs could be added, or just add a parameter/flag 
> to the pg-start command.
> Things to consider:
>  * there can be a dependency chain between the controller services requiring 
> to start the controller services in the right order. Example: the avro schema 
> registry CS and a reader/writer CS depending on the schema registry CS.
>  * there can be a CS defined at pg level that is not referenced by any 
> component inside the pg but that would need to be started nevertheless. 
> Example: the distributed map cache server CS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to