Code Monkey home page Code Monkey logo

Comments (25)

Jrohy avatar Jrohy commented on August 24, 2024

/usr/local/etc/trojan/config.json这个,你看下mysql有没有正常启动能否使用

from trojan.

totodata avatar totodata commented on August 24, 2024

看配置文件,密码是null ,无法连接
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 443,
"remote_addr": "127.0.0.1",
"remote_port": 80,
"password": null,
"log_level": 1,

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

不用配置文件的password字段的,是连Mysql来读用户密码的

from trojan.

totodata avatar totodata commented on August 24, 2024

查看mysql配置,没有开通,密码也没正常。

"mysql": {
    "enabled": false,
    "server_addr": "127.0.0.1",
    "server_port": 3306,
    "db": "",
    "username": "trojan",
    "password": ""
}

}

from trojan.

totodata avatar totodata commented on August 24, 2024

mysql 能卸载,重新用安装程序安装吗?

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

docker rm -f trojan-mysql
rm -rf /home/mysql
这样卸载mysql
然后去安装管理那里安装mysql

from trojan.

totodata avatar totodata commented on August 24, 2024

重新手动安装一遍,web管理页面正常了。trojan连不上。折腾啊。

systemctl status trojan -l
● trojan.service - trojan
Loaded: loaded (/etc/systemd/system/trojan.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2020-04-02 14:18:39 UTC; 222ms ago
Docs: https://trojan-gfw.github.io/trojan/config
https://trojan-gfw.github.io/trojan/
Process: 2159 ExecStart=/usr/bin/trojan/trojan /usr/local/etc/trojan/config.json (code=exited, status=1/FAILURE)
Main PID: 2159 (code=exited, status=1/FAILURE)

Apr 02 14:18:39 HostKvm-625635 trojan[2159]: [2020-04-02 14:18:39] [FATAL] exiting. . .
Apr 02 14:18:39 HostKvm-625635 systemd[1]: trojan.service: main process exited, code=exited, status=1/FAILURE
Apr 02 14:18:39 HostKvm-625635 systemd[1]: Unit trojan.service entered failed state.
Apr 02 14:18:39 HostKvm-625635 systemd[1]: trojan.service failed.

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

你可以先stop了trojan, systemctl stop trojan, 然后直接命令行运行trojan: /usr/bin/trojan/trojan /usr/local/etc/trojan/config.json, 这样看日志可能清晰点

from trojan.

totodata avatar totodata commented on August 24, 2024

[root@HostKvm-625635 ~]# systemctl stop trojan
[root@HostKvm-625635 ~]# /usr/bin/trojan/trojan /usr/local/etc/trojan/config.json
Welcome to trojan 1.15.1
[2020-04-02 14:42:41] [FATAL] fatal: bind: Address already in use
[2020-04-02 14:42:41] [FATAL] exiting. . .

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

443被占用了么

from trojan.

totodata avatar totodata commented on August 24, 2024

netstat -anp |grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1114/trojan
tcp 0 0 92.118.188.187:443 183.250.143.168:8445 ESTABLISHED 1114/trojan

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

先kill掉这个,再起看看日志正不正常

from trojan.

totodata avatar totodata commented on August 24, 2024

杀掉进程,重启后,还是报着个错

[root@HostKvm-625635 ~]# systemctl restart trojan
[root@HostKvm-625635 ~]# systemctl status trojan
● trojan.service - trojan
Loaded: loaded (/etc/systemd/system/trojan.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2020-04-02 14:55:43 UTC; 1s ago
Docs: https://trojan-gfw.github.io/trojan/config
https://trojan-gfw.github.io/trojan/
Process: 5458 ExecStart=/usr/bin/trojan/trojan /usr/local/etc/trojan/config.json (code=exited, status=1/FAILURE)
Main PID: 5458 (code=exited, status=1/FAILURE)

Apr 02 14:55:43 HostKvm-625635 systemd[1]: Unit trojan.service entered failed state.
Apr 02 14:55:43 HostKvm-625635 systemd[1]: trojan.service failed.

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

这个看不出什么的,你直接运行/usr/bin/trojan/trojan /usr/local/etc/trojan/config.json

from trojan.

totodata avatar totodata commented on August 24, 2024

一样的。
[root@HostKvm-625635 ~]# /usr/bin/trojan/trojan /usr/local/etc/trojan/config.json
Welcome to trojan 1.15.1
[2020-04-02 14:58:47] [FATAL] fatal: bind: Address already in use
[2020-04-02 14:58:47] [FATAL] exiting. . .

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

你先停了吗trojan, systemctl stop trojan

from trojan.

totodata avatar totodata commented on August 24, 2024

[root@HostKvm-625635 ~]# systemctl stop trojan
[root@HostKvm-625635 ~]# systemctl stop trojan
[root@HostKvm-625635 ~]# /usr/bin/trojan/trojan /usr/local/etc/trojan/config.json
Welcome to trojan 1.15.1
[2020-04-02 14:59:50] [FATAL] fatal: bind: Address already in use
[2020-04-02 14:59:50] [FATAL] exiting. . .

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

你当初kill掉后应该直接/usr/bin/trojan/trojan /usr/local/etc/trojan/config.json, 不要重启trojan.service先

from trojan.

totodata avatar totodata commented on August 24, 2024

[root@HostKvm-625635 ~]# ps -ef | grep trojan
root 1293 1 0 14:11 ? 00:00:01 /usr/local/bin/trojan web
root 6513 6334 0 15:06 ? 00:00:00 /usr/bin/trojan/trojan /usr/local/etc/trojan/config.json
root 6734 1494 0 15:08 pts/0 00:00:00 grep --color=auto trojan
[root@HostKvm-625635 ~]# kill 6513
[root@HostKvm-625635 ~]# /usr/bin/trojan/trojan /usr/local/etc/trojan/config.json
Welcome to trojan 1.15.1
[2020-04-02 15:09:55] [INFO] connecting to MySQL server 127.0.0.1:3306
[2020-04-02 15:09:55] [INFO] connected to MySQL server
[2020-04-02 15:09:55] [WARN] trojan service (server) started at 0.0.0.0:443

from trojan.

totodata avatar totodata commented on August 24, 2024

这样,启动后,可以使用trojan了,能连上。服务器重启后,还是处于不可连接状态。必需杀掉进程,重新手动启动。

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

你之前有没有是安装过trojan的,可能和本程序安装的路径不同

from trojan.

totodata avatar totodata commented on August 24, 2024

已经安装好的系统,如何更改域名呢?

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

更改域名的话证书也得更改是不是,安装管理那里证书申请那里改

from trojan.

totodata avatar totodata commented on August 24, 2024

限制流量,设置的是终身流量吧?不是按照指定周期?如何让它每个月重置流量呢。

from trojan.

Jrohy avatar Jrohy commented on August 24, 2024

暂时不支持周期重置流量

from trojan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.