Skip to content

self hosting, no route to host #275

@xxdesmus

Description

@xxdesmus

I am self hosting the hishtory server via Docker. Using this container: https://docs.linuxserver.io/images/docker-hishtory-server/ and postgres.

When I try to connect a MacOS laptop to the new server I get the following error:

hishtory init
Your current hishtory profile has saved history entries, are you sure you want to run `init` and reset?
Note: This won't clear any imported history entries from your existing shell
[y/N]y
Setting secret hishtory key to XXXXXXXXX
2025/01/03 21:25:54 hishtory v0.313 fatal error at github.com/ddworken/hishtory/client/cmd/install.go:89: failed to register device with backend: failed to GET http://192.168.7.134/api/v1/register?user_id=XXXXXXXX=&device_id=YYYYYYY: Get "http://192.168.7.134/api/v1/register?user_id=XXXXXXXX=&device_id=YYYYYYY": dial tcp 192.168.7.134:80: connect: no route to host

even though I am can reach the IP without issue otherwise:

sudo mtr -r 192.168.7.134
Start: 2025-01-03T21:25:59-0800
HOST: XXXXXX                  Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 192.168.7.134              0.0%    10   10.6  10.8   8.3  15.9   2.3

The server is set as follows:

export HISHTORY_SERVER=http://192.168.7.134

echo $HISHTORY_SERVER
http://192.168.7.134

I tried creating an internal DNS hostname as well (using Adblock Home) and it also fails.

export HISHTORY_SERVER=http://hishtory.local

hishtory init
Your current hishtory profile has saved history entries, are you sure you want to run `init` and reset?
Note: This won't clear any imported history entries from your existing shell
[y/N]y
Setting secret hishtory key to XXXXXXXXX
2025/01/03 21:30:49 hishtory v0.313 fatal error at github.com/ddworken/hishtory/client/cmd/install.go:89: failed to register device with backend: failed to GET http://hishtory.local/api/v1/register?user_id=XXXXXXXX=&device_id=YYYYYYY: Get "http://hishtory.local/api/v1/register?user_id=XXXXXXXX&device_id=YYYYYYY": dial tcp: lookup hishtory.local: no such host

even though the hishtory.local value can be correctly resolved via the DNS resovler.

dig hishtory.local

; <<>> DiG 9.10.6 <<>> hishtory.local
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32107
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;hishtory.local.			IN	A

;; ANSWER SECTION:
hishtory.local.		10	IN	A	192.168.7.134

;; Query time: 42 msec
;; SERVER: 192.168.7.240#53(192.168.7.240)
;; WHEN: Fri Jan 03 21:31:19 PST 2025
;; MSG SIZE  rcvd: 48

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions