trojan-gfw / trojan

An unidentifiable mechanism that helps you bypass GFW.
https://trojan-gfw.github.io/trojan/
GNU General Public License v3.0
18.87k stars 3.02k forks source link

[BUG] Trojan server process crashed silently #640

Open superbetacat opened 2 years ago

superbetacat commented 2 years ago

Trojan Version 1.16.0

Describe the bug Server process crashed silently. The server has been setup successfully and it has been working well for a few hours. But after that the trojan process crashed silently without any error so it is hard to know what happened.

To Reproduce Steps to reproduce the behavior:

  1. Run the trojan process with nohop, such as "nohup trojan -c myconfig.json -l log.txt > nohup.out 2>&1 &"
  2. It works well.
  3. About a few hours, maybe one hour or more. Number of users increased to 50.
  4. Server process crashed.
  5. Check the log.txt, there is no obvious trojan side error.

Expected behavior

  1. Trojan should work and the process is still running.
  2. Or it crashed, but the log should show what happened.

Logs If applicable, add logs to help explain your problem.

Environment Ubuntu 1804, 2C4G VM. Config: { "run_type": "server", "local_addr": "0.0.0.0", "local_port": 443, "remote_addr": "www.abcxyz123.com", "remote_port": 443, "password": [ "mypassword" ], "log_level": 2, "ssl": { "cert": "/path/to/fullchain.cer", "key": "/path/to/private.key", "key_password": "", "cipher_tls13": "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384", "prefer_server_cipher": true, "alpn": [ "http/1.1" ], "reuse_session": true, "session_ticket": false, "session_timeout": 60, "plain_http_response": "", "curves": "", "dhparam": "" }, "tcp": { "prefer_ipv4": true, "no_delay": true, "keep_alive": true, "reuse_port": true, "fast_open": true, "fast_open_qlen": 20 } }

Additional context Before this crash, I find there is "Too many open files" and then the process crashed. So I set the ulimit -n 102400 and there is no such error anymore. But it still crashed silently.

xyanrch commented 1 year ago

I implemented another proxy service of trojan protocal with better perfermance and stability. https://github.com/xyanrch/overplus

RickyWang111 commented 1 year ago

me too,have you solve it?