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
    ````


---

Reply via email to