If you are receiving the message
"Flux engine has been disposed" when trying to start a flux engine, you may be running into a problem with the RMI port Flux is configured to run on. By default, Flux runs on RMI port 1099. You may see the "Flux engine has been disposed" error if another application is using that port, if you already have another Flux engine started on that port, or if something did not cleanly shut down on that port.
To see a list of what is occupying each port, you can either run "netstat -a" on a *nix (Unix, Linux, etc.) environment, or install and run
Active Ports on a Windows environment. Both of these utilities give you a view of what is running on your machine.
If something is running on the port that Flux wants to run on, Flux will not be able to start up. To get Flux to start up, you may want to change the port that Flux is running on.
There are two ways to change the port that Flux runs on.
The first method is to update your engine's configuration file. The second method is to set an option on the Configuration object in code.
To update your configuration file, you may want to update your .fec (flux engine configuration) file by adding the following line. This line changes the RMI port that your Flux engine runs on.
registry_port=thePortYouWantFluxToUse (e.g. registry_port=1234)
To update your Configuration object in code, you may want to add the following configuration option:
configuration.setRegistryPort(thePortYouWantFluxToUse); (e.g. configuration.setRegistryPort(1234);)
Where 1234 is a port that you think is clear and has nothing else running on it.
Once you have updated the RMI port that you would like Flux to run on, try restarting the engine with the new configuration. If there are no other port conflicts, your engine should start up.