Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After system reboot Hitch binds only to TCP v6 #381

Open
Benik3 opened this issue Oct 2, 2023 · 0 comments
Open

After system reboot Hitch binds only to TCP v6 #381

Benik3 opened this issue Oct 2, 2023 · 0 comments
Assignees

Comments

@Benik3
Copy link

Benik3 commented Oct 2, 2023

Hello.
I'm trying Hitch on SBC Unipi G100 using Debian 10 and Hitch 1.8.0 (compiled from master) for terminating http server (old one written in C).
I have the Hitch working, except that when I restart the SBC, Hitch binds only to TCP v6, not to v4. After manual restart of service it binds OK. In logs there are no errors.
Any idea?

/etc/hitch/hitch.conf

frontend = "[*]:443"
daemon = on
backend = "[127.0.0.1]:80"
pem-dir = "/etc/hitch/cert.d"
alpn-protos = "http/1.1"
user = unipi
syslog = on
log-level=2

/etc/systemd/system/hitch.service

[Unit]
Description=hitch
After=syslog.target network.target

[Service]
Type=forking
User=root
Group=root
Restart=on-failure
LimitNOFILE=131072
Environment="HITCH_OPTIONS=--config /etc/hitch/hitch.conf"
EnvironmentFile=-/etc/hitch/hitch.params
EnvironmentFile=-/etc/default/hitch
EnvironmentFile=-/etc/sysconfig/hitch
ExecStartPre=/usr/local/sbin/hitch -t $HITCH_OPTIONS
ExecStart=/usr/local/sbin/hitch --daemon $HITCH_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

journalctl -u hitch

Oct 02 10:47:19 G100-sn1112 systemd[1]: Starting hitch...
Oct 02 10:47:19 G100-sn1112 hitch[281]: Trying to initialize SSL contexts with your certificates
Oct 02 10:47:20 G100-sn1112 hitch[281]: {core} Note: no DH parameters found in /etc/hitch/cert.d/xxx.pem
Oct 02 10:47:20 G100-sn1112 hitch[281]: 20231002T104720.041502 [  281] {core} Note: no DH parameters found in /etc/hitch/cert.d/xxx.pem
Oct 02 10:47:20 G100-sn1112 hitch[281]: 20231002T104720.041952 [  281] {core} ECDH Initialized
Oct 02 10:47:20 G100-sn1112 hitch[281]: {core} ECDH Initialized
Oct 02 10:47:20 G100-sn1112 hitch[281]: hitch configuration looks ok.
Oct 02 10:47:20 G100-sn1112 hitch[289]: {core} hitch 1.8.0 starting
Oct 02 10:47:20 G100-sn1112 hitch[289]: {core} Using OpenSSL version 101010ef.
Oct 02 10:47:20 G100-sn1112 hitch[289]: 20231002T104720.117279 [  289] {core} hitch 1.8.0 starting
Oct 02 10:47:20 G100-sn1112 hitch[289]: 20231002T104720.117565 [  289] {core} Using OpenSSL version 101010ef.
Oct 02 10:47:20 G100-sn1112 hitch[289]: {core} Loading certificate pem files (1)
Oct 02 10:47:20 G100-sn1112 hitch[289]: 20231002T104720.139957 [  289] {core} Loading certificate pem files (1)
Oct 02 10:47:20 G100-sn1112 hitch[289]: {core} Note: no DH parameters found in /etc/hitch/cert.d/xxx.pem
Oct 02 10:47:20 G100-sn1112 hitch[289]: {core} ECDH Initialized
Oct 02 10:47:20 G100-sn1112 hitch[289]: 20231002T104720.145489 [  289] {core} Note: no DH parameters found in /etc/hitch/cert.d/xxx.pem
Oct 02 10:47:20 G100-sn1112 hitch[289]: 20231002T104720.145605 [  289] {core} ECDH Initialized
Oct 02 10:47:20 G100-sn1112 hitch[294]: {core} Listening on [::]:443
Oct 02 10:47:20 G100-sn1112 hitch[294]: {core} Process 0 online
Oct 02 10:47:20 G100-sn1112 hitch[293]: {core} hitch 1.8.0 initialization complete
Oct 02 10:47:20 G100-sn1112 systemd[1]: Started hitch.
Oct 02 10:47:20 G100-sn1112 hitch[294]: {core} Successfully attached to CPU #0
Oct 02 10:47:20 G100-sn1112 hitch[295]: {ocsp} Note: No OCSP responder URI found for cert /etc/hitch/cert.d/xxx.pem

netstat
image
After manual service restart
image

@daghf daghf self-assigned this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants