IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Lockfile

    Posted Mon November 22, 2010 06:37 AM

    Hai all,

    I have a small doubt …Will the lock file remains if we restart the system when our IS instance is running…??? If it remains why it is going to remain like that that is if we restart the system the IS is shutting down and no instance is running…

    I came across this,that is i have seen the lockfile after i have restarted the system.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-Archive


  • 2.  RE: Lockfile

    Posted Mon November 22, 2010 11:57 AM

    Hi,
    Lockfile is generated, when you suddenly terminate the IS, means when you do not let it start completely.
    Even if you restart the system, it will be there, until you delete it.
    Try to do this again, it will show you a clear picture.


    #webMethods-Archive
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Lockfile

    Posted Mon November 22, 2010 08:22 PM

    Rajesh,

    When you start the IS, the server.bat file is executed. If you open this file and scan through the lines of code, you will see an if else logic, where it checks to see if a LOCKFILE already exists.

    So when you are restarting, During the shutdown the lockfile is deleted and then recreated while coming back up (check the timestamp of the lockfile, it gets updated).

    if exist LOCKFILE (
    echo Only one Integration Server instance may be run from a particular
    echo installation at a time. Make sure that this server is shutdown
    echo before trying to start it. If no server is running, then
    echo delete the file
    echo %IS_DIR%\LOCKFILE
    echo and try to start the server again.
    goto :EOF
    )
    echo. > LOCKFILE

    This piece of code inside the server.bat will check if there is already an existing instance of IS is running or not. If you comment this code out then, you can start multiple instances of the IS with no lock file issues. Hope this answers your question.

    Cheers,
    Akshith


    #Integration-Server-and-ESB
    #webMethods-Archive
    #webMethods


  • 4.  RE: Lockfile

    Posted Tue November 23, 2010 04:16 AM

    Hai Thanks for your replay akki and i came to know a new thing from your post, but my question is that

                 Why the lock file is existing if i restart my box without shuting down the IS and if do like this the windows will automatiacally shuts down or kill the instance of IS so then the lockfile has to be deleted by that action of windows,but when i do the same the lockfile is still existing in my IS,so that i cant start a new instance of IS,i have delete the file and again i have to start it.... I think now you got a clear picture on my question 
    

    any suggestions please…???


    #webMethods-Archive
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Lockfile

    Posted Tue November 23, 2010 09:37 AM

    As Akshith pointed out the LOCKFILE if created and removed by the servers startup script. If the server is shut down without stopping SI properly, the script is just killed. Windows does not know anything about the internals of the script, so it does not remove the LOCKFILE. Whenever a box is shutdown, IS (and all other server running as well) should be shut down properly (Maybe it is if it is a service, but I didn’t test this).

    The intention of the LOCKFILE is to prevent running two instances of the same IS, and this you should not do. Beside the conflict about the port there will be conflicts in the storage. If you need more than on IS on a box, make an independent installation.


    #Integration-Server-and-ESB
    #webMethods-Archive
    #webMethods


  • 6.  RE: Lockfile

    Posted Tue November 23, 2010 11:35 AM

    [QUOTE=mwroblinski;76433]
    Whenever a box is shutdown, IS (and all other server running as well) should be shut down properly (Maybe it is if it is a service, but I didn’t test this).

    Yes, If IS runs as windows service Windows takes care to properly shutdown all the instances of programs running in the machine while shutting down the windows. However this does not apply for the batch programs - windows will try to kill/shutdown the running process but windows does not know the pending tasks in batch script.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-Archive


  • 7.  RE: Lockfile

    Posted Mon March 14, 2011 06:48 AM

    If you are shutting down the box without shutting your IS down…then windows will allocate a min amount of time for all process to shut down…if they are not then windows will terminate every process…the default amount time provided by the windows for every process is 20 seconds…this can be seen in windows registery WaitToKillService parameter…


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-Archive


  • 8.  RE: Lockfile

    Posted Tue March 29, 2011 02:36 PM

    When you shutdown the box, It will kill/terminate all the processes running. But LockFile is not a process running. Its just a file to avoid running of multiple instances of IS at same time.


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-Archive