FS#60943 - [v2ray] does not start

Attached to Project: Community Packages
Opened by Yuan Fu (casouri) - Saturday, 01 December 2018, 07:24 GMT
Last edited by Felix Yan (felixonmars) - Saturday, 23 November 2019, 12:36 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:

main: failed to read config file: /etc/v2ray/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/ext/tools/conf/command: failed to parse json config > v2ray.com/ext/tools/conf/serial: failed to parse json config > v2ray.com/ext/tools/conf: invalid field rule > v2ray.com/ext/tools/conf: failed to load GeoIP: private > v2ray.com/ext/tools/conf: failed to open file: geoip.dat > open /usr/bin/geoip.dat: no such file or directory

I fixed it by

ln -s /etc/v2ray/geoip.dat /usr/bin/geoip.dat

Additional info:
* package version(s) 4.7.0
* config and/or log files etc.


Steps to reproduce:

pacman -S v2ray
configure /etc/v2ray/config.json
v2ray -test
This task depends upon

Closed by  Felix Yan (felixonmars)
Saturday, 23 November 2019, 12:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  Moved files.
Comment by Felix Yan (felixonmars) - Thursday, 21 February 2019, 19:57 GMT
Please use `v2ray -config /etc/v2ray/config.json` instead, or more preferably the systemd service to start v2ray.
Comment by Liang Jiashuo (liangjs) - Friday, 08 March 2019, 13:08 GMT
Same issue here. Using `v2ray -config /etc/v2ray/config.json` or systemd does NOT help.
Pacman didn't put geoip.dat in a correct location, or v2ray should search for geoip.dat in /etc/v2ray instead of /usr/bin.

https://github.com/v2ray/v2ray-core/issues/1450
Comment by Felix Yan (felixonmars) - Friday, 08 March 2019, 13:18 GMT
The systemd service has specified V2RAY_LOCATION_ASSET which points the assets to /etc/v2ray. Please do take a look.
Comment by Whyme Lyu (5long) - Wednesday, 18 September 2019, 07:00 GMT
This could be fixed by setting the environment variable in a shell wrapper, like what code-oss does: https://git.archlinux.org/svntogit/community.git/tree/trunk/code.sh?h=packages/code

But on the other hand, this feels more like an upstream problem:

* With an empty `V2RAY_LOCATION_ASSET`, v2ray uses `/usr/bin` as the default value, which conflicts with Linux FHS. Asset files obviously doesn't fit in `/usr/bin`.
* Arch package has already provided a working systemd service w/ V2RAY_LOCATION_ASSET properly configured
* If any Arch user wants to run v2ray on their own, they could just copy / read the systemd service file and use it as a starting point. But "run a command and expect it to work" probably won't be true for any non-trivial software involving lots of configuration.

I suggest closing this issue and nudging the upstream to fix it.
Comment by Felix Yan (felixonmars) - Wednesday, 20 November 2019, 07:38 GMT
Please try again with:
-> v2ray 4.21.3-2
-> v2ray-domain-list-community 20191107.1-2
-> v2ray-geoip 20191119-1

I have moved the files to /usr/lib/v2ray and created symlinks to /usr/bin instead.

Loading...