My sysAdmin tells me he cannot cluster my java application

Hi
I have a small java application which reads files from a (ftp) directory, validates them and writes them to disk again. This application is being called from a CRON scripts on both servers which runs it every minute. Our hosting company says that on the application needs to be run on both clusterservers at the same time. This causes synch problems when reading the file. 2 applications try to access the same file at the same time.
How can he make the second server start up the application when the first goes down?
Our hostingcompany says that my application is not cluster-aware and that it's impossible to configure the server to start/stop my application.
Can somebody please help me with this?
thanks

there are two ways to approach this (in sun cluster 3.x)
that come to mind.
the first is a quick hack that requires you to use a wrapper
script for your cron job (ie, run this script with cron, and
use this script to start your java prog).
here's the gist of it:
----------------------------->8---------------------------------------------------
#!/bin/sh
# wrapper script for cron jobs on 2-node cluster
# >2 node cluster requires more work
# exit if cluster not active on this node
thisState=`scha_cluster_get -O NODESTATE_LOCAL`
if [ "$thisState" != "UP" ] ; then
exit 0
fi
# find out the node ID of this system
thisNode=`scha_cluster_get -O NODEID_LOCAL`
# if this is not node 1, check to see if node 1 is active
if [ "$thisNode" != 1 ] ; then
node1Name=`scha_cluster_get -O NODENAME_NODEID 1`
node1State=`scha_cluster_get -O NODESTATE_NODE $node1Name`
# if node 1 is active, it will run the program, so
# we can quit
if [ "$node1State" = "UP" ] ; then
exit 0
fi
fi
# at this point, we know this node is active, and is
# either node 1, or is the remaining active node
# in either case, run the program
exec /path/to/my/prog
----------------------------->8---------------------------------------------------
you could even make this a generic wrapper by doing
"exec $@" at the end & supplying the normal program
path & args as arguments to the wrapper script...
the 2nd solution is to essentially write your own "cron":
in other words, a long-running process that simply sleeps
in between trying to run your program (or rewrite your
program to run forever & check the ftp dir occassionally).
then you can use the standard tools to make the program
highly available (scdsbuilder, etc)
hth
p

