-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Nothing or 404 on port 8080,.. after seemingly working start #1938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
can you try:
or alse |
Thanks for the light-speed response on Easter Sunday. Was in bed seconds after bug rep. (Vienna time ;-) Just tried the bin with your curl on Ubuntu 22.04 latest and I think I saw some piper bug rep yday!? ┌───────────────────────────────────────────────────┐ 9:44AM INF Trying to load the model 'gpt-4' with all the available backends: llama-cpp, llama-ggml, gpt4all, bert-embeddings, rwkv, whisper, stablediffusion, tinydream, piper |
it seems it does not find gpt-4 model definition. Thank you |
Please forgive if I mix Windows & Docker and Ubuntu and bin, but didn't get to start Ubuntu and fell into Windows: docker run -p 8088:8080 --gpus all --name local-ai -ti localai/localai:latest-aio-gpu-nvidia-cuda-12 Mind, I'm on 8088, cuz I was weary 8080 was taken (but, no). (base) c:\dl>curl http://127.0.0.1:8080/models (base) c:\dl>curl http://127.0.0.1:8088/models Models seem to be stored in the container, cuz every time I had to throw it away to remap ports it redownloaded the models. Your curl w localhost: Your curl w 127.0.0.1 http://127.0.0.1:8080 Chrome debug says Ubuntu bin side next mess. (abbrev. / pun) <helpless foolish grin> |
Ubuntu 22.04 bin
As expected models is empty here.
But interestingly the app reacts. So, this is the client side out:
Server side:
Compilation error? |
can you try to put this file in models directory and restart? |
BINGO!
So I'll put the rest of the yaml files. Thanks a ton! So, I got this running on Ubuntu. EDIT: localhost:8080 & 127.. still nogo. Same as Windows+Docker. Also: I got a MacBook Pro M3 Max 36GB. Should I try to compile an Apple Silicon version and upload? Thx again |
You seem to have overlooked that only a few of the curl sample commands work, but http://127.0.0.1:8080/ throws
on any platform, Windows Docker AiO and AVX-512 binary on Ubuntu and Ubuntu WSL in platform Chrome and other browsers. Interesting twist:
works with LocalAI Windows Docker as backend and WSL Ubuntu console! As mentioned above Windows cmd throws:
Regards |
Hi @ai-bits sorry for the late reply, from the quoted text it seems a curl error: are you sure that there are no spurious character in the request? |
No need to be sorry. Appreciate support from open source IAC, albeit had stopped looking, so it took some time from my side now.
Just tried again with the localai image from 2 weeks ago. I'm pretty sure no spurious chars there, especially no line-continuation chars. I have the cleaned-up string in a localai.md in vscode in a github repo file, cuz the sample in terminal-out had added line breaks and indentation.
The clip went here, into Windows Terminal cmd and WSL Ubuntu 22.04 bash and just now into PS. THE cmd SOLUTION IS IN THE NEXT MESSAGE PS threw `Invoke-WebRequest : Der Parameter "Headers" kann nicht gebunden werden. Der Wert "Content-Type: application/json" vom
Any hint there? I'll post this now and maybe try the latest image later. Just saw it got pushed to DockerHub hours ago. Also had hoped to switch on debug for the Linux binary I had installed on non-WSL / to-the-metal Ubuntu 22.04 to find out what's wrong with 127.0.0.1:8080, but didn't get around to it. No worries re timing. Got enuf 'AI' to 'play'. |
Hey man, Copilot just solved it! <rolling on the floor laughing and banging my head> Query: curl http://localhost:8080/embeddings -X POST -H "Content-Type: application/json" -d "{ "input": "Your text string goes here", "model": "text-embedding-ada-002" }" in cmd throws {"error":{"code":500,"message":"failed reading parameters from request:failed parsing request body: invalid character '\'' looking for beginning of value","type":""}}curl: (3) URL rejected: Port number was not a decimal number between 0 and 65535 Answer: The error message suggests that the command is not being parsed correctly. This is likely due to the use of single quotes (') in the JSON data part of the command. The Windows command prompt does not interpret single quotes the same way as Unix-like systems do. You should use double quotes (") instead, and escape the inner double quotes with a backslash (). Here's how you can modify the command:
This command should work correctly in the Windows command prompt. |
And here is the Copilot-adapted PS variant:
Made my day. |
Happy to hear that you finally fixed it. Shall the issue be closed? |
As you're outputting the usage / curl examples during model download I suggest you supplant the current Linux-only variant with the escaped one which works in bash and Windows cmd, i.e.
For the other curl example transforms / escaped ones you could employ Copilot. ;-) Dunno if you care to quote the PS variants somewhere as well. And then I asked for a solution for the 404 with 127.0.0.1:8080. No-go on all platforms.
Thanks |
Good catch. Why don't you open a PR? :) |
I'll pass along your suggestions to the AI Bits team. They will be responsible for making these changes in their code, as they are the maintainers of the project. You could also open a PR yourself if you have forked the repository, or you can open an issue to bring attention to these suggestions. For the 127.0.0.1:8080 issue, you might want to check if there is an entry in your hosts file that could be causing a conflict or if there are any network settings that could be interfering with the localhost connection. If the problem persists, I suggest reaching out to the AI Bits team or the community for further assistance. Please keep us updated on any progress or additional issues you encounter. |
The bot is a bit off, but, anyway.. curl embeddings on Linux worked and I'll have a fix / PR for Windows cmd and PS.
(amd64 emulation) and 'magically' http://127.0.0.1:8080/ worked there (browser GUI) w/ latest v2.12.4. EDIT: Verified on Mac, but guess will need escaping in Windows cmd and different arg names in PS. EDIT: On Windows just trashed the 40+GB LocalAI Docker image and the container including the models and the kitchen-sink to find out that the browser GUI DOES WORK now on Windows, but does nothing more but list the models and point to the docs. Any chance to decouple the model downloads from the container to have it survive a version update? Next up I'll retry http://127.0.0.1:8080/ using the binary on Ubuntu 22.04. Cheers |
I forked the repo for editing and a future pull request, but then I thought I'd better asked what to do / edit as there are 7 occurrences of curl for embeddings alone and then there is at least another one in localai.io/features/embeddings/ and github says the curl was fetched from the web page. The problem with the current examples: They are bash-only and that fact is hidden in markdown. How about putting a single-line (auto-wrapped) with (escaped) double quotes curl into the .yaml files to show in the logs? |
LocalAI version:
2.11.0
Environment, CPU architecture, OS, and Version:
Windows 11 latest, Xeon(R) w5-3435X, 256GB, 2x 20GB RTX 4000 NVIDIA-SMI 550.65 Driver Version: 551.86 CUDA Version: 12.4, Docker Desktop via WSL latest
Describe the bug
docker run -p 8088:8080 --gpus all --name local-ai -ti localai/localai:latest-aio-gpu-nvidia-cuda-12
netstat -a -n -o | findstr "8080" #or 8088 not used before start, then 8080 Docker & WSL
Looks a lot like (#720)
After startup says http://127.0.0.1:8080, but 8080 or 8088 or 0.0.0.0:.. return a 404,...
To Reproduce
see descr
Expected behavior
What would one expect?
Logs
Will try --debug
or
DEBUG=true` tomorrow; tried binary on Ubuntu 22.04 today but didn't get very farAdditional context
The text was updated successfully, but these errors were encountered: