You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Misc. bug: WebUI load of any model fails on >= b7352 if local host's ip is specified by external interface #17962
Works if ip is changed to 127.0.0.1, but I'd like to access it both locally and from other computers.
All models fail including:
(tiny) gemma-3-270m-it-UD-Q8_K_XL.gguf
(huge) Qwen3-Next-80B-A3B-Instruct-Q8_0.gguf
But they all work with 127.0.0.1...
First Bad Commit
b7352
Relevant log output
Both good and bad log:
srv setup_child_: notifying router server (port=8032) that model foo is ready
b7351 (and before) works, logging:
srv log_server_r: request: POST /models/status 192.168.7.246
b7352 (and after) fails while trying for 127.0.0.1 instead, logging:
srv setup_child_: failed to notify router server: Could not establish connection
Those messages come from setup_child_server() in tools/server/server-models.cpp:
SRV_INF("notifying router server (port=%d) that model %s is ready\n", router_port, name.c_str());
auto result = cli.send(std::move(req));if (result.error() != httplib::Error::Success) {
auto err_str = httplib::to_string(result.error());
SRV_ERR("failed to notify router server: %s\n", err_str.c_str());
exit(1); // force exit
}
It could be related to this line added near the top of the file:
#define CHILD_ADDR "127.0.0.1"
which is only used two places:
1) It seems to overwrite the ip from the commandline (which would do it)
2) Used in place of base_params.hostname (maybe?)
This is the first time I've looked at the code tho.
Reacted by Pascal, CeleryCrusher and Guillaume Lakano
I have encountered the same issue when TLS is enabled (--ssl-key-file key.pem --ssl-cert-file cert.crt --port 443). The startup log indicates that the router server still thinks it is HTTP instead of HTTPS:
main: router server is listening on http://127.0.0.1:443
@wbtek, should work if you do --host 0.0.0.0. But I understand the desire to specify an external IP.
The issue here is that the child cannot rely on accessing the router via the external IP. If it's 0.0.0.0, then it can assume the router is reachable at 127.0.0.1. The same cannot be said for 192.168.7.246, since the socket will not bind to 127.0.0.1. A quick fix may be to only change to 127.0.0.1 on --host 0.0.0.0, otherwise use the provided IP. The issue there is that we are now subject to how the OS applies firewall rules. A better fix is likely to open two sockets, one intended for local child-only traffic. Perhaps even better is a named socket (Linux) or named pipe (Windows).
@rtpt-erikgeiser these are two distinct problems, although they can overlap if you also define an external IP.
Even if http:// is corrected to https://, there may be an issue with cert validation unless you pass in your CA cert (for locally signed certs). So I think the solution may be the same as above, open a child-only socket with http and only TLS terminate at the edge. Disregard, you could validate against the provided cert.
@ngxson will have a better understanding of what needs to be done here.
Activity
rtpt-erikgeiser commentedon Dec 12, 2025
I have encountered the same issue when TLS is enabled (
--ssl-key-file key.pem --ssl-cert-file cert.crt --port 443). The startup log indicates that the router server still thinks it is HTTP instead of HTTPS:aldehir commentedon Dec 15, 2025
@wbtek, should work if you do
--host 0.0.0.0. But I understand the desire to specify an external IP.The issue here is that the child cannot rely on accessing the router via the external IP. If it's
0.0.0.0, then it can assume the router is reachable at127.0.0.1. The same cannot be said for192.168.7.246, since the socket will not bind to127.0.0.1. A quick fix may be to only change to127.0.0.1on--host 0.0.0.0, otherwise use the provided IP. The issue there is that we are now subject to how the OS applies firewall rules. A better fix is likely to open two sockets, one intended for local child-only traffic. Perhaps even better is a named socket (Linux) or named pipe (Windows).@rtpt-erikgeiser these are two distinct problems, although they can overlap if you also define an external IP.
Even ifDisregard, you could validate against the provided cert.http://is corrected tohttps://, there may be an issue with cert validation unless you pass in your CA cert (for locally signed certs). So I think the solution may be the same as above, open a child-only socket withhttpand only TLS terminate at the edge.@ngxson will have a better understanding of what needs to be done here.
wbtek commentedon Dec 15, 2025
Submitted PR to fix external facing ip addr.
allozaur commentedon Feb 23, 2026
Fixed with #18110