Similar Messages

  • Cannot launch my java application

    Hi All. I have made a Java application using NetBeans.
    The application, with NetBeans works fine. It imports many jasperreports classes included in my project by setting in the project properties the Compiling source to the various jar archives:
    jasperreports.jar
    common-digester-1.7.jar
    common-collections-2.1.jar
    common-logging-1.0.2.jar
    common-beanutils-1.5.jar
    When I launch with NB it works as I designed it.
    And now comes the problem.
    With NB I build the project and it builds my PrintReport.jar.
    As I try to launch it with
    - java -jar PrintReport.jar
    it prompts this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource at printreport.PrintReport.main(PrintReport.java:45)
    that line is exactly where I create the instance of the class containing all JasperReports refs.
    Can anyone help me launch it correctly from command line?
    Thanks, Angyel

    I tried same thing but it is not working for me. It is not refering the Classpath which I specified in Mainfest file.
    Manifest-Version: 1.0
    Class-Path: jaxrpc.jar activation.jar axis.jar commons-logging-api.jar discovery.jar mail.jar saaj.jar soap.jar wsdl.jar
    Main-Class: Uploader
    Ant-Version: Apache Ant 1.6.2
    Created-By: 1.5.0_05 (Sun Microsystems Inc.)I have Upload.jar
    First Time - I have added only class files and then tried
    Second Time - I have added class files and jar files then
    still i am getting this error..
    java -jar Upload.jar
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: j
    avax/xml/rpc/Service
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    4)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

  • Cannot launch an java application

    Hi there,
    I'm trying to run a java program after updating to Yosemite. I already downloaded and installed the latest JRE 8 update 25. Trying to run the application results in the following console error (nothing happens on the screen):
    20/10/14 21:32:56,584 com.apple.xpc.launchd[1]: (jclient.LoginFrame.63932[1450]) Service exited with abnormal code: 127
    Can someone please help!

    Hmm, only way I know would be a relatively painless Archive & Install, which gives you a new/old OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space and no Disk corruption, and is relatively quick & painless...
    http://docs.info.apple.com/article.html?artnum=107120
    Just be sure to select Preserve Users & Settings.

  • Cannot run any java Programs

    I cannot get any java applications to run whenever I try I get
    Exception in thread "main" java.lang.NoClassDefFoundError: jedit40install/jar
    for any application that I try to run. I was able to compile a application but not run it. I tried launching it via java -classpath . jeditinstall.jar and i recieved the error again. I am running RedHat 7.3 on a 686 with 512mb ram. Below are my enviroment variables that I have set.
    export JAVA_HOME=/usr/java/j2sdk1.4.0
    export PATH=$PATH:$JAVA_HOME/bin
    export CLASSPATH=.
    Any help would be appreciated.

    I'm not exactly sure of the root to your problem but maybe you can try setting the classpath to contain the JAR file that you are running?
    Also...I think you should be launching a JAR file by:
    java -classpath -jar jeditinstall.jar
    Hope this helps :)

  • HT201493 Why when I try to sign in to Find my Friends does it tell me I cannot as my iPhone is not supported with free iCloud service? I do not use find my friends on another device.

    Why when I try to sign in to Find my Friends does it tell me I cannot as my iPhone is not supported with free iCloud service? I do not use find my friends on another device.

    So, have you created an iCloud account and is your device connected to iCloud?

  • I have 5 computers authorized on my account and I would like to deauthorize all of them. When I try it tells me I cannot do so until January 2016. Is there a way around this? I no longer have access to the computers that are authorized.

    I have 5 computers authorized on my account and I would like to deauthorize all of them. When I try it tells me I cannot do so until January 2016. Is there a way around this? I no longer have access to the computers that are authorized.

    Did you recently deauthorize a bunch of computers?  You can only deauthorize all once  year.
    iTunes Store: Authorize or deauthorize your Mac or PC - http://support.apple.com/kb/HT1420 - and another helpful post: https://discussions.apple.com/message/17828050
    You will have to contact Apple and request they remove the lock on a reset.  iTunes Customer Service Contact - http://www.apple.com/support/itunes/contact.html > Get iTunes support via Express Lane > iTunes > iTunes Store

  • HT5444 I would like to use a copy of Mountain Lion for development, but the store tells me I cannot download it because my MacBook 4,1 is not compatible! What can I do to download it?

    I would like to use a copy of Mountain Lion for development, but the store tells me I cannot download it because my MacBook 4,1 is not compatible! What can I do to download it?
    I have paid for it and all...

    You can't do anything. See:
    OS X Mountain Lion - System Requirements
           Macs that can be upgraded to OS X Mountain Lion
             1. iMac (Mid 2007 or newer) - Model Identifier 7,1 or later
             2. MacBook (Late 2008 Aluminum, or Early 2009 or newer) - Model Identifier 5,1 or later
             3. MacBook Pro (Mid/Late 2007 or newer) - Model Identifier 3,1 or later
             4. MacBook Air (Late 2008 or newer) - Model Identifier 2,1 or later
             5. Mac mini (Early 2009 or newer) - Model Identifier 3,1 or later
             6. Mac Pro (Early 2008 or newer) - Model Identifier 3,1 or later
             7. Xserve (Early 2009) - Model Identifier 3,1 or later
    Your computer does not meet the requirements to run Mountain Lion.
    Upgrading to Lion
    If your computer does not meet the requirements to install Mavericks, it may still meet the requirements to install Lion.
    You can purchase Lion at the Online Apple Store. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
         Lion System Requirements
           1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
               or Xeon processor
           2. 2GB of memory
           3. OS X v10.6.6 or later (v10.6.8 recommended)
           4. 7GB of available space
           5. Some features require an Apple ID; terms apply.

  • HT1386 I have a new computer. I have copied Itunes library from an external hard drive. Itunes now tells me I cannot sync with my Ipod as it thinks the 20gb on the computer are different to the 20gb on my Ipod touch! What have I done wrong? How can I fix

    I have a new computer. I have copied Itunes library from an external hard drive. Itunes now tells me I cannot sync with my Ipod as it thinks the 20gb on the computer are different to the 20gb on my Ipod touch! What have I done wrong? How can I fix it?  Alan

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    Sync Your iOS Device with a New Computer Without Losing Data - How-To Geek

  • I need help with imac g4 flat panel download of leopard it tells me it cannot load on the system.

    i bought a refurbished imac g4 flat panel. it is supposed to have an os but it only comes up with a question mark. I put leopard in and it tells me it cannot load on this compuert. system is 800mhz and 60g hd and 768ram.   i have tried to do a fix through the utility and it says it does not exit and kicks me out.  ANY HELP IS A PLUS.

    Try holding down the option key then power on. This brings up the startup manager. Click on your hd. Click on right arrow key.
    Sometimes if volumes don't appear in Startup Manager (what you get when you hold down the Option key at startup), you need to reset the Mac's PRAM, NVRAM, and Open Firmware. Shut down the Mac, then power it up, and before the screen lights up, quickly hold down the Command, Option, P, and R keys, until the Mac has chimed twice more after the powerup chime. Then, before the screen lights up, hold down Command-Option-O-F until the Open Firmware screen appears. Then enter these lines, pressing Return after each one:
    reset-nvram
    set-defaults
    reset-all
    "The reset-all command should restart your Mac. If so, you have successfully reset the Open Firmware settings."
    http://support.apple.com/kb/TS1812?viewlocale=en_US
    You have got get in open firmware to hack the mhz to be higher for the install.  That is change what the machine reports as the mhz to be a higher number.  Details:
    http://lowendmac.com/osx/leopard/openfirmware.html
    http://lowendmac.com/osx/leopard/unsupported.html
    This works on Tiger but I assume it would work on Leoard.
    Macintosh-HD -> Applications -> Utilities -> Terminal
    From: san francisco,ca
    Registered: Apr 27, 2007
    Re: Do the widgets drain system resources and power?
    Posted: Apr 28, 2007 2:51 PM
    I tend to think dashboard is neat, but not neccesary for my everyday workflow.
    it is possible to enable and disable it as needed,
    by entering the following commands into the terminal:
    -- To turn Dashboard off:
    defaults write com.apple.dashboard mcx-disabled -boolean YES
    -- To turn Dashboard on:
    defaults write com.apple.dashboard mcx-disabled -boolean NO
    -- You have to restart the Dock after making either change for it to take effect:
    killall Dock
    Bye Bye Dashbaord
    http://www.kainjow.com/kermitsoft/downloads.html
    Disable Spotlight, Bonjour and Dashboard:
    http://discussions.apple.com/message.jspa?messageID=8749558#8749558
    Robert

  • After hard drive crash I needed to authorise my pc again. itunes tells me iphone cannot sync as pc not authorised. when I try to authorise the pc, itunes tells me pc is already authorised... what can i do?

    After a recent hard drive crash I needed to authorise my pc again. I first de-authorised all previous computers (there was no other option)
    Then I authorised the pc with the new hard drive.
    then I tried to sync
    Then itunes tells me iphone cannot sync as pc not authorised.
    when I try to authorise the pc, itunes tells me pc is already authorised...
    I have been playing this game 10 times now ... "cannot sync because pc not authorised" and then "cannot authorise as already authorised"
    what can i do?
    thanks

    yes, a few times. the number of authorised computers decreases and increases from zero to one and vice versa accordingly. yet I am still being told that it cannot sync.

  • I installed new software updates, and now when I try to open up pages it tells me "Pages cannot be opened because of a problem." does anyone know what I can do?

    I installed new software updates, and now when I try to open up pages it tells me "Pages cannot be opened because of a problem." does anyone know what I can do?

    1)Copy this below from --{code} to --{code}
    --{code}
    set p2l to "" & (path to library folder from user domain)
    set the_cache to p2l & "Caches:com.apple.iWork.fonts"
    tell application "System Events"
              set maybe to exists disk item the_cache
              if maybe then delete disk item the_cache
    end tell
    if maybe then
              display dialog "I deleted the file :" & return & the_cache
    else
              display dialog "The file :" & return & the_cache & return & "was unavailable !"
    end if
    --{code}
    2) Than open Applescript Editor in your applications and paste it
    3) Than select "Compile"
    4) Than select "Run"

  • HT201364 I have a MacBook 13 inch (Late 2008) with OS X 10.6.8 installed and every time I try to install Yosemite it tells me it cannot be updated on my MacBook. Why?

    I have a MacBook 13 inch (Late 2008) with OS X 10.6.8 installed and every time I try to install Yosemite it tells me it cannot be updated on my MacBook. Why?

    Because the minimum requirement, as stated it the Yosemite specs, is for a Late 2008 Aluminum MacBook.
    MacBook – Late 2008 Aluminum, or Early 2009
    MacBook Air – Late 2008
    MacBook Pro – Mid/late 2007
    Mac mini – Early 2009
    iMac – Mid 2007
    Mac Pro – Early 2008
    Xserve – Early 2009

  • I have an iPad that will not allow me to accept iCloud terms and conditions. It just says server not available. But on an annoyingly regular basis a pop up asks me to accept term and cond, I go to iCloud and try to but that is when it tells me it cannot c

    I have an iPad that will not allow me to accept iCloud terms and conditions. It just says server not available. But on an annoyingly regular basis a pop up asks me to accept term and cond, I go to iCloud and try to but that is when it tells me it cannot connect to the server. Frustrating as I cannot get rid of the pop ups.

    Thanks champion! Apple support is useless! Way too difficult to get anywhere with their "support"

  • My ichat will let me send video chats requests, but it will not let me accept them. What should i do? Also, sometimes it tells me i cannot add a 2nd or 3rd person to an existing chat because it is connected to AOL's relay servers. What does this mean?

    my ichat will let me send video chats requests, but it will not let me accept them. What should i do? Also, sometimes it tells me i cannot add a 2nd or 3rd person to an existing chat because it is connected to AOL's relay servers. What does this mean?

    Unfortunately, most of my advice is in the "hindsight is 20-20" category.
    First off, I would never have purchased the peripheral accessories until the 14 day return period had expired. Second, you learned the hard way what the "14 days" really means.
    Too bad you didn't do any homework, reading this and other forums and tech sites. Even word of mouth from others. That, more than anything could have steered you towards different phone choices from the get-go and I will leave that there with no further comment other than to say most of the issues you described have been discussed in this forum, ad nauseam.
    Once you got into the refurbished phone exchanges, that is where things really went haywire. What someone tells you over the phone is a sketchy proposition, and when it comes down to it, it's your word against theirs.
    I think Verizon tried to make it right, though. Remember, they don't make the phones. Don't throw the baby out with the bathwater.
    You stated yourself you were a satisfied Verizon customer before this. Had the first two phones performed as they should, you would still be a satisfied Verizon customer.
    Doubt any of that will make you any happier, but after you went through the effort of writing such a long post, I thought I'd try.

  • When I try to delete old 4s backup from iCloud (I have a 5s) it tells me it cannot be deleted because in use. How to I fix that to delete it?

    when I try to delete old 4s backup from iCloud (I have a 5s) it tells me it cannot be deleted because in use. How to I fix that to delete it?

    That should clear up on it's own when it times out in 3-5 days.  Wait a few days, then try deleting it again.

