[
https://issues.apache.org/jira/browse/MINIFICPP-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ferenc Gerlits updated MINIFICPP-2020:
--------------------------------------
Description:
On Windows,
* (x) if MiNiFi is already running as a service and you try to start another
instance from the console, then the second instance will exit with %errorlevel%
== -1, but without any message printed to either the console or the log file,
because GetTerminationEventHandle returns a null pointer;
* (/) if MiNiFi is not running as a service, you can start up two instances
with different MINIFI_HOMES from the console;
* (?) if you start up a MiNiFi instance from the console, then you start the
MiNiFi service, that works (assuming their MINIFI_HOMEs are different).
On Linux,
* (/) you can start up two instances as long as their MINIFI_HOMEs are
different.
On both,
* (?) if you try to start up two MiNiFi instances with the same MINIFI_HOME,
it will fail, as long as some repositories are RocksDB, because RocksDB can't
open the repo if another process has it open already.
In theory, the process semaphore should stop the last case before trying to
open the DBs, but it doesn't, because we open the semaphore in non-exclusive
mode. Opening the process semaphore in exclusive mode (with no other changes)
would be a bad solution, because in the case of a crash or a kill signal, the
stale semaphore would stop the user from starting a new MiNiFi instance and
would have to be removed manually.
was:
If you start the {{minifi}} executable on Windows as a non-Admin user, it exits
with code -1 immediately, without any error message.
-Also, document generation in {{MiNiFiMain.cpp}} should be moved outside of the
complicated restarting mechanism, as it doesn't need it.- (I have decided not
to do this, because to generate docs, we need to load the extensions, which
requires loading {{{}minifi.properties{}}}. We could duplicate this before the
main retry loop, but there is no real reason to do so.)
> Fix the code which is supposed to stop two MiNiFi instances from interfering
> with each other
> --------------------------------------------------------------------------------------------
>
> Key: MINIFICPP-2020
> URL: https://issues.apache.org/jira/browse/MINIFICPP-2020
> Project: Apache NiFi MiNiFi C++
> Issue Type: Bug
> Reporter: Ferenc Gerlits
> Assignee: Ferenc Gerlits
> Priority: Minor
> Fix For: 0.14.0
>
>
> On Windows,
> * (x) if MiNiFi is already running as a service and you try to start another
> instance from the console, then the second instance will exit with
> %errorlevel% == -1, but without any message printed to either the console or
> the log file, because GetTerminationEventHandle returns a null pointer;
> * (/) if MiNiFi is not running as a service, you can start up two instances
> with different MINIFI_HOMES from the console;
> * (?) if you start up a MiNiFi instance from the console, then you start the
> MiNiFi service, that works (assuming their MINIFI_HOMEs are different).
> On Linux,
> * (/) you can start up two instances as long as their MINIFI_HOMEs are
> different.
> On both,
> * (?) if you try to start up two MiNiFi instances with the same MINIFI_HOME,
> it will fail, as long as some repositories are RocksDB, because RocksDB can't
> open the repo if another process has it open already.
>
> In theory, the process semaphore should stop the last case before trying to
> open the DBs, but it doesn't, because we open the semaphore in non-exclusive
> mode. Opening the process semaphore in exclusive mode (with no other
> changes) would be a bad solution, because in the case of a crash or a kill
> signal, the stale semaphore would stop the user from starting a new MiNiFi
> instance and would have to be removed manually.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)