Server start times out

Our servers will not restart successfully. The VPN server is configured and allocated to two hosts in a non-replicated manner. The Pritunl servers are installed per the instructions. We are using Oracle 8.7 on AWS. When we start the pritunl service, we can get a server to start and it’s stable until we restart the vpn server within Pritunl UI. The logs on the server are the following:

[restless-stars-2745][2023-06-02 14:49:39,777][ERROR] Exception on /server/6464f8cb35b75d3f5646b875/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('6464f8cb35b75d3f5646b875')}
[restless-stars-2745][2023-06-02 14:50:30,493][ERROR] Exception on /server/6464f8cb35b75d3f5646b875/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('6464f8cb35b75d3f5646b875')}
[restless-stars-2745][2023-06-02 14:50:30,493][ERROR] Exception on /server/6464f8cb35b75d3f5646b875/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('6464f8cb35b75d3f5646b875')}

Thanks,
Andy

This can happen if the host ID is deleted or reset causing the hosts to be recreated. Verify that the hosts that are marked as online are the same hosts attached to the server and check that no offline hosts are attached to servers. If a server has no online hosts attached the startup will timeout.

Hey Zach,
Thanks for the reply. I did verify that all attached hosts are online appear to be accurate in the mongo database as well. Still no success in getting the server to restart.

It could be caused by issues with iptables or the servers having too many routes. These issues should show other error messages. Also check /var/log/pritunl.log for database connection errors which would not be shown in the web console logs.

No luck. Database looks stable and in checking the logs, it’s the same error.

[restless-stars-2745][2023-06-08 19:16:45,384][ERROR] Exception on /server/648227b68c51fa26c76944fc/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('648227b68c51fa26c76944fc')}
[restless-stars-2745][2023-06-08 19:16:45,384][ERROR] Exception on /server/648227b68c51fa26c76944fc/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('648227b68c51fa26c76944fc')}
[restless-stars-2745][2023-06-08 19:18:48,307][ERROR] Exception on /server/648227b68c51fa26c76944fc/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('648227b68c51fa26c76944fc')}
[restless-stars-2745][2023-06-08 19:18:48,307][ERROR] Exception on /server/648227b68c51fa26c76944fc/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('648227b68c51fa26c76944fc')}

Tried deleting the server and creating a new server. If I restart the Pritunl service, the server will start once, and then die if I try to restart the server without restarting the service first.

I’ve tried it with selinux disabled and have confirmed all iptables and firewalld services have been removed and stopped.

Also, server only has one route defined.

If the disk image was cloned this could cause both hosts to use the same ID creating inconsistencies in the database. Delete the file /var/lib/pritunl/pritunl.uuid and run sudo systemctl restart pritunl.

Have the same error. Using single-node pritunl on docker. After server restart it can not start again. It can start only after restart of the container.

[thawing-forest-9678][2023-09-18 11:39:11,650][ERROR] Exception on /server/6436b69017707b585f32e0e0/operation/start [PUT]
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/lib/python3.10/site-packages/pritunl-1.32.3602.80-py3.10.egg/pritunl/auth/app.py", line 10, in _wrapped
    return call(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/pritunl-1.32.3602.80-py3.10.egg/pritunl/handlers/server.py", line 1351, in server_operation_put
    svr.start()
  File "/usr/lib/python3.10/site-packages/pritunl-1.32.3602.80-py3.10.egg/pritunl/server/server.py", line 1656, in start
    raise ServerStartError('Server start timed out', {
pritunl.exceptions.ServerStartError: Server start timed out. {'server_id': ObjectId('6436b69017707b585f32e0e0')}

The /var/lib/pritunl/pritunl.uuid file stores the ID of the host. If this file is not preserved a new host will be created when the container restarts. That host will not be attached to any of the servers and the servers will time out on start due to being unable to find an online host that is attached. You will need to reattach the host to the servers and delete the unused offline hosts.

Hello. I have the same problem with Prituln-server.
It works on Debian 12. What have I do to debug this problem?
ps. I tryed install different version Prituln-server for Debian 11 and Debian 10, but result was the same.

Use mongodb 5.0.21 instead of 7.0.2. This is how I managed to solve this problem.

1 Like

This is a known issue with the MongoDB 7 upgrade corruption the publish/subscribe messages collection. You can either run sudo pritunl destroy-secondary to clear all the cache from the database or drop the messages collection and restart a host to recreate the collection. If the collection is dropped manually you will likely need to stop all running hosts to prevent a host from adding to the collection before it can be created as a capped collection.

The next release will have the command sudo pritunl clear-message-cache to clear only this collection.

1 Like

It works! Thank you very much!!! :beers:

你们都错了,还有一种情况是ipset加载有问题,

Pritunl 尝试使用 ipset 创建 IP 集合(用于动态防火墙规则),但该命令在你的宿主机中执行失败,可能的原因包括:

  • 宿主机内核不支持 ipset(例如精简容器内核)
  • Docker 容器未使用 --cap-add=NET_ADMIN 或 --privileged
  • 宿主机未加载 ip_set 模块或其子模块(如 ip_set_hash_net)

那么执行以下命令可能能解决问题。
lsmod | grep ip_set # 查看
modprobe ip_set
modprobe ip_set_hash_net

You’re all wrong — there’s another possible cause: ipset loading issues.

Pritunl attempts to create IP sets (used for dynamic firewall rules), but the command may fail on your host due to the following reasons:

  • The host kernel does not support ipset (e.g., minimal container kernels).
  • The Docker container is not started with --cap-add=NET_ADMIN or --privileged.
  • The required kernel modules (ip_set or its submodules like ip_set_hash_net) are not loaded on the host.

To resolve this, try running the following commands:

lsmod | grep ip_set       # Check if the module is loaded
modprobe ip_set           # Load ip_set module
modprobe ip_set_hash_net  # Load hash_net submodule

看日志,如果出现
can‘t initialize iptables table `filter‘: Table does not exist

can‘t initialize iptables table `nat‘: Table does not exist

那么这两条也分别执行以下
modprobe iptable_filter
modprobe iptable_nat