# Error using server\_start and server\_stop plugin caller

**URL:** <https://forum.pritunl.com/t/error-using-server-start-and-server-stop-plugin-caller/2818>\
**Category:** Pritunl VPN\
**Tags:** pritunl\
**Created:** [December 13, 2024, 12:11am UTC](https://forum.pritunl.com/t/error-using-server-start-and-server-stop-plugin-caller/2818 "2024-12-13T00:11:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beparmentier](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/b/c77e96/32.png) [@beparmentier](https://forum.pritunl.com/u/beparmentier)\
**Post date:** [December 13, 2024, 12:11am UTC](https://forum.pritunl.com/t/error-using-server-start-and-server-stop-plugin-caller/2818/1 "2024-12-13T00:11:19Z")

</div>

Hello,

I tried to create simple plugin that send data to our log management but I get errors with server\_start and server\_error caller

```auto
[winter-meadow-7307][2024-12-12 14:39:21,816][ERROR] Server error occurred while running
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/instance.py", line 1772, in _run_thread
    plugins.caller(
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/plugins/plugins.py", line 88, in caller
    returns.append(handler(**kwargs))
TypeError: server_stop() missing 2 required positional arguments: 'ping_interval_wg' and 'ping_timeout_wg'
  server_id = "67486a22306b5515416105e3"
  instance_id = "675ae74c1a4dd1fa71fdb8a5"

```

Here the plugin code:

```auto
def server_start(host_id, host_name, server_id, server_name, wg, port,
        port_wg, protocol, ipv6, ipv6_firewall, network, network6, network_wg,
        network6_wg, network_mode, network_start, network_stop,
        restrict_routes, bind_address, onc_hostname, dh_param_bits,
        multi_device, dns_servers, search_domain, otp_auth, cipher, hash,
        inter_client, ping_interval, ping_timeout, ping_interval_wg,
        ping_timeout_wg, link_ping_interval, link_ping_timeout, max_clients,
        replica_count, dns_mapping, debug, interface, interface_wg,
        bridge_interface, vxlan, **kwargs):
  json_record = {
    "event": "server_start"
  }
  splunk.send_data(json_record)

```

```auto
def server_stop(host_id, host_name, server_id, server_name, wg, port,
        port_wg, protocol, ipv6, ipv6_firewall, network, network6, network_wg,
        network6_wg, network_mode, network_start, network_stop,
        restrict_routes, bind_address, onc_hostname, dh_param_bits,
        multi_device, dns_servers, search_domain, otp_auth, cipher, hash,
        inter_client, ping_interval, ping_timeout, ping_interval_wg,
        ping_timeout_wg, link_ping_interval, link_ping_timeout, max_clients,
        replica_count, dns_mapping, debug, interface, interface_wg,
        bridge_interface, vxlan, **kwargs):
  json_record = {
    "event": "server_stop"
  }
  splunk.send_data(json_record)

```

Any idea what I’m doing wrong ?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [December 13, 2024, 12:13am UTC](https://forum.pritunl.com/t/error-using-server-start-and-server-stop-plugin-caller/2818/2 "2024-12-13T00:13:05Z")

</div>

Those 2 args need to be removed from the plugin functions. The example code is for the release currently in the unstable repository which added new args.

---

<div class="post-metadata">

**Author:** ![beparmentier](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/b/c77e96/32.png) [@beparmentier](https://forum.pritunl.com/u/beparmentier)\
**Post date:** [December 20, 2024, 1:15pm UTC](https://forum.pritunl.com/t/error-using-server-start-and-server-stop-plugin-caller/2818/3 "2024-12-20T13:15:53Z")

</div>

Oh ok, thanks for your help
