FS#64605 - [v2ray-domain-list-community] geosite.dat installed to /usr/lib, while v2ray looks in /etc

Attached to Project: Community Packages
Opened by HaoCheng (tkit) - Friday, 22 November 2019, 02:13 GMT
Last edited by Toolybird (Toolybird) - Sunday, 05 February 2023, 06:48 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
v2ray goes to `/etc/v2ray/` for geosite.dat, but the geosite.dat file seems to have been installed to /usr/lib/v2ray/geosite.dat

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any
➜ v2ray pacman -Qi v2ray
Name : v2ray
Version : 4.21.3-3
Description : A platform for building proxies to bypass network restrictions
Architecture : armv7h
URL : https://github.com/v2ray/v2ray-core
Licenses : MIT
Groups : None
Provides : None
Depends On : glibc v2ray-domain-list-community v2ray-geoip
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 32.96 MiB
Packager : Arch Linux ARM Build System <builder+xu6@archlinuxarm.org>
Build Date : Thu 21 Nov 2019 04:48:19 AM UTC
Install Date : Fri 22 Nov 2019 02:00:21 AM UTC
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature

➜ v2ray pacman -Qi v2ray-domain-list-community
Name : v2ray-domain-list-community
Version : 20191121.1-1
Description : A list of domains to be used as geosites for routing purpose in Project V
Architecture : any
URL : https://github.com/v2ray/domain-list-community
Licenses : MIT
Groups : None
Provides : None
Depends On : None
Optional Deps : None
Required By : v2ray
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 519.16 KiB
Packager : Arch Linux ARM Build System <builder+xu4@archlinuxarm.org>
Build Date : Thu 21 Nov 2019 04:18:16 AM UTC
Install Date : Fri 22 Nov 2019 02:00:19 AM UTC
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature




Steps to reproduce:
1) systemctl start v2ray@xxxx.json

jounactl log:
Nov 22 02:01:42 alarmpi systemd[1]: Started V2Ray Service.
Nov 22 02:01:42 alarmpi v2ray[4997]: V2Ray 4.21.2 (V2Fly, a community-driven edition of V2Ray.) Custom
Nov 22 02:01:42 alarmpi v2ray[4997]: A unified platform for anti-censorship.
Nov 22 02:01:42 alarmpi v2ray[4997]: main: failed to read config file: /etc/v2ray/client-settings-config.json > v2ray.com/core/main/json: failed to execute v2ctl to convert config file. > v2ray.com/core/common/platform/ctlcmd: failed to execute v2ctl: v2ray.com/core/infra/conf/command: failed to parse json config > v2ray.com/core/infra/conf/serial: failed to parse json config > v2ray.com/core/infra/conf: invalid field rule > v2ray.com/core/infra/conf: failed to parse domain rule: geosite:category-ads-all > v2ray.com/core/infra/conf: failed to load geosite: CATEGORY-ADS-ALL > v2ray.com/core/infra/conf: failed to open file: geosite.dat > open /etc/v2ray/geosite.dat: no such file or directory
Nov 22 02:01:42 alarmpi v2ray[4997]: > exit status 255
Nov 22 02:01:42 alarmpi systemd[1]: v2ray@client-settings-config.service: Main process exited, code=exited, status=23/n/a
Nov 22 02:01:42 alarmpi systemd[1]: v2ray@client-settings-config.service: Failed with result 'exit-code'.
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 05 February 2023, 06:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  Reporter says " ". Assuming this was fixed upstream a while back.
Comment by HaoCheng (tkit) - Friday, 22 November 2019, 02:18 GMT
Forget to fill the summary, where can I modify this?

v2ray runs properly with `v2ray -config xxx.json`, but it fails with systemd
Comment by HaoCheng (tkit) - Friday, 22 November 2019, 02:43 GMT
commenting the Enviroment line in systemd file can fix this

[Unit]
Description=V2Ray Service
After=network.target
Wants=network.target

[Service]
Type=simple
PIDFile=/var/run/v2ray-%i.pid
# Environment=V2RAY_LOCATION_ASSET=/etc/v2ray
ExecStart=/usr/bin/v2ray -config /etc/v2ray/%i.json
Restart=on-failure
# Don't restart in the case of configuration error
RestartPreventExitStatus=23
LimitNPROC=500
LimitNOFILE=1000000

[Install]
WantedBy=multi-user.target

Loading...