Comments (10)
Thank yourself, for being truly open to the community and what it has to offer.
There are way too many 'opensource' projects which are, really, only 'open' on the surface.
For the benefit of all, we shall keep innovating!
from webp_server_go.
I believe it has to do with the kernel you are currently using not allowing the capabilities stated in the service file.
First make sure all is well stopped and ready for modifications and a clean start
systemctl stop webps
Then, comment the following line, in webps.service
AmbientCapabilities=CAP_NET_BIND_SERVICE
And of course, this is followed by a reaload of systemd stuff with
systemctl daemon-reload
and an attempt at restarting your server.
systemctl start webps
If the previous worked, probably you would benefit from running a newer kernel on the machine you are using and if it is out of the question, you could keep running it with the line commented, providing it is not causing any issues that you can see.
This is of course a temporary fix as the service file would likely be overwritten by a future update with a package manager (obviously, you control that when installing manually, right).
For a more permanent solution, you could create a override file with
systemctl edit webps
and adding the following content
[Service]
AmbientCapabilities=
which would in fact nullify whatever value it had in the original service unit file.
from webp_server_go.
@noangel2014
I'm doing it fine with non-root user. Ubuntu 18.04 kernel 5.3.0-42-generic. Please inform us with your kernel version, user, owner of files. Bellow is an example. As @mathieu-aubin suggests, it could be kernel capabilities.
☺ ll
total 14M
-rw-rw-r-- 1 benny benny 160 Mar 11 19:32 config.json
drwxrwxr-x 2 benny benny 4.0K Mar 11 19:32 pics
-rwxrwxr-x 1 benny benny 14M Mar 11 19:28 webp-server
-rw-rw-r-- 1 benny benny 391 Mar 11 19:30 webps.service
/opt/webps
☺ cat /lib/systemd/system/webps.service
[Unit]
Description=WebP Server Go
Documentation=https://github.com/webp-sh/webp_server_go
After=nginx.target
[Service]
Type=simple
StandardError=journal
AmbientCapabilities=CAP_NET_BIND_SERVICE
WorkingDirectory=/opt/webps
ExecStart=/opt/webps/webp-server --config /opt/webps/config.json
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target
/opt/webps
☺ whoami
benny
☺ uname -a
Linux home 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
from webp_server_go.
I believe it has to do with the kernel you are currently using not allowing the capabilities stated in the service file.
First make sure all is well stopped and ready for modifications and a clean start
systemctl stop webps
Then, comment the following line, in webps.service
AmbientCapabilities=CAP_NET_BIND_SERVICE
And of course, this is followed by a reaload of systemd stuff with
systemctl daemon-reload
and an attempt at restarting your server.
systemctl start webps
If the previous worked, probably you would benefit from running a newer kernel on the machine you are using and if it is out of the question, you could keep running it with the line commented, providing it is not causing any issues that you can see.
This is of course a temporary fix as the service file would likely be overwritten by a future update with a package manager (obviously, you control that when installing manually, right).
For a more permanent solution, you could create a override file with
systemctl edit webps
and adding the following content
[Service] AmbientCapabilities=
which would in fact nullify whatever value it had in the original service unit file.
Hello, I have run successfully according to your help
[Service]
AmbientCapabilities=
I don't know why, but it's done. Thank you
from webp_server_go.
Thanks Mathieu, for your kindly support!
from webp_server_go.
Hi, could you try systemctl status webps.service -l
and post the full output here?
from webp_server_go.
Hi, could you please tell us which OS you're using? If it is CentOS, is SELinux enabled? And please paste all the service file's content.
from webp_server_go.
As per linux kernel capabilities
... Ambient capabilities were established in k4.3+
Ambient (since Linux 4.3)
Again, what kernel version are you running?
from webp_server_go.
@noangel2014
I'm doing it fine with non-root user. Ubuntu 18.04 kernel 5.3.0-42-generic. Please inform us with your kernel version, user, owner of files. Bellow is an example. As @mathieu-aubin suggests, it could be kernel capabilities.☺ ll total 14M -rw-rw-r-- 1 benny benny 160 Mar 11 19:32 config.json drwxrwxr-x 2 benny benny 4.0K Mar 11 19:32 pics -rwxrwxr-x 1 benny benny 14M Mar 11 19:28 webp-server -rw-rw-r-- 1 benny benny 391 Mar 11 19:30 webps.service /opt/webps ☺ cat /lib/systemd/system/webps.service [Unit] Description=WebP Server Go Documentation=https://github.com/webp-sh/webp_server_go After=nginx.target [Service] Type=simple StandardError=journal AmbientCapabilities=CAP_NET_BIND_SERVICE WorkingDirectory=/opt/webps ExecStart=/opt/webps/webp-server --config /opt/webps/config.json ExecReload=/bin/kill -HUP $MAINPID Restart=always RestartSec=3s [Install] WantedBy=multi-user.target /opt/webps ☺ whoami benny ☺ uname -a Linux home 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@MyCloudServer ~]# uname -a
Linux MyCloudServer 3.10.0-229.7.2.el7.x86_64 #1 SMP Tue Jun 23 22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
I'm root, running in CentOS Linux release 7.7.1908 (core)
By the way, there's an error in the documentation
./webp-server -dump-systemd > /lib/systemd/system/webp-server.service
webp-server.service is error
./webp-server -dump-systemd > /lib/systemd/system/webp-server.service
from webp_server_go.
Glad this is resolved, happy to have helped
from webp_server_go.
Related Issues (20)
- Docker Run cannot take in more than one directories HOT 2
- Clarity of Documentation on Multipath HOT 2
- could NOT convert GIF to animated webp HOT 1
- Can not respon URL + "?response-content-type=application/octet-stream" correctly HOT 5
- Error while converting large images HOT 11
- The log cannot show the real IP of the client HOT 14
- should use filetype
- Does it have any fallback? HOT 1
- Webp v0.9.3 is consuming a lot of memory again HOT 13
- image not found for .svg extention HOT 5
- Bypass some file extensions HOT 3
- Variable Compression Size Depending on File Size HOT 6
- Checking if imageHeightWidthRatio is not zero before dividing HOT 2
- -dump-config flag does not work with Docker image HOT 2
- Empty file causes runtime error when it is expected to be a directory HOT 2
- Can't get webp_server_go work HOT 5
- Requests with too large headers fields are not logged HOT 4
- NEF image size is wrong and extra parameters are invalid HOT 5
- Delete older files from storage HOT 2
- Clear older files autometically HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webp_server_go.