[GH-ISSUE #1678] Error: timed out waiting for llama runner to start #944

Closed
opened 2026-04-12 10:38:41 -05:00 by GiteaMirror · 18 comments
Owner

Originally created by @LegendNava on GitHub (Dec 22, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1678

Originally assigned to: @dhiltgen on GitHub.

Was trying out dolphin-mixtral. Downloaded successfully but:

Screenshot from 2023-12-23 00-57-15

Does anything seem off? What should i do in this situation

I'm on Ubuntu 20.24, Intel i3 6th Gen.

Originally created by @LegendNava on GitHub (Dec 22, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1678 Originally assigned to: @dhiltgen on GitHub. Was trying out dolphin-mixtral. Downloaded successfully but: ![Screenshot from 2023-12-23 00-57-15](https://github.com/jmorganca/ollama/assets/74506040/d796a0bb-15fc-4401-8c4f-7442502fd02c) Does anything seem off? What should i do in this situation I'm on Ubuntu 20.24, Intel i3 6th Gen.
Author
Owner

@vtrenton commented on GitHub (Dec 23, 2023):

what does the server stdout say?

<!-- gh-comment-id:1868219123 --> @vtrenton commented on GitHub (Dec 23, 2023): what does the server stdout say?
Author
Owner

@LegendNava commented on GitHub (Dec 23, 2023):

what does the server stdout say?

I don't exactly know what you mean; I'm kind of new to this and wanted to test some things out. Could you say what I should do to get those readings?

<!-- gh-comment-id:1868245329 --> @LegendNava commented on GitHub (Dec 23, 2023): > what does the server stdout say? I don't exactly know what you mean; I'm kind of new to this and wanted to test some things out. Could you say what I should do to get those readings?
Author
Owner

@vtrenton commented on GitHub (Dec 23, 2023):

no worries - when you type ollama serve there should be some output on the command line that looks like this.

couldn't find '/root/.ollama/id_ed25519'. Generating new private key.
Your new public key is:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3jcbgAwFZsYmBr7CC2uZt+ewC+6Qcdfn8p2qZtg+UD

2023/12/23 10:02:04 images.go:737: total blobs: 0
2023/12/23 10:02:04 images.go:744: total unused blobs removed: 0
2023/12/23 10:02:04 routes.go:895: Listening on [::]:11434 (version 0.1.17

on your picture you can see when you ran ollama serve it gave you this message:

address already in use

This means something else is using the same port as the ollama port (11434)
likely this is another ollama serve in a different window.

if you're having trouble finding this other server running - you can find the pid and kill the process manually. a quick way to find this is to grep for the socket in ss:

$ sudo ss -tunpl | grep 11434
tcp   LISTEN 0      4096                *:11434            *:*    users:(("exe",pid=211384,fd=12))

you should see a 'pid' like in the example above - then kill it with kill $pid

once you're sure ollama serve is not running on the system (sudo ss -tunpl | grep 11434 returns nothing) then open a fresh new terminal window and run ollama serve this window is your server so anything in this window will be server messages - this is the server stdout i was talking about above. keep this window open in the background and open a new terminal window to run ollama run dolphin-mixtral:latest if there are any errors go back to the other terminal with the server and see if anything logged on the server.

<!-- gh-comment-id:1868343935 --> @vtrenton commented on GitHub (Dec 23, 2023): no worries - when you type `ollama serve` there should be some output on the command line that looks like this. ``` couldn't find '/root/.ollama/id_ed25519'. Generating new private key. Your new public key is: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3jcbgAwFZsYmBr7CC2uZt+ewC+6Qcdfn8p2qZtg+UD 2023/12/23 10:02:04 images.go:737: total blobs: 0 2023/12/23 10:02:04 images.go:744: total unused blobs removed: 0 2023/12/23 10:02:04 routes.go:895: Listening on [::]:11434 (version 0.1.17 ``` on your picture you can see when you ran `ollama serve` it gave you this message: >address already in use This means something else is using the same port as the ollama port (11434) likely this is another `ollama serve` in a different window. if you're having trouble finding this other server running - you can find the pid and kill the process manually. a quick way to find this is to grep for the socket in ss: ``` $ sudo ss -tunpl | grep 11434 tcp LISTEN 0 4096 *:11434 *:* users:(("exe",pid=211384,fd=12)) ``` you should see a 'pid' like in the example above - then kill it with `kill $pid` once you're sure ollama serve is not running on the system (`sudo ss -tunpl | grep 11434` returns nothing) then open a fresh new terminal window and run `ollama serve` this window is your server so anything in this window will be server messages - this is the server stdout i was talking about above. keep this window open in the background and open a new terminal window to run `ollama run dolphin-mixtral:latest` if there are any errors go back to the other terminal with the server and see if anything logged on the server.
Author
Owner

@LegendNava commented on GitHub (Dec 24, 2023):

Thanks for the response; I tried what you said and heres the response:

Screenshot from 2023-12-24 20-02-13

It seems the "user" for that port is ollama itself; but it still dosent seem to work. I also can't kill the pid for some reason

<!-- gh-comment-id:1868530732 --> @LegendNava commented on GitHub (Dec 24, 2023): Thanks for the response; I tried what you said and heres the response: ![Screenshot from 2023-12-24 20-02-13](https://github.com/jmorganca/ollama/assets/74506040/457f7bbf-96f0-4e46-bf9b-3344783ffe96) It seems the "user" for that port is ollama itself; but it still dosent seem to work. I also can't kill the pid for some reason
Author
Owner

@vtrenton commented on GitHub (Dec 24, 2023):

ok awesome try just running the command sudo kill 1821 it looks like your current user doesnt have the permission to stop the program. So you'll have to elevate with the sudo command. you'll know it works when it doesn't return anything to the console and sudo ss - tunpl | grep 11434 no longer returns any output either. then just try running ollama serve again.

<!-- gh-comment-id:1868557772 --> @vtrenton commented on GitHub (Dec 24, 2023): ok awesome try just running the command `sudo kill 1821` it looks like your current user doesnt have the permission to stop the program. So you'll have to elevate with the sudo command. you'll know it works when it doesn't return anything to the console and `sudo ss - tunpl | grep 11434` no longer returns any output either. then just try running `ollama serve` again.
Author
Owner

@LegendNava commented on GitHub (Dec 24, 2023):

Screenshot from 2023-12-24 22-33-42

It seems ollama is automatically assigning itself a new PID every time...

<!-- gh-comment-id:1868559615 --> @LegendNava commented on GitHub (Dec 24, 2023): ![Screenshot from 2023-12-24 22-33-42](https://github.com/jmorganca/ollama/assets/74506040/14e439ac-36c1-4e57-8934-1ca8b9f791c2) It seems ollama is automatically assigning itself a new PID every time...
Author
Owner

@vtrenton commented on GitHub (Dec 24, 2023):

that's interesting... I have no idea why that could be happening try sudo killall ollama then check with sudo ss -tunpl | grep 11434 . if it restarts the service can you send a screenshot of pgrep -a ollama? Thanks!

<!-- gh-comment-id:1868561626 --> @vtrenton commented on GitHub (Dec 24, 2023): that's interesting... I have no idea why that could be happening try `sudo killall ollama` then check with `sudo ss -tunpl | grep 11434` . if it restarts the service can you send a screenshot of `pgrep -a ollama`? Thanks!
Author
Owner

@vtrenton commented on GitHub (Dec 24, 2023):

ok I figured it out - sorry for my confusion here. normally I run ollama from a podman container so the process is a bit different for me. The install script starts a systemd service (something that runs a program in the background) as per: https://github.com/jmorganca/ollama/blob/371bc73531ec107d597e5456dd84bc931e773a5b/scripts/install.sh#L85-L98

Can you confirm this by running systemctl status ollama? if its 'active/running' then that means systemd is whats running ollama. To view the logs for the running server you can use the journalctl command like this journalctl -xefu ollama you can start and stop the service with sudo systemctl start ollama and sudo systemctl stop ollama respectively.

<!-- gh-comment-id:1868564661 --> @vtrenton commented on GitHub (Dec 24, 2023): ok I figured it out - sorry for my confusion here. normally I run ollama from a podman container so the process is a bit different for me. The install script starts a systemd service (something that runs a program in the background) as per: https://github.com/jmorganca/ollama/blob/371bc73531ec107d597e5456dd84bc931e773a5b/scripts/install.sh#L85-L98 Can you confirm this by running `systemctl status ollama`? if its 'active/running' then that means systemd is whats running ollama. To view the logs for the running server you can use the journalctl command like this `journalctl -xefu ollama` you can start and stop the service with `sudo systemctl start ollama` and `sudo systemctl stop ollama` respectively.
Author
Owner

@LegendNava commented on GitHub (Dec 24, 2023):

Yess after typing systemctl status ollama it shows active (running)

Screenshot from 2023-12-25 00-16-16

So now i stop the ollama using sudo systemctl stop ollama and type in ollama serve and restart from the beginning?
Thanks so much for the help!

<!-- gh-comment-id:1868575657 --> @LegendNava commented on GitHub (Dec 24, 2023): Yess after typing `systemctl status ollama` it shows active (running) ![Screenshot from 2023-12-25 00-16-16](https://github.com/jmorganca/ollama/assets/74506040/7b34eb04-b28f-4cf4-bf67-f75ce7221664) So now i stop the ollama using `sudo systemctl stop ollama` and type in `ollama serve` and restart from the beginning? Thanks so much for the help!
Author
Owner

@vtrenton commented on GitHub (Dec 24, 2023):

So now i stop the ollama using sudo systemctl stop ollama and type in ollama serve and restart from the beginning?
Thanks so much for the help!

you don't need to do that - I just wanted to show how to start and stop it :). Instead - open a terminal window and get the logs for the server service with journalctl -xefu ollama this will print the server logs to the terminal. Then in another window run something like ollama run dolphin-mixtral:latest if there is an error from that command look at the logs in the server log window and post here if needed.

<!-- gh-comment-id:1868576529 --> @vtrenton commented on GitHub (Dec 24, 2023): >So now i stop the ollama using sudo systemctl stop ollama and type in ollama serve and restart from the beginning? Thanks so much for the help! you don't need to do that - I just wanted to show how to start and stop it :). Instead - open a terminal window and get the logs for the server service with `journalctl -xefu ollama` this will print the server logs to the terminal. Then in another window run something like `ollama run dolphin-mixtral:latest` if there is an error from that command look at the logs in the server log window and post here if needed.
Author
Owner

@vtrenton commented on GitHub (Dec 24, 2023):

try ollama run dolphin-mixtral:latest instead of ollama run dolphin:mixtral:latest

<!-- gh-comment-id:1868576628 --> @vtrenton commented on GitHub (Dec 24, 2023): try `ollama run dolphin-mixtral:latest` instead of `ollama run dolphin:mixtral:latest`
Author
Owner

@LegendNava commented on GitHub (Dec 24, 2023):

Thanks! That worked hahaha it seems to be redownloading dolphin rn

<!-- gh-comment-id:1868576672 --> @LegendNava commented on GitHub (Dec 24, 2023): Thanks! That worked hahaha it seems to be redownloading dolphin rn
Author
Owner

@LegendNava commented on GitHub (Dec 24, 2023):

Yeppp i realised my mistake and deleted that comment. Thanks so much!

<!-- gh-comment-id:1868576717 --> @LegendNava commented on GitHub (Dec 24, 2023): Yeppp i realised my mistake and deleted that comment. Thanks so much!
Author
Owner

@vtrenton commented on GitHub (Dec 25, 2023):

Hope you got this working. Some information reguarding how this works:
When Ollama is installed on Linux it sets up a 'Service' that allows ollama to run ollama serve in the background. You can interact with the service using the following commands:

journalctl -u ollama - print out the logs for the ollama server

systemctl stop ollama - stop ollama from running in the background
systemctl disable ollama - disable ollama from running at system startup
systemctl disable --now ollama - stop ollama running in the background AND disable the service from running at startup

systemctl start ollama - start the ollama service in the background
systemctl enable ollama - enable the service to run on system startup
systemctl enable --now ollama - start ollama running in the background AND enable the service on system startup

if you have issues getting ollama working it's useful to have the client errors AND the logs from the server itself. Hope this helps out!

<!-- gh-comment-id:1868713495 --> @vtrenton commented on GitHub (Dec 25, 2023): Hope you got this working. Some information reguarding how this works: When Ollama is installed on Linux it sets up a 'Service' that allows ollama to run `ollama serve` in the background. You can interact with the service using the following commands: `journalctl -u ollama` - print out the logs for the ollama server `systemctl stop ollama` - stop ollama from running in the background `systemctl disable ollama` - disable ollama from running at system startup `systemctl disable --now ollama` - stop ollama running in the background AND disable the service from running at startup `systemctl start ollama` - start the ollama service in the background `systemctl enable ollama` - enable the service to run on system startup `systemctl enable --now ollama` - start ollama running in the background AND enable the service on system startup if you have issues getting ollama working it's useful to have the client errors AND the logs from the server itself. Hope this helps out!
Author
Owner

@LegendNava commented on GitHub (Dec 25, 2023):

Thank you! Quick question- does the model redownload itself every time you run it?

<!-- gh-comment-id:1868784715 --> @LegendNava commented on GitHub (Dec 25, 2023): Thank you! Quick question- does the model redownload itself every time you run it?
Author
Owner

@LegendNava commented on GitHub (Dec 25, 2023):

The same thing happened again :(

<!-- gh-comment-id:1868847876 --> @LegendNava commented on GitHub (Dec 25, 2023): The same thing happened again :(
Author
Owner

@dhiltgen commented on GitHub (Jan 27, 2024):

@LegendNava if you're still seeing the problem, can you upgrade to the latest version (0.1.22) and share the server logs?

https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues

<!-- gh-comment-id:1912885824 --> @dhiltgen commented on GitHub (Jan 27, 2024): @LegendNava if you're still seeing the problem, can you upgrade to the latest version (0.1.22) and share the server logs? https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues
Author
Owner

@dhiltgen commented on GitHub (Mar 12, 2024):

If you're still having problems after upgrading, please share your server log.

<!-- gh-comment-id:1992246373 --> @dhiltgen commented on GitHub (Mar 12, 2024): If you're still having problems after upgrading, please share your server log.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#944