Failed first run Deb11 and http PORT set

Hello.

  1. On a server with services already listening on 80/443 what is the easiest way to configure the listening port (admin panel) before/during install to not conflict or cause problems?

  2. Installed mongo and pritunl on Deb11 based on script in install instructions. Cannot start, fails on python errors below;
    syslog

pritunl[10947]: Could not find platform independent libraries
pritunl[10947]: Could not find platform dependent libraries <exec_prefix>
pritunl[10947]: Consider setting $PYTHONHOME to [:<exec_prefix>]
pritunl[10947]: Fatal Python error: initfsencoding: Unable to get the locale encoding
pritunl[10947]: ModuleNotFoundError: No module named ‘encodings’
pritunl[10947]: Current thread 0x00007f14500e8740 (most recent call first):
systemd[1]: pritunl.service: Main process exited, code=killed, status=6/ABRT
systemd[1]: pritunl.service: Failed with result ‘signal’.

attempt to set listening port based on 3rd party suggesiton;

$> pritunl set app.server_port 9005

Could not find platform independent libraries
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to [:<exec_prefix>]
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named ‘encodings’

Current thread 0x00007f5f99f75740 (most recent call first):
Aborted

Stock install, everything installed from Debian Repo.

python 2.7.18
python 3.9.2
Debian 11 - 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1

Thanks.

This is likely from using the Debian 10 repository on Debian 11. Check the repository documentation and verify the correct repository is configured.

  1. Ok, checked the install script and that is correct, buster is defined. Removed, changed to bullseye, re-installed.

Now new error;

[undefined][2022-09-21 13:17:40,869][ERROR] Pritunl setup failed
Traceback (most recent call last):
File “/usr/lib/pritunl/lib/python3.9/site-packages/pritunl/setup/init.py”, line 89, in setup_db_host
setup_mongo()
File “/usr/lib/pritunl/lib/python3.9/site-packages/pritunl/setup/mongo.py”, line 327, in setup_mongo
client = pymongo.MongoClient(
File “/usr/lib/pritunl/lib/python3.9/site-packages/pymongo/mongo_client.py”, line 680, in init
seeds.update(uri_parser.split_hosts(entity, port))
File “/usr/lib/pritunl/lib/python3.9/site-packages/pymongo/uri_parser.py”, line 359, in split_hosts
raise ConfigurationError("Empty host "
pymongo.errors.ConfigurationError: Empty host (or extra comma in host list).
Traceback (most recent call last):
File “/usr/bin/pritunl”, line 33, in
sys.exit(load_entry_point(‘pritunl==1.30.3292.22’, ‘console_scripts’, ‘pritunl’)())
File “/usr/lib/pritunl/lib/python3.9/site-packages/pritunl/main.py”, line 164, in main
setup.setup_db_host()
File “/usr/lib/pritunl/lib/python3.9/site-packages/pritunl/setup/init.py”, line 89, in setup_db_host
setup_mongo()
File “/usr/lib/pritunl/lib/python3.9/site-packages/pritunl/setup/mongo.py”, line 327, in setup_mongo
client = pymongo.MongoClient(
File “/usr/lib/pritunl/lib/python3.9/site-packages/pymongo/mongo_client.py”, line 680, in init
seeds.update(uri_parser.split_hosts(entity, port))
File “/usr/lib/pritunl/lib/python3.9/site-packages/pymongo/uri_parser.py”, line 359, in split_hosts
raise ConfigurationError("Empty host "
pymongo.errors.ConfigurationError: Empty host (or extra comma in host list).

  1. comment on changing the listening port on install?
    Edit: I changed port # in /etc/pritunl.conf , assume that is where to make the change? cannot confirm listening due to above error.

Thanks.

That would indicate the MongoDB URI connection string in /etc/pritunl.conf is invalid.

The load balancing documentation has information on changing the server port. You will need to run sudo pritunl set app.redirect_server false to disable usage of port 80 on the Pritunl server.

Yes it would, and it is incorrect;

 "mongodb_uri": ""

This was installed using the install instructions on the download page. It seems something in the setup isn’t working correctly if it isn’t populating the uri correctly.

This seems like an install bug. Since I am not a python developer, where do I go from here?

We are trying to evaluate pritunl to use company wide and so far can’t even get past the documented install procedure. Any assistance to getting this fully working would be appreciated.

Thanks.

edit: running pritunl reconfigure → then changes /etc/pritunl.conf to

“mongodb_uri”: null,

obviously that will cause an error of database undefined.

You’re running sudo pritunl set before initializing the server. When the server first starts the web console will show a page to configure the MongoDB URI, it will default to mongodb://localhost:27017/pritunl. You can initialize the server without the web console by adding that URI to the configuration then run sudo systemctl restart pritunl. Then sudo pritunl set will function,