summarylogtreecommitdiffstats
path: root/wrapper.config
blob: 1f291ef1ce65612efe8fe6c577f98c0d9b8931b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#encoding=UTF-8
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=/usr/lib/jvm/default/bin/java

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.
wrapper.java.mainclass=freenet.node.NodeStarter

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
# Be sure there are no other duplicate classes.
wrapper.java.classpath.1=/opt/freenet/lib/*.jar
wrapper.java.classpath.2=/usr/share/java/wrapper.jar

# Java Library Path (location of libwrapper.so)
wrapper.java.library.path.1=/usr/lib/java-service-wrapper

# Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
wrapper.java.additional.auto_bits=TRUE

wrapper.java.additional.1=-Dnetworkaddress.cache.ttl=0
wrapper.java.additional.2=-Dnetworkaddress.cache.negative.ttl=0
# Needed for some linux distros? Shouldn't prevent using IPv6, just make it prefer IPv4?
wrapper.java.additional.3=-Djava.net.preferIPv4Stack=true
# You could enable this for debugging, but Freenet will use more CPU if you do.
#wrapper.java.additional.4=-enableassertions:freenet
# You might want to set the following line if you have changed java.maxmemory
# wrapper.java.additional.5=-XX:MaxPermSize=
# Use nss for crypto operations
wrapper.java.additional.6=-Dfreenet.jce.use.NSS=true
# Location used to hold temporary files.
wrapper.java.additional.7=-Djava.io.tmpdir=/opt/freenet/tmp

# Initial Java Heap Size (in MB)
# If a non-zero value is specified for this property then an appropriate -Xms
#  parameter will be added. The initial memory must be less than or equal to
#  the value set for the maxmemory property
#wrapper.java.initmemory=4

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=512

# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=/opt/freenet/conf/freenet.ini

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Enables Debug output from the Wrapper.
#wrapper.debug=TRUE

# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM

# Log Level for console output.  (See docs for log levels)
# https://wrapper.tanukisoftware.com/doc/english/prop-console-loglevel.html
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
# You may wish to change this.
wrapper.logfile=/opt/freenet/wrapper.log

# Format of output for the log file.
# The format consists of the tokens 'L' for log level, 'P' for prefix, 'D' for thread,
# 'T' for time, 'Z' for millisecond time, and 'M' for message
# Unfortunately the log timezone cannot be changed, see
# http://www.nabble.com/Log-message-timezone-td23651317.html
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=2m

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=3

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

# these will shut down or crash the JVM
wrapper.signal.mode.usr1=RESTART
wrapper.signal.mode.usr2=IGNORE

# choose what to do if the JVM kills itself based on the exit code
wrapper.on_exit.default=SHUTDOWN
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.1=SHUTDOWN
# OOM
wrapper.on_exit.10=RESTART
# graceful shutdown
wrapper.on_exit.2=SHUTDOWN
# hard shutdown
wrapper.on_exit.3=SHUTDOWN
# hard restart
wrapper.on_exit.4=RESTART
# hard restart
wrapper.on_exit.5=RESTART

# the router may take a few minutes to save state, etc
wrapper.jvm_exit.timeout=120

# give the OS 60s to clear all the old sockets / etc before restarting
# Let's change the default from 60 to 10 seconds and see if anyone moans..
wrapper.restart.delay=5
wrapper.restart.reload_configuration=TRUE

# The ping timeout must be at least 5 seconds longer than the value of wrapper.ping.interval.
# Extend this if you are getting 'JVM appears hung' shutdowns.
wrapper.ping.timeout=320
wrapper.ping.interval=300

# pid file for the JVM
# Directory must exist or the wrapper will fail to start.
wrapper.java.pidfile=/run/freenet/freenet.pid

#********************************************************************
# Wrapper General Properties
#********************************************************************
# Allow for the use of non-contiguous numbered properties
wrapper.ignore_sequence_gaps=TRUE

# Title to use when running as a console
wrapper.console.title=Freenet Router Service

# Set permissions used when creating files
# See http://wrapper.tanukisoftware.com/doc/english/prop-umask.html
# for a detailed explanation of these settings.
wrapper.umask=0022
wrapper.java.umask=0022
wrapper.logfile.umask=077

#********************************************************************
# Wrapper JVM Checks
#********************************************************************
# Out Of Memory detection.
wrapper.filter.trigger.1=java.lang.OutOfMemoryError
wrapper.filter.action.1=RESTART
wrapper.filter.message.1=The JVM has run out of memory.

# Request a Thread Dump in the event that the JVM does not exit when requested.
#wrapper.request_thread_dump_on_failed_jvm_exit=TRUE

#********************************************************************
# Advanced Options
#********************************************************************
# Enable the Shenandoah Gargabe Collector
#wrapper.java.additional.100=-XX:+UnlockExperimentalVMOptions
#wrapper.java.additional.101=-XX:+UseShenandoahGC