|
From: John M. <joh...@jb...> - 2005-01-24 17:41:07
|
OK, so I have more information on this and know the problem - it is a bug that I will write up. When I press the "start" button on MSWindows's Services GUI, the JBoss instance starts up fine. Its only when I issue a wrapper.exe -t will the anchor file come and go quickly. Looking at the code, wrapper_win.c lines 2745-2751, I see the anchor file gets created when -c is used. Lines 2777-2785 create the anchor file with -s (this is why pressing the start button in the Windows Services GUI works). However, look at the -t - there is no code to write that anchor file. This is probably intentional - since I think when you start the wrapper, it ends up starting up with "-s" (in other words, the wrapper process that starts with -t is a short-lived process - just issues the start command and exits - it isn't the "true" wrapper so it should not create the anchor). However, -t still goes through the same exit routine - which means appExit() is called (last line in main()). In appExit(), there is the unlink to remove the anchor file. Since -s and -c never return, that appExit() isn't called until the appropriate time. However, -t exits immediately and thus deletes the anchor file (the anchor file is created when the service is started (with the -s)). It's a race condition - the -s wrapper service starts, creates the anchor then the -t process, seeing that the service started, exits. But it then immediately deletes the anchor file. I'll write this up as a bug. Somehow, there needs to be a global flag to say, "wrapper.exe is exiting, but don't delete the anchor or pid files". And appExit() needs to only delete the files if that flag tells it to. Work around is probably to pass in on the command line to wrapper.exe a bogus setting for anchorfile (one different than the real anchorfile setting in .conf). The -t process should try to delete that bogus file (and fail) leaving the real anchor file alone. > -----Original Message----- > From: John Mazzitelli=20 > Sent: Monday, January 24, 2005 10:13 AM > To: 'wra...@li...' > Subject: Anchor file mysteriously getting deleted immediately=20 > upon startup >=20 > [sorry for dup - originally sent this to Help forum; just now=20 > found out that is old and that I should be sending to this=20 > mailing list] >=20 > I am seeing some weird behavior dealing with the anchorfile.=20 > I have my anchorfile set. And under certain conditions, I=20 > have seen it work. For example, if I start in -c console=20 > mode, it works (anchorfile is created and the JVM will die=20 > when I specifically delete it).=20 > =20 > I can see this work when I install the wrapper as an NT=20 > service BUT ONLY if i start the service using the Windows GUI=20 > utility (the Services GUI from Administration tools). If,=20 > however, I start the Windows service via the -t wrapper=20 > option, the JVM starts up fine, but immediately the=20 > anchorfile gets deleted and the wrapper immediately shuts the=20 > JVM down. It is very weird- I have no idea why or who is=20 > deleting that anchor file - but as soon as it gets created=20 > (no more than a second or two delay) that anchor file gets deleted.=20 > =20 > And this only happens if i start the service using the -t.=20 > Again, if I start the service using the Winows Services GUI,=20 > it all works fine.=20 > =20 > See below for my debug log - note the time stamps and see=20 > that the anchorfile gets deleted rather quickly after startup.=20 > =20 > Has anyone seen this behavior, or more importantly, how to fix it?=20 > =20 > ----=20 > INFO | jvm 1 | 2005/01/22 00:53:38 | 00:53:38,567 INFO=20 > [NamingService] Started jnpPort=3D1099, rmiPort=3D1098,=20 > backlog=3D50, bindAddress=3D/0.0.0.0, Client SocketFactory=3Dnull,=20 > Server=20 > SocketFactory=3Dorg.jboss.net.sockets.DefaultSocketFactory@ad093076=20 > STATUS | wrapper | 2005/01/22 00:53:38 | JBoss [abc-dpl] started.=20 > INFO | jvm 1 | 2005/01/22 00:53:40 | 00:53:40,120 INFO=20 > [Server] JBoss (MX MicroKernel) [4.0.0 (build:=20 > CVSTag=3DJBoss_4_0_0 date=3D200412201046)] Started in 2s:604ms=20 > STATUS | wrapper | 2005/01/22 00:53:41 | Anchor file deleted.=20 > Shutting down.=20 > DEBUG | wrapper | 2005/01/22 00:53:41 | wrapperStopProcess(0) called.=20 > DEBUG | wrapper | 2005/01/22 00:53:41 | Sending stop signal to JVM >=20 > FWIW: I set wrapper.anchor.poll_interval to something higher=20 > (15 seconds) and it still behaves as I describe in my first=20 > post. If I start with -t, the JVM stays up for 15 seconds,=20 > but the anchor file is gone almost immediately. So, after the=20 > 15 seconds are up, since the file is gone, the JVM is=20 > shutdown. It looks like as soon as the wrapper spits out the=20 > log "wrapper | <my service name> started.", that's when the=20 > anchor file gets deleted.=20 > =20 > Don't know if any of this helps. I looked at the C code but=20 > nothing jumped out at me as to a possible problem. Should I=20 > write this up as a bug or am I missing something obvious? >=20 |
|
From: Bashiro <ba...@en...> - 2005-01-27 10:57:27
|
Ok I know this may sound dum to others but I have searched without answers. What I wonder is ; when installing/deploying the wraper on solaris or Mac there are no binary files in the download. Should one just dump the file of the above mensioned platforms into the binaries of Linux and use it ? what about the lib directory , will this work with the .so file of linux or it does not matter ? Thanks in advance bashiro |
|
From: Bashiro <ba...@en...> - 2005-01-31 21:33:43
|
CAN'T ANYONE ANSWER THIS SUBJECT ? NOT EVEN THE DEVELOPERS ? THEN WHY THISA MAIL LIS ? Ok I know this may sound dum to others but I have searched without answers. What I wonder is ; when installing/deploying the wraper on solaris or Mac there are no binary files in the download. Should one just dump the file of the above mensioned platforms into the binaries of Linux and use it ? what about the lib directory , will this work with the .so file of linux or it does not matter ? Thanks in advance bashiro |
|
From: Leif M. <le...@ta...> - 2005-02-01 16:33:30
|
Bashiro,
Sorry for the slow response, unfortunately as much as I would love
to be able answer
every question promptly, it is not always possible to place the same
level of priority on
free support for a free product as is given to other bill paying demands
on my time.
Anyway. The Wrapper is a native application and thus requires
separate downloads
for each platform that you wish to run on. The wrapper.jar file is
100% java and thus
cross platform. Each individual distribution file contains all of the
files that you need
for a given platform.
In the case of Windows, you download wrapper_win32_3.1.2.zip and then need:
bin/wrapper.exe, lib/wrapper.dll, lib/wrapper.jar, along with conf
and bat files.
For Solaris, you download wrapper_solaris_3.1.2.tar.gz and then need:
bin/wrapper, lib/libwrapper.so, and lib/wrapper.jar, along with conf
and sh files.
Same for MAC OSX, you download wrapper_macosx_3.1.2.tar.gz
bin/wrapper, lib/libwrapper.jnilib, and lib/wrapper.jar, along with
conf and sh files.
You can not use the native files for one platform on any other platform.
The slight size differences between the jars in the platform
specific releases are due
to differences in the JVM they were build with. I am hoping to get that
resolved in the
build process for the next release.
Let me know if I misunderstood your question.
Cheers,
Leif
Bashiro wrote:
>CAN'T ANYONE ANSWER THIS SUBJECT ?
>NOT EVEN THE DEVELOPERS ? THEN WHY THISA MAIL LIS ?
>
>Ok I know this may sound dum to others but I have
>searched without answers.
>What I wonder is ;
>when installing/deploying the wraper on solaris or Mac there are no binary
>files in the download. Should one just dump the file of the above
>mensioned platforms into the binaries of Linux and use it ? what about the
>lib directory , will this work with the .so file of linux or it does not
>matter ?
>
>Thanks in advance
>bashiro
>
|
|
From: Geoffrey M. <ga...@im...> - 2005-01-31 21:54:50
|
Leif (the developer) is generally very responsive to questions. I suspect that maybe he is on vacation, or otherwise unavailable. There are binary downloads available for Solaris (Sparc) and Mac OSX. I did not check the Solaris download, but did verify that the Mac download definitely does include the binaries (in the bin and lib directories) required to run the wrapper. If you downloaded the source distribution, you will need to build the binaries as per the provided instructions, or go back and download the appropriate binary distribution. Bashiro wrote: >CAN'T ANYONE ANSWER THIS SUBJECT ? >NOT EVEN THE DEVELOPERS ? THEN WHY THISA MAIL LIS ? > >Ok I know this may sound dum to others but I have >searched without answers. >What I wonder is ; >when installing/deploying the wraper on solaris or Mac there are no binary >files in the download. Should one just dump the file of the above >mensioned platforms into the binaries of Linux and use it ? what about the >lib directory , will this work with the .so file of linux or it does not >matter ? > >Thanks in advance >bashiro > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >Tool for open source databases. Create drag-&-drop reports. Save time >by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >Download a FREE copy at http://www.intelliview.com/go/osdn_nl >_______________________________________________ >Wrapper-user mailing list >Wra...@li... >https://lists.sourceforge.net/lists/listinfo/wrapper-user >--- >[This E-mail scanned for viruses by Declude Virus] > > > > > --- [This E-mail scanned for viruses by Declude Virus] |
|
From: Bashiro <ba...@en...> - 2005-02-01 08:09:11
|
Thanks a lot for the reply. I really appreciate your concern and the wishes for this project to go on as the developers wanted. Some few days ago I downloaded (many times) the binary files for both mac and solaris; the binaries contains only one file for each of the platforms respectively. And no binary files nor lib files. My point is the files have now been corrected. I checked it today and found that it looks fine again. Thanks a lot for the pin point. bashiro > Leif (the developer) is generally very responsive to questions. I > suspect that maybe he is on vacation, or otherwise unavailable. > > There are binary downloads available for Solaris (Sparc) and Mac OSX. I > did not check the Solaris download, but did verify that the Mac download > definitely does include the binaries (in the bin and lib directories) > required to run the wrapper. > > If you downloaded the source distribution, you will need to build the > binaries as per the provided instructions, or go back and download the > appropriate binary distribution. > > Bashiro wrote: > >>CAN'T ANYONE ANSWER THIS SUBJECT ? >>NOT EVEN THE DEVELOPERS ? THEN WHY THISA MAIL LIS ? >> >>Ok I know this may sound dum to others but I have >>searched without answers. >>What I wonder is ; >>when installing/deploying the wraper on solaris or Mac there are no >> binary >>files in the download. Should one just dump the file of the above >>mensioned platforms into the binaries of Linux and use it ? what about >> the >>lib directory , will this work with the .so file of linux or it does not >>matter ? >> >>Thanks in advance >>bashiro >> >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>Tool for open source databases. Create drag-&-drop reports. Save time >>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>_______________________________________________ >>Wrapper-user mailing list >>Wra...@li... >>https://lists.sourceforge.net/lists/listinfo/wrapper-user >>--- >>[This E-mail scanned for viruses by Declude Virus] >> >> >> >> >> > --- > [This E-mail scanned for viruses by Declude Virus] > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Leif M. <le...@ta...> - 2005-02-01 15:58:34
|
John,
Sorry for the slow response, the bill paying demands on my time have
been a bit
overwhelming lately... :-/
Great grasp of the code, that is indeed the problem. A great
example of what
open source is meant to be. :-)
Anyway, I will write it up in your bug as well, but the this is
actually a problem with
the wrapper.pidfile as well as the wrapper.anchorfile. Both will be
deleted on shutdown
if the Wrapper is launched with the -t, -p, -r, or -i commands. None of
which should be
doing so. This was introduced in a recent version when I cleaned up
and centralized
the shutdown code. Oops. I don't usually use the anchor file on
Windows so I had
not noticed this problem.
Anyway, I have put the fix into CVS. As you mentioned, a
workaround is to
specify a dummy anchorfile when using any of the above commands:
Wrapper.exe -t ../conf/wrapper.conf wrapper.anchorfile=dummy
wrapper.pidfile=dummy
Cheers,
Leif
John Mazzitelli wrote:
>OK, so I have more information on this and know the problem - it is a
>bug that I will write up.
>
>When I press the "start" button on MSWindows's Services GUI, the JBoss
>instance starts up fine.
>
>Its only when I issue a wrapper.exe -t will the anchor file come and go
>quickly.
>
>Looking at the code, wrapper_win.c lines 2745-2751, I see the anchor
>file gets created when -c is used. Lines 2777-2785 create the anchor
>file with -s (this is why pressing the start button in the Windows
>Services GUI works).
>
>However, look at the -t - there is no code to write that anchor file.
>This is probably intentional - since I think when you start the wrapper,
>it ends up starting up with "-s" (in other words, the wrapper process
>that starts with -t is a short-lived process - just issues the start
>command and exits - it isn't the "true" wrapper so it should not create
>the anchor).
>
>However, -t still goes through the same exit routine - which means
>appExit() is called (last line in main()). In appExit(), there is the
>unlink to remove the anchor file.
>
>Since -s and -c never return, that appExit() isn't called until the
>appropriate time. However, -t exits immediately and thus deletes the
>anchor file (the anchor file is created when the service is started
>(with the -s)).
>
>It's a race condition - the -s wrapper service starts, creates the
>anchor then the -t process, seeing that the service started, exits. But
>it then immediately deletes the anchor file.
>
>I'll write this up as a bug. Somehow, there needs to be a global flag
>to say, "wrapper.exe is exiting, but don't delete the anchor or pid
>files". And appExit() needs to only delete the files if that flag tells
>it to.
>
>Work around is probably to pass in on the command line to wrapper.exe a
>bogus setting for anchorfile (one different than the real anchorfile
>setting in .conf). The -t process should try to delete that bogus file
>(and fail) leaving the real anchor file alone.
>
>
>
>>-----Original Message-----
>>From: John Mazzitelli
>>Sent: Monday, January 24, 2005 10:13 AM
>>To: 'wra...@li...'
>>Subject: Anchor file mysteriously getting deleted immediately
>>upon startup
>>
>>[sorry for dup - originally sent this to Help forum; just now
>>found out that is old and that I should be sending to this
>>mailing list]
>>
>>I am seeing some weird behavior dealing with the anchorfile.
>>I have my anchorfile set. And under certain conditions, I
>>have seen it work. For example, if I start in -c console
>>mode, it works (anchorfile is created and the JVM will die
>>when I specifically delete it).
>>
>>I can see this work when I install the wrapper as an NT
>>service BUT ONLY if i start the service using the Windows GUI
>>utility (the Services GUI from Administration tools). If,
>>however, I start the Windows service via the -t wrapper
>>option, the JVM starts up fine, but immediately the
>>anchorfile gets deleted and the wrapper immediately shuts the
>>JVM down. It is very weird- I have no idea why or who is
>>deleting that anchor file - but as soon as it gets created
>>(no more than a second or two delay) that anchor file gets deleted.
>>
>>And this only happens if i start the service using the -t.
>>Again, if I start the service using the Winows Services GUI,
>>it all works fine.
>>
>>See below for my debug log - note the time stamps and see
>>that the anchorfile gets deleted rather quickly after startup.
>>
>>Has anyone seen this behavior, or more importantly, how to fix it?
>>
>>----
>>INFO | jvm 1 | 2005/01/22 00:53:38 | 00:53:38,567 INFO
>>[NamingService] Started jnpPort=1099, rmiPort=1098,
>>backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null,
>>Server
>>SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
>>STATUS | wrapper | 2005/01/22 00:53:38 | JBoss [abc-dpl] started.
>>INFO | jvm 1 | 2005/01/22 00:53:40 | 00:53:40,120 INFO
>>[Server] JBoss (MX MicroKernel) [4.0.0 (build:
>>CVSTag=JBoss_4_0_0 date=200412201046)] Started in 2s:604ms
>>STATUS | wrapper | 2005/01/22 00:53:41 | Anchor file deleted.
>>Shutting down.
>>DEBUG | wrapper | 2005/01/22 00:53:41 | wrapperStopProcess(0) called.
>>DEBUG | wrapper | 2005/01/22 00:53:41 | Sending stop signal to JVM
>>
>>FWIW: I set wrapper.anchor.poll_interval to something higher
>>(15 seconds) and it still behaves as I describe in my first
>>post. If I start with -t, the JVM stays up for 15 seconds,
>>but the anchor file is gone almost immediately. So, after the
>>15 seconds are up, since the file is gone, the JVM is
>>shutdown. It looks like as soon as the wrapper spits out the
>>log "wrapper | <my service name> started.", that's when the
>>anchor file gets deleted.
>>
>>Don't know if any of this helps. I looked at the C code but
>>nothing jumped out at me as to a possible problem. Should I
>>write this up as a bug or am I missing something obvious?
>>
>>
>>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
>Tool for open source databases. Create drag-&-drop reports. Save time
>by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
>Download a FREE copy at http://www.intelliview.com/go/osdn_nl
>_______________________________________________
>Wrapper-user mailing list
>Wra...@li...
>https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
|