David Cook
5ca20665a3
This change adds the ability to enable and configure TCP keepalive support for the SIP server using SIPconfig.xml. For the sake of backwards compatibility, it defaults to disabled and additional parameters default match typical kernel defaults. Technical detail can be found in the perldoc for C4/SIP/SIPserver.pm Test plan: 0. Apply the patch 1. koha-sip --restart kohadev 2. apt-get update && apt-get install tcpdump 3. In one window, run "tcpdump -A -n -v -i any 'port 6001'" 4. In another window, run the following: echo -e "9300CNterm1|COterm1|CPCPL|\r" | nc 127.0.0.1 6001 -v 5. Note in tcpdump output that after the initial flood of packets, nothing more is received 6. vi /etc/koha/sites/kohadev/SIPconfig.xml 7. In the "server-params" element, add attributes like the following: custom_tcp_keepalive='1' custom_tcp_keepalive_time='10' custom_tcp_keepalive_intvl='5' 8. koha-sip --restart kohadev 9. In one window, run "tcpdump -A -n -v -i any 'port 6001'" 10. In another window, run the following: echo -e "9300CNterm1|COterm1|CPCPL|\r" | nc 127.0.0.1 6001 -v 11. Note in tcpdump output that after the initial flood of packets, ACK packets are sent out every 10+ seconds for the idle connection Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
104 lines
4 KiB
XML
104 lines
4 KiB
XML
<acsconfig xmlns="http://openncip.org/acs-config/1.0/">
|
|
<!-- above address gets nothing, it's just a namespace -->
|
|
<error-detect enabled="true" />
|
|
|
|
<!--
|
|
Set Net::Server::PreFork runtime parameters
|
|
syslog_ident will identify SIP2 Koha server entries in syslog
|
|
For OpenSolaris, add: syslog_logsock=stream
|
|
-->
|
|
<server-params
|
|
min_servers='1'
|
|
min_spare_servers='0'
|
|
custom_tcp_keepalive='0'
|
|
custom_tcp_keepalive_time='7200'
|
|
custom_tcp_keepalive_intvl='75'
|
|
/>
|
|
|
|
<listeners>
|
|
<!-- vestigial HTTP, never implemented: just use the OPAC!
|
|
<service
|
|
port="0:8080/tcp"
|
|
transport="http"
|
|
protocol="NCIP/1.0" />
|
|
-->
|
|
<service
|
|
port="127.0.0.1:8023/tcp/IPv4"
|
|
transport="telnet"
|
|
protocol="SIP/2.00"
|
|
timeout="60" />
|
|
|
|
<service
|
|
port="127.0.0.1:6001/tcp/IPv4"
|
|
transport="RAW"
|
|
protocol="SIP/2.00"
|
|
client_timeout="600"
|
|
timeout="60" />
|
|
<!--- client_timeout times out active connections which have not received
|
|
input from the client. Many persistent connections will send a status request
|
|
every 5-7 mins so setting this to less than that will add instability to the connection
|
|
if explicitly set to zero, no timeout is applied to the connection.
|
|
NB the parameter timeout applies to the login process only and should be set to a lower value
|
|
to time out failed connections
|
|
-->
|
|
</listeners>
|
|
|
|
<accounts>
|
|
<login id="term1" password="term1" delimiter="|" error-detect="enabled" institution="CPL" encoding="ascii" checked_in_ok="1" />
|
|
<login id="koha" password="koha" delimiter="|" error-detect="enabled" institution="kohalibrary" encoding="utf8" />
|
|
<login id="koha2" password="koha" institution="kohalibrary2" terminator="CR" />
|
|
<login id="lpl-sc" password="1234" institution="LPL" />
|
|
<login id="lpl-sc-beacock" password="xyzzy"
|
|
delimiter="|" error-detect="enabled" institution="LPL"
|
|
send_patron_home_library_in_af="1"
|
|
av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
|
|
holds_block_checkin="0"
|
|
holds_get_captured="1"
|
|
overdues_block_checkout="1"
|
|
format_due_date="0"
|
|
inhouse_item_types=""
|
|
inhouse_patron_categories=""
|
|
seen_on_item_information="mark_found"> <!-- could be "keep_lost", empty to disable -->
|
|
<screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
|
|
<screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
|
|
</login>
|
|
</accounts>
|
|
|
|
<!--
|
|
Institution tags are for enabled branches. There needs to be one
|
|
institution stanza for each institution named in the accounts above.
|
|
The implementation attribute is actually used to find the code to run,
|
|
in our case "ILS".
|
|
-->
|
|
|
|
<institutions>
|
|
<institution id="MAIN" implementation="ILS" parms="">
|
|
<policy checkin="true" renewal="true" checkout="true"
|
|
status_update="false" offline="false"
|
|
timeout="100"
|
|
retries="5" />
|
|
</institution>
|
|
<institution id="CPL" implementation="ILS" parms="">
|
|
<policy checkin="true" renewal="true" checkout="true"
|
|
status_update="false" offline="false"
|
|
timeout="25"
|
|
retries="5" />
|
|
</institution>
|
|
<institution id="kohalibrary" implementation="ILS" parms="">
|
|
<policy checkin="true" renewal="false" checkout="true"
|
|
status_update="false" offline="false"
|
|
timeout="100"
|
|
retries="5" />
|
|
</institution>
|
|
<institution id="kohalibrary2" implementation="ILS" parms="">
|
|
<policy checkin="true" renewal="false" checkout="true"
|
|
timeout="100"
|
|
retries="3" />
|
|
</institution>
|
|
<institution id="LPL" implementation="ILS">
|
|
<policy checkin="true" renewal="false" checkout="true"
|
|
timeout="100"
|
|
retries="5" />
|
|
</institution>
|
|
</institutions>
|
|
</acsconfig>
|