Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装时出错 #1119

Closed
tanggo-why opened this issue Jun 9, 2024 · 7 comments
Closed

安装时出错 #1119

tanggo-why opened this issue Jun 9, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@tanggo-why
Copy link

bash <(curl -fsSL https://get.hy2.sh/)
63: note: SELinux is detected
63: warning: Failed to obtain SEContext of /etc/systemd/system
Checking for installed version ... not installed
Checking for latest version ... v2.4.5
Downloading hysteria binary: https://github.com/apernet/hysteria/releases/download/app/v2.4.5/hysteria-linux-amd64 ...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 15.4M 100 15.4M 0 0 17.2M 0 --:--:-- --:--:-- --:--:-- 34.3M
Installing hysteria executable ... ok
Install /etc/hysteria/config.yaml ... ok
Creating user hysteria ... ok
Install /etc/systemd/system/hysteria-server.service ... ok
Install /etc/systemd/system/hysteria-server@.service ... ok

Congratulation! Hysteria 2 has been successfully installed on your server.

@tanggo-why tanggo-why added the bug Something isn't working label Jun 9, 2024
@haruue
Copy link
Collaborator

haruue commented Jun 10, 2024

安装已经成功了。 那个 warning 无视即可。

@haruue haruue closed this as completed Jun 10, 2024
@tanggo-why
Copy link
Author

安装已经成功了。 那个警告无视即可。
你好!但是etc文件夹中没有Hysteria2

@haruue
Copy link
Collaborator

haruue commented Jun 10, 2024

但是etc文件夹中没有Hysteria2

Hysteria 2 的配置文件在 /etc/hysteria/config.yaml , 也就是 etc 「文件夹」里的 hysteria 文件夹里的 config.yaml

@tanggo-why
Copy link
Author

Hysteria 2 的配置文件在/etc/hysteria/config.yaml,也就是etc“文件夹”里的hysteria文件夹里config.yaml
微信截图_20240610200020

etc里没有hysteria`这个文件夹

@tanggo-why
Copy link
Author

root@C20240609102115:# systemctl restart hysteria-server.service
root@C20240609102115:
# systemctl status hysteria-server.service
● hysteria-server.service - Hysteria Server Service (config.yaml)
Loaded: loaded (/etc/systemd/system/hysteria-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-06-10 15:05:47 UTC; 8s ago
Process: 2666 ExecStart=/usr/local/bin/hysteria server --config /etc/hysteria/config.yaml (code=exited, status=1/FAILURE)
Main PID: 2666 (code=exited, status=1/FAILURE)
CPU: 19ms

Jun 10 15:05:47 C20240609102115 systemd[1]: Started Hysteria Server Service (config.yaml).
Jun 10 15:05:47 C20240609102115 hysteria[2666]: 2024-06-10T15:05:47Z INFO server mode
Jun 10 15:05:47 C20240609102115 hysteria[2666]: 2024-06-10T15:05:47Z FATAL failed to load server config {"error": "invalid config: listen: lookup udp/443#监听端口: unknown port"}
Jun 10 15:05:47 C20240609102115 systemd[1]: hysteria-server.service: Main process exited, code=exited, status=1/FAILURE
Jun 10 15:05:47 C20240609102115 systemd[1]: hysteria-server.service: Failed with result 'exit-code'.
root@C20240609102115:~#

这个问题怎么解决?求帮助

@haruue
Copy link
Collaborator

haruue commented Jun 10, 2024

Jun 10 15:05:47 C20240609102115 hysteria[2666]: 2024-06-10T15:05:47Z FATAL failed to load server config {"error": "invalid config: listen: lookup udp/443#监听端口: unknown port"}

你的配置文件里面有这样一行

listen: :443#监听端口

你删掉了 #监听端口 前面的空格, 导致了这个问题, 请在 #监听端口 这个注释前添加空格, 或者干脆删掉这个注释

listen: :443#监听端口         # 报错
listen: :443 #监听端口        # OK
listen: :443                 # OK

@tanggo-why
Copy link
Author

@haruue 我说怎么一开始的时候可以呢,闹了一个大笑话!非常感谢!爱了爱了!请收下我的膝盖!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants