[daisy] Problem running two instances of Daisy
Olivier Lange
wire at petit-atelier.ch
Fri Dec 1 08:07:30 CST 2006
Hi all,
Bruno Dumon wrote:
> On Sat, 2006-10-07 at 17:21 -0700, Jill wrote:
>>
>> [...]
>>
>> Also, I did go through the document you mention (Changing location (port or
>> machine) of the different processes
>> http://cocoondev.org/daisydocs-1_5/admin/14.html) and verified that I had
>> made those changes, but still got the port 8079 message.
>
> There's probably some component in Cocoon that listens to port 8079.
> Maybe in the cocoon log files you can see a stacktrace that gives more
> information (wiki logs are in <wikidata dir>/logs/cocoon.log).
It is Jetty's STOP port, where it listens for termination requests [1].
I ran into the same problem and while searching in the list archives, I
found this thread. I fixed it for my Daisy 1.5 instances and thought I
would post a follow-up (I apologize if this has been discussed or solved
in the meantime, I haven't read the list for a while and haven't used
Daisy 2.0 yet).
One can change that port while setting the STOP.PORT system property [2]:
java -DSTOP.PORT=0 -jar start.jar
This setting solved the problem for me. I did set the STOP.PORT=0 system
property in the Java Wrapper configuration file of my DaisyWiki instances:
~# cat /etc/daisy/wrapper-daisywiki-rrsc.conf
[...]
# Java Main class
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=%WRAPPER_HOME%/lib/wrapper.jar
wrapper.java.classpath.2=%DAISY_HOME%/daisywiki/jetty/start.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=%WRAPPER_HOME%/lib
# Java Additional Parameters
wrapper.java.additional.1=-Djetty.home=%DAISY_HOME%/daisywiki/jetty
[...]
wrapper.java.additional.11=-DSTOP.PORT=0
[...]
Jetty now selects a random available port where it listens for
termination requests. In case you would need it, the port number gets
printed on stdout, i.e. in the Wrapper's log.
I also tried to define that property as an argument to the Jetty Server
object in the 'jetty-daisywiki.xml' configuration file:
<Configure class="org.mortbay.jetty.Server">
<Call name="setAttribute">
<Arg>STOP.PORT</Arg>
<Arg>0</Arg>
</Call>
however this didn't work. System properties and Arguments seem to be
different beasts.
Kind regards,
--
Olivier
[1] http://docs.codehaus.org/display/JETTY/Securing+Jetty
[2] http://docs.codehaus.org/display/JETTY/Running
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3605 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.cocoondev.org/pipermail/daisy/attachments/20061201/1051528e/smime.bin
More information about the daisy
mailing list