Open indomalex opened 2 years ago
any updates? I got the same error on ubuntu 22.04 , trojan 1.16.0
sudo /usr/bin/trojan /etc/trojan/config.json
works fine.
So I took a look at /lib/systemd/system/trojan.service
and changed
User=nobody
to
User=root
Now systemctl start trojan.service
worked as expeted.
You can debug permissions with namei -l $PATH
sudo /usr/bin/trojan /etc/trojan/config.json
works fine.So I took a look at
/lib/systemd/system/trojan.service
and changedUser=nobody
to
User=root
Now
systemctl start trojan.service
worked as expeted.
it's worked for me. thanks! btw, just FYR that after changed the certificate permission for nobody, I was changed back to user=nobody for secure the service. and then reload the daemon and trojan service. it's work too. sudo chown -R nobody:nogroup /etc/letsencrypt/live/ sudo chown -R nobody:nogroup /etc/letsencrypt/archive/ sudo systemctl daemon-reload sudo systemctl restart trojan
Trojan Version 1.16.0
Describe the ERROR My trojan cannot run. Before starting trojan.service, I've obtained SSL Certificate from The Let’s Encrypt project without any error: apt install certbot python3-certbot-nginx -y certbot certonly --nginx
Also, config.json correctly edited; cert and key path correctly specified;
80,443 ports were opened;
but got this 'asio.ssl error' unsuspected.
To Reproduce Steps to reproduce the behavior:
“fatal: use_private_key_file: asio.ssl error”
Logs Jul 07 13:58:49 racknerd systemd[1]: Started trojan. Jul 07 13:58:49 racknerd trojan[98033]: Welcome to trojan 1.16.0 Jul 07 13:58:49 racknerd trojan[98033]: [2022-07-07 13:58:49] [FATAL] fatal: use_private_key_file: asio.ssl error Jul 07 13:58:49 racknerd trojan[98033]: [2022-07-07 13:58:49] [FATAL] exiting. . . Jul 07 13:58:49 racknerd systemd[1]: trojan.service: Main process exited, code=exited, status=1/FAILURE Jul 07 13:58:49 racknerd systemd[1]: trojan.service: Failed with result 'exit-code'.
Environment Operating System: Ubuntu 22.04 LTS
Kernel: Linux 5.15.0-30-generic