Maybe you are looking for

  • Free goods problem

    Hi, I require free goods in quotation.  For example If i enter 10 qty in quotation. The billing should be done only for 9 qty (10-1) for inclusive case. and for exclusive case an addition line item should be generated with 1 quantity 1 is free good q

  • Rpm package error while installing oracle 10g

    Hi , I tried to run the following package in RHEL 5 , as a preliminary step to install oracle 10g, the third file from disk 1 in server folder , I am getting this error.... all the other packages I was able to install [amjadali@rhel5 Server]$ rpm -Uv

  • RFC ERROR       timeout during allocate

    Hi all, We are trying to connect our ECC 6.0 system to ECC 5.0 system thru RFC we get the following error. Both the systems are available running Timeout during connection setup. Please check partner availability [abrfcio.c    8139] A  *** ERROR => R

  • Error connecting to HDD on my router

    I am running Mountain Lion on MacBook Air. I have a HDD connected to my router (A Technicolor VDSL Wifi Modem). I can Connect to the HDD from both my PCs, however the Mac cannot. I have read a lot about this and am very confused. I get the following

  • Primary key?

    Good day. I'm still very new to Oracle and all that is related to it, so please bear with me. Here's the scenario: There are two tables, 'abc_logn' and 'abc _user'. 'abc_logn' has three columns, 'abc_idno', 'abc_unam' and 'abc_pass' - user number, us