走近科学IT版:Windows里Ollama关闭后还在占用11434端口
走近科学IT版:Ollama关闭后还在占用11434端口
退出Ollama之后,再次启动Ollama服务,报错:
(py311) E:\ai\ollama>ollama serve
Error: listen tcp 127.0.0.1:11434: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
真的很奇怪哦,好像是ollama没有退干净.....
在windows下使用ps命令查看一下:
ps -W
发现果然有:35060 0 0 35060 ? 0 09:54:36 E:\ai\ollama\ollama.exe
kill这个进程:
kill -f 35060
再用ps -W 看一下,没有这个ollama的进程了。
再启动ollama服务就正常了:
ollama serve
ollama serve
2025/01/30 10:38:37 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:C:\\Users\\Admin\\.ollama\\models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES:]"
time=2025-01-30T10:38:37.831+08:00 level=INFO source=images.go:432 msg="total blobs: 5"
time=2025-01-30T10:38:37.839+08:00 level=INFO source=images.go:439 msg="total unused blobs removed: 0"
time=2025-01-30T10:38:37.844+08:00 level=INFO source=routes.go:1238 msg="Listening on 127.0.0.1:11434 (version 0.5.7)"
time=2025-01-30T10:38:37.847+08:00 level=INFO source=routes.go:1267 msg="Dynamic LLM libraries" runners="[cuda_v11_avx cuda_v12_avx rocm_avx cpu cpu_avx cpu_avx2]"
time=2025-01-30T10:38:37.847+08:00 level=INFO source=gpu.go:226 msg="looking for compatible GPUs"
time=2025-01-30T10:38:37.848+08:00 level=INFO source=gpu_windows.go:167 msg=packages count=2
time=2025-01-30T10:38:37.849+08:00 level=INFO source=gpu_windows.go:214 msg="" package=0 cores=6 efficiency=0 threads=12
time=2025-01-30T10:38:37.855+08:00 level=INFO source=gpu_windows.go:214 msg="" package=1 cores=6 efficiency=0 threads=12
time=2025-01-30T10:38:38.069+08:00 level=INFO source=gpu.go:318 msg="[0] CUDA GPU is too old. Compute Capability detected: 3.0"
time=2025-01-30T10:38:38.077+08:00 level=INFO source=gpu.go:392 msg="no compatible GPUs were discovered"
time=2025-01-30T10:38:38.078+08:00 level=INFO source=types.go:131 msg="inference compute" id=0 library=cpu variant=avx compute="" driver=0.0 name="" total="63.9 GiB" available="43.5 GiB"
time=2025-01-30T10:39:38.398+08:00 level=INFO source=download.go:175 msg="downloading 96c415656d37 in 16 292 MB part(s)"
[GIN] 2025/01/30 - 10:39:40 | 200 | 4.5804719s | 127.0.0.1 | POST "/api/pull"
[GIN] 2025/01/30 - 10:39:41 | 200 | 3.9032ms | 127.0.0.1 | GET "/api/tags"
[GIN] 2025/01/30 - 10:40:12 | 200 | 1.071074s | 127.0.0.1 | POST "/api/pull"