三大報錯
An error occurred during credentials validation: HTTPConnectionPool(host='host.docker.internal', port=11434): Max retries exceeded with url: /api/chat (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f26fc3c00b0>: Failed to resolve 'host.docker.internal' ([Errno -2] Name or service not known)"))
An error occurred during credentials validation: HTTPConnectionPool(host='192.168.1.100', port=11434): Max retries exceeded with url: /api/chat (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f26fc23ea80>, 'Connection to 192.168.1.100 timed out. (connect timeout=10)'))
An error occurred during credentials validation: HTTPConnectionPool(host='172.17.0.1', port=11434): Max retries exceeded with url: /api/chat (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f26fcbce660>: Failed to establish a new connection: [Errno 111] Connection refused'))
真服了!!!
按照大家搜的,一般都能解決,
首先確保 自己的不是回環。
sudo netstat -tuln | grep 11434
輸出為?? tcp 什么 127.0.0.1? 這個就不行
輸出為tcp6?????? 0????? 0 :::11434??????????????? :::*??????????????????? LISTEN??? ?
這個 就可以
先停止 參考https://zhuanlan.zhihu.com/p/23168996538
systemctl stop ollama
后啟動
OLLAMA_HOST=0.0.0.0 nohup ollama serve > ollama.log 2>&1 &
又是浪費5個小時的狗血經歷