[GH-ISSUE #2871] ollama serve run error #48265

Closed
opened 2026-04-28 07:29:17 -05:00 by GiteaMirror · 11 comments
Owner

Originally created by @songsh on GitHub (Mar 2, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2871

when i run ollama serve , error is:
Couldn't find '/home/wangbin/.ollama/id_ed25519'. Generating new private key.
Your new public key is:
xxxxxxxxx
Error: listen tcp 127.0.0.1:11434: bind: address already in use

when i run npm run dev ,error is:

chatbot-ollama@0.1.0 dev
next dev

sh: 1: next: not found

Originally created by @songsh on GitHub (Mar 2, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2871 when i run ollama serve , error is: Couldn't find '/home/wangbin/.ollama/id_ed25519'. Generating new private key. Your new public key is: xxxxxxxxx Error: listen tcp 127.0.0.1:11434: bind: address already in use when i run npm run dev ,error is: > chatbot-ollama@0.1.0 dev > next dev sh: 1: next: not found
Author
Owner

@zimeg commented on GitHub (Mar 3, 2024):

Hey @songsh! Are you trying to run the project at https://github.com/ivanfioravanti/chatbot-ollama? This error looks like you need to run npm ci before trying to npm run dev.

The port this runs on might also be taken by another process (maybe another Ollama server) but you can change this with the OLLAMA_HOST variable.

<!-- gh-comment-id:1975130291 --> @zimeg commented on GitHub (Mar 3, 2024): Hey @songsh! Are you trying to run the project at https://github.com/ivanfioravanti/chatbot-ollama? This error looks like you need to run `npm ci` before trying to `npm run dev`. The port this runs on might also be taken by another process (maybe another Ollama server) but you can [change this with the `OLLAMA_HOST` variable](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network).
Author
Owner

@pdevine commented on GitHub (Mar 4, 2024):

As @zimeg mentioned, you're already running an instance of ollama on port 11434. You shouldn't need to run a second copy of it.

<!-- gh-comment-id:1976003367 --> @pdevine commented on GitHub (Mar 4, 2024): As @zimeg mentioned, you're already running an instance of ollama on port 11434. You shouldn't need to run a second copy of it.
Author
Owner

@songsh commented on GitHub (Mar 4, 2024):

i found a server run on 11434 , when i kill the process, the server will rerun .
i want the server run on ip:port , OLLAMA_HOST=10.1.0.1:114XX OLLAMA_MODELS={PATH} OLLAMA_DEBUG=1 ollama serve
model path can not found

<!-- gh-comment-id:1976527673 --> @songsh commented on GitHub (Mar 4, 2024): i found a server run on 11434 , when i kill the process, the server will rerun . i want the server run on ip:port , OLLAMA_HOST=10.1.0.1:114XX OLLAMA_MODELS={PATH} OLLAMA_DEBUG=1 ollama serve model path can not found
Author
Owner

@pdevine commented on GitHub (Mar 4, 2024):

Are you running on Linux, Mac, or Windows? You'll need to change how ollama serve is being called when starting the server. There is a doc here which explains how to do that.

<!-- gh-comment-id:1977435823 --> @pdevine commented on GitHub (Mar 4, 2024): Are you running on Linux, Mac, or Windows? You'll need to change how `ollama serve` is being called when starting the server. There is a doc [here](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server) which explains how to do that.
Author
Owner

@songsh commented on GitHub (Mar 5, 2024):

linux

<!-- gh-comment-id:1977702536 --> @songsh commented on GitHub (Mar 5, 2024): linux
Author
Owner

@pdevine commented on GitHub (Mar 5, 2024):

Use the docs here to set the OLLAMA_HOST variable.

<!-- gh-comment-id:1977715975 --> @pdevine commented on GitHub (Mar 5, 2024): Use the docs [here](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux) to set the `OLLAMA_HOST` variable.
Author
Owner

@songsh commented on GitHub (Mar 8, 2024):

i found

<!-- gh-comment-id:1985188714 --> @songsh commented on GitHub (Mar 8, 2024): i found
Author
Owner

@pdevine commented on GitHub (Mar 8, 2024):

Going to close the issue. Feel free to keep commenting or reopen it.

<!-- gh-comment-id:1985233537 --> @pdevine commented on GitHub (Mar 8, 2024): Going to close the issue. Feel free to keep commenting or reopen it.
Author
Owner

@17Reset commented on GitHub (Mar 26, 2024):

When I change the server address for ollama, using the ollama list command on the command line brings up:
xxxl@xxx:~$ ollama list
Error: could not connect to ollama app, is it running?

<!-- gh-comment-id:2019851300 --> @17Reset commented on GitHub (Mar 26, 2024): When I change the server address for ollama, using the ollama list command on the command line brings up: xxxl@xxx:~$ ollama list Error: could not connect to ollama app, is it running?
Author
Owner

@17Reset commented on GitHub (Mar 26, 2024):

But if I use ollama serve, he still starts an IP address of 127.0.0.1

xxx@xxx:~$ ollama serve
time=2024-03-26T16:47:47.813+08:00 level=INFO source=images.go:806 msg="total blobs: 0"
time=2024-03-26T16:47:47.813+08:00 level=INFO source=images.go:813 msg="total unused blobs removed: 0"
time=2024-03-26T16:47:47.813+08:00 level=INFO source=routes.go:1110 msg="Listening on 127.0.0.1:11434 (version 0.1.29)"
<!-- gh-comment-id:2019852664 --> @17Reset commented on GitHub (Mar 26, 2024): But if I use ollama serve, he still starts an IP address of 127.0.0.1 ``` xxx@xxx:~$ ollama serve time=2024-03-26T16:47:47.813+08:00 level=INFO source=images.go:806 msg="total blobs: 0" time=2024-03-26T16:47:47.813+08:00 level=INFO source=images.go:813 msg="total unused blobs removed: 0" time=2024-03-26T16:47:47.813+08:00 level=INFO source=routes.go:1110 msg="Listening on 127.0.0.1:11434 (version 0.1.29)" ```
Author
Owner

@rlust commented on GitHub (Apr 9, 2024):

Same issue, I set env variable to my local ip address but it does not allow connection on local ip address.

<!-- gh-comment-id:2046079972 --> @rlust commented on GitHub (Apr 9, 2024): Same issue, I set env variable to my local ip address but it does not allow connection on local ip address.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48265