I have a basic service that starts a Jetty server and responds to requests. The repo is here: https://github.com/danellis/ignite-test
When I run Ignite with that configuration file, and both my service's JAR and the Scala library JAR in libs, everything seems to work as expected. However, if I start a second, identical node on another computer, it delays a few seconds during startup, then starts without my service running (but without any exceptions). If I restart the original node while another node is running, the same problem then occurs there too.
Here's the ignite -v output.
Single node:
https://gist.github.com/danellis/6678a28b38084598de84cd87ba7773af
Second node:
https://gist.github.com/danellis/63605ba511801d6867439472befe22db
What am I doing wrong?
You set <property name="totalCount" value="1"/>, it make service runs as cluster singleton. try remove it.
Related
In IBM Websphere Application Server (WAS) what are the purpose of com.ibm.wsspi.bootstrap.WSPreLauncher and com.ibm.ws.bootstrap.WSLauncher? Every morning we are restarting the Websphere Application Server. So on the stat of WAS it will always be called to load applications war file? Or there are certain action on which these two are used by WAS?
WSPreLauncher and WSLauncher are main entry points in the starting the OSGi framework and server processes. If you look at startServer script, you'll see it invokes the WSLauncher class with a number of additional arguments that are essential to proper server startup. To your question, when using the serverStart script, WSLauncher will be called and as a part of starting all the components of the server, applications, including war files, may be started depending on your specific configuration. You should not invoke either the WSPreLauncher or WSLauncher entry points yourself and instead should use the provided scripts like startServer, startNode, etc.
I'm running a spring boot executable jar as a service under Linux and it works fine.
My question is, there is a way to replace the running jar with new jar without stopping and rerunning the service?
Thanks,
Avi
In a nutshell, it is impossible to reload spring-boot jar in production environment.
I guess your final goal is to "hotswap" your application without user notified. Thanks to service discovery, you can do this by:
Start your new application and keep the old ones running.
After the new one started and registered in service discovery server, shutdown the old ones.
That's how we do upgrade of our services, and Docker saves us a lot of time.
I am testing remote services using pax exam.
To do this I need to start two containers. One local one that runs my test which calls the consumer and a second one that runs the service, Aries RSA and zookeeper.
I managed to start the external container by calling this in the #Configuration method. It does not seem that this belongs there but it was the only place I found where code is executed outside OSGi.
See https://github.com/apache/aries-rsa/blob/master/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/tcp/TestRoundTrip.java#L47-L51
Now I need a second hook that gets called when the test shuts down where I then can shut down the container. #After or #AfterClass does not seem to work as both run in OSGi.
I would also be happy about a cleaner way to start the external container as adding it in #Configuration does not feel right to me.
I found a solution now but I still hope there is something that works out of the box.
I created a new Pax runner TwoContainerPaxExam. It looks for a second config annotated with #ServerConfiguration, starts it before the test and shuts it down after.
So my test looks like this TestRoundTrip now. If there is nothing out of the box I will try to put this solution into pax exam.
I have a question for someone who is familiar with tomcat and coherence.
I am using tomcat 8 and coherence 12.2.1 now and here I have, maybe not a problem, but interesting case.
I am trying to start web application on tomcat as coherence node. I already know that there is ExtendTcpCacheService and now I am using it to make additional node which can communicate with coherence cluster.
But my question is: Is there a way to make tomcat start node which IS NOT Extend? I mean, I need tomcat to start coherence node but like grizzly rest server (automatically connecting to existing cluster), not like I have it now - it needs all IP addresses and configuration to connect to existing coherence node.
Thank you for any advice!
I am assuming that the other nodes in the cluster have the ExtendTcpCacheService enabled and you just want to disable only this service when running in tomcat. This is easy to do and you can continue to use one cache config file for all cluster nodes but you will need to make a slight change to your coherence cache configuration file. Go to the <proxy-scheme> section pertaining to your ExtendTcpCacheService service and change the <autostart> tag with a system-property attribute as shown below:
<proxy-scheme>
<scheme-name>some-name</scheme-name>
<service-name>ExtendTcpCacheService</service-name>
....
<autostart system-property="ExtendTcpCacheService.enabled">true</autostart>
</proxy-scheme>
In the JVM start-up parameters for Tomcat you will need to pass -DExtendTcpCacheService.enabled=false to turn off starting the service. In the other JVMs you will not need to do anything since this property is on by default.
You can use this feature to modify almost any xml tag in the coherence config using system parameters. More details on this feature is detailed in the coherence docs
I am able to import data from my MS sql to HDFS using JDBCHDFC Spring Batch jobs.But if that containers fails , the job does not shift to other container. How do I proceed to make the job fault tolerant.
I am using spring xd 1.0.1 release
You don't mention which version of Spring XD you're currently using so I can't verify the exact behavior. However, on a container failure with a batch job running in the current version, the job should be re-deployed to a new eligible container. That being said, it will not restart the job automatically. We are currently looking at options for how to allow a user to specify if they want it restarted (there are scenarios that fall into both camps so we need to allow a user to configure that).