|
From: <Han...@ca...> - 2006-09-25 15:13:39
|
I set the wrapper.ntservice.account (and password) to the same user that =
runs the wrapper.exe -c
(in userinfo.conf below)
but it didn't help.
The directory structure looks like:
Dataserver
config.conf
JavaServiceWrapper (unpack of your distribution)
bin
wrapper.exe
logs
lib
wrapper.jar
wrapper.dll
I start the whole thing in the Dataserver directory
I have bat-file that looks like:
set CONF_FILE=3D..\..\dataserver\config.conf
set JWRAPPER=3D..\JavaServiceWrapper\bin\wrapper.exe
%JWRAPPER% -i %CONF_FILE%
if %ERRORLEVEL% neq 0 goto failure
%JWRAPPER% -t %CONF_FILE%
if %ERRORLEVEL% neq 0 goto failure
The config file looks like (The wrapper.log file ends up in the =
dataserver directory):
wrapper.working.dir =3D ../../dataserver
wrapper.java.command=3Djava
wrapper.java.initmemory =3D 64
wrapper.java.maxmemory =3D 128
wrapper.java.library.path.1 =3D ../JavaServiceWrapper/lib
wrapper.java.library.path.2 =3D ../lib
wrapper.java.classpath.1 =3D ../JavaServiceWrapper/lib/wrapper.jar
wrapper.java.classpath.2 =3D ./lib/dataserver.jar
wrapper.java.classpath.3 =3D ./lib/mq.jar
wrapper.java.mainclass =3D =
org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.app.parameter.1 =3D dataserver.Application
wrapper.app.parameter.2 =3D ./properties/dataserver.properties
wrapper.console.loglevel=3DDEBUG
wrapper.logfile =3D =
../JavaServiceWrapper/logs/DataServer-YYYYMMDD.log
wrapper.logfile.format =3D LPTM
wrapper.logfile.maxfiles =3D 7
wrapper.logfile.rollmode =3D DATE
wrapper.syslog.loglevel =3D NONE
wrapper.ntservice.description =3D The DataServer
wrapper.ntservice.displayname =3D DataServer
wrapper.ntservice.name =3D DataServer
wrapper.ntservice.interactive =3D false
wrapper.ntservice.starttype =3D AUTO_START
#include ../../dataserver/userinfo.conf
-----Original Message-----
From: wra...@li... =
[mailto:wra...@li...] On Behalf Of Leif =
Mortenson
Sent: den 25 september 2006 16:10
To: wra...@li...
Subject: Re: [Wrapper-user] Q: stdout output ends up in the logfile when =
running wrapper.exe -c .. but not when running wrapper -t ....
Hans,
Can you describe your directory structure a bit more. Where is the=20
wrapper.log file
that you are seeing being generated? I ask because the Wrapper has a=20
fail mode
where it will default to creating a file called wrapper.log in the same=20
directory as the
wrapper.exe if it can not write to the configured wrapper.logfile for=20
any reason.
When running as a service, it may also fall back to writing in the=20
windows/system32
directory.
Now, as to why it would be unable to write the file. The Wrapper runs=20
as the
currently logged in user when running console mode. When it is running=20
as a service
however, it will default to running as the SYSTEM user. You can change=20
this using
the wrapper.ntservice.account property, but the default is the SYSTEM =
user.
If you have set up any access permissions on your directory structure,=20
it may not
be possible for the SYSTEM user to write to the directory you have =
specified
for your log file. The SYSTEM user is also unable to access network=20
drives.
Cheers,
Leif
Hans Jens=E9us wrote:
> On Win XP, when I start my app (using WrapperSimpleApp) with =
wrapper.exe -c config.conf
> System.out shows up in the logfile that is specified in config.conf
>
> But if I start my app as an NT service (using wrapper.exe -t =
config.conf)
> then System.out shows up in wrapper.log
>
> The logging & NT part of config.conf looks like:
> wrapper.logfile =3D =
../JavaServiceWrapper/logs/DataServer-YYYYMMDD.log
> wrapper.logfile.format =3D LPTM
> wrapper.logfile.maxfiles =3D 7
> wrapper.logfile.rollmode =3D DATE
> wrapper.syslog.loglevel =3D NONE
>
> wrapper.ntservice.description =3D The DataServer
> wrapper.ntservice.displayname =3D DataServer
> wrapper.ntservice.name =3D DataServer
> wrapper.ntservice.interactive =3D false
> wrapper.ntservice.starttype =3D AUTO_START
>
> I would like to have System.out to go into the logfile when I run as a =
service (to get rolling going)
> Is there a property that I've missed or what should I do?
>
> R.
>
> Hans
> =20
-------------------------------------------------------------------------=
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share =
your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|