Hey folk,
I’m working on snapping Lighttpd (web server) and I’ve come to a halt.
The snap apps / command
is defined as a simple deamon so it should just run without issues once installed. Which it does, without actually serving up the directory defined in the config file.
Snapcraft reports no issues, and the snap installs without issues. If I try to run the deamon via snap start lighttpd
it happily reports back started
. Yet it does not serve up anything.
If I manually run the binary inside the snap using
/snap/lighttpd/current/usr/bin/lighttpd -m /snap/lighttpd/x1/usr/local/lib/ -f /var/snap/lighttpd/common/config/lighttpd.conf
it serves up the static test site without issues (to localhost:3080). So it seems like there’s no problem with the config file for the server itself, nor the binary.
Anyone have any pointers as to what I’m missing?
Have included a quick info dump and the full YAML for the project below.
Snap logs / services dump
kjell@utviklerpc:~$ sudo snap start lighttpd
Started.
kjell@utviklerpc:~$ sudo snap services
Service Startup Current Notes
conftest.hellod enabled inactive -
lighttpd.lighttpd enabled inactive -
lxd.activate enabled inactive -
lxd.daemon enabled active socket-activated
multipass.multipassd enabled active -
kjell@utviklerpc:~$ sudo snap logs lighttpd
2021-11-19T12:46:18Z systemd[1]: snap.lighttpd.lighttpd.service: Failed with result 'exit-code'.
2021-11-19T12:46:18Z systemd[1]: snap.lighttpd.lighttpd.service: Scheduled restart job, restart counter is at 5.
2021-11-19T12:46:18Z systemd[1]: Stopped Service for snap application lighttpd.lighttpd.
2021-11-19T12:46:18Z systemd[1]: snap.lighttpd.lighttpd.service: Start request repeated too quickly.
2021-11-19T12:46:18Z systemd[1]: snap.lighttpd.lighttpd.service: Failed with result 'exit-code'.
2021-11-19T12:46:18Z systemd[1]: Failed to start Service for snap application lighttpd.lighttpd.
2021-11-19T12:47:28Z systemd[1]: Started Service for snap application lighttpd.lighttpd.
2021-11-19T12:47:28Z systemd[1]: snap.lighttpd.lighttpd.service: Succeeded.
2021-11-19T12:50:55Z systemd[1]: Started Service for snap application lighttpd.lighttpd.
2021-11-19T12:50:55Z systemd[1]: snap.lighttpd.lighttpd.service: Succeeded.
full snapcraft.yaml
name: lighttpd
base: core20
version: '1.4.61'
summary: Lighttpd, the light, fast and secure webserver.
description: |
<removed for brevity>
grade: devel
confinement: devmode
apps:
lighttpd:
command: usr/bin/lighttpd -m $SNAP/usr/local/lib/ -f $SNAP_COMMON/config/lighttpd.conf
daemon: simple
plugs: [network, network-bind, removable-media]
parts:
lighttpd:
plugin: autotools
source: src/lighttpd1.4 # from https://git.lighttpd.net/lighttpd/lighttpd1.4.git
build-packages:
- zlib1g
- zlib1g-dev
- git
- gcc
- autoconf
- automake
- libltdl-dev
- libtool
- m4
- libghc-regex-pcre-dev
- libpcre3-dev
- pkg-config
- openssl
stage-packages: # additional packages needed to use certain modules. see lighttpd docs.
- libpcre3-dev
- pkg-config
- openssl
- gamin
organize: # move binaries to bin from sbin
'usr/local/sbin/lighttpd': usr/bin/lighttpd
'usr/local/sbin/lighttpd-angel': usr/bin/lighttpd-angel
'lighttpd.conf': config/lighttpd.conf
lighttpd-config-files: # config files used by lighttpdf
plugin: dump
source: src/lighttpd1.4/doc/config/
stage:
- lighttpd.conf
- modules.conf
- conf.d/* # not working...
scripts: # wrapper/manager/... scripts -- not currently implemented/in use
plugin: dump
source: src/utility_scripts