oxen-core
oxen-core copied to clipboard
Compatibility for OpenRC to manage oxen service node
MAINTAINERS: Squash using GItHub.
Fixes: https://github.com/oxen-io/loki-network/issues/1519 Transferred from: https://github.com/oxen-io/loki-network/pull/1520
This should also make it compatible with devuan https://www.devuan.org/, consider adding release.
The test can be seen working in https://github.com/Kreyren/loki-core/pull/1
Currently this isn't installing this init script with the oxend
package. I think it should be enough to rename it to debian/oxen-node.init
to have debhelper automatically notice and install it into /etc/init.d/oxen-node.
Oops, that name wasn't quite right and it needed an addition to the rules file; I pushed a commit to fix it.
Can you give the resulting debs a try and let me know if it works?
https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/
@jagerman Installation LGTM:
https://gist.github.com/Kreyren/6af81ca6f52c7862564c27fb0c983e6c
But the startup fails:
root@d6ef928b56a6:/# service oxen-node status
oxend is not running ... failed!
root@d6ef928b56a6:/# service oxen-node start
Starting oxen-node: oxend.
root@d6ef928b56a6:/# service oxen-node status
oxend is not running ... failed!
root@d6ef928b56a6:/# grep FATAL /var/log/oxen/oxen.log
2021-02-01 11:29:21.805 7fb5aeff9140 INFO logging contrib/epee/src/mlog.cpp:255 New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,serialization:FATAL,logging:INFO,msgwriter:INFO
2021-02-01 11:30:04.340 7fed916b8140 INFO logging contrib/epee/src/mlog.cpp:255 New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,serialization:FATAL,logging:INFO,msgwriter:INFO
2021-02-01 11:30:04.342 7fed916b8140 FATAL net contrib/epee/include/epee/net/abstract_tcp_server2.inl:958 Error starting server: Failed to bind IPv4 (set to required)
Which seems like configuration issue with the IP?
Quick dockerfile to reproduce the environment:
FROM debian:unstable
ENV DEBIAN_FRONTEND=noninteractive
RUN true \
&& apt-get update \
&& apt-get install --yes \
lsb-release curl \
&& curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg \
&& echo "deb https://deb.oxen.io $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/oxen.list \
&& apt-get update \
&& apt-get install --yes openrc \
&& curl -so "liboxen8.1.5_8.1.5-1_amd64.deb" "https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/liboxen8.1.5_8.1.5-1_amd64.deb" \
&& curl -so "oxend_8.1.5-1_amd64.deb" "https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/oxend_8.1.5-1_amd64.deb" \
&& apt-get install --yes ./liboxen8.1.5_8.1.5-1_amd64.deb ./oxend_8.1.5-1_amd64.deb \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& { service oxen-node status || true ;} \
&& { service oxen-node start || true ;} \
&& { service oxen-node status || true ;} \
&& { service oxen-node stop || true ;} \
&& { service oxen-node status || true ;}
That error generally means that an oxend is already running, bound to the p2p port. I suspect it is running already here via systemd?
That error generally means that an oxend is already running, bound to the p2p port. I suspect it is running already here via systemd?
It was running, but killing the oxend didn't help
https://gist.githubusercontent.com/Kreyren/ba2f330b4a18288f3b7f064c1bb26a86/raw/71e2770b37ff322543ec1ce1becb235b932d8834/gistfile1.txt
FWIW that looks to me as issue not relevant to the proposed OpenRC integration.
Quick dockerfile to reproduce the environment:
FROM debian:unstable ENV DEBIAN_FRONTEND=noninteractive RUN true \ && apt-get update \ && apt-get install --yes \ lsb-release curl \ && curl -so /etc/apt/trusted.gpg.d/oxen.gpg https://deb.oxen.io/pub.gpg \ && echo "deb https://deb.oxen.io $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/oxen.list \ && apt-get update \ && apt-get install --yes openrc \ && curl -so "liboxen8.1.5_8.1.5-1_amd64.deb" "https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/liboxen8.1.5_8.1.5-1_amd64.deb" \ && curl -so "oxend_8.1.5-1_amd64.deb" "https://oxen.rocks/jagerman/loki/devuan-ceres/deb-sid-20210130T222203Z-edb395a6d/oxend_8.1.5-1_amd64.deb" \ && apt-get install --yes ./liboxen8.1.5_8.1.5-1_amd64.deb ./oxend_8.1.5-1_amd64.deb \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* \ && { service oxen-node status || true ;} \ && { service oxen-node start || true ;} \ && { service oxen-node status || true ;} \ && { service oxen-node stop || true ;} \ && { service oxen-node status || true ;}
This is failing on the install of the downloaded archives, perhaps they are signed with a key I don't have?