-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unable to get anything with REST API #588
Comments
Did you add the IP as well in the config entry ( |
@Repflez If I set the ip:port like your example, the HTTP server don't start at all. (same if the server is run in admin or not) Edit: I have also tested "HTTPListen": ["127.0.0.1", 3421] and only port number like suggested in the comment in config.json file |
My config.json has the line What happens when you set HTTPListen to [3421] in your config.json, run the server, and then in a separate terminal, run |
I got this:
And nothing else What -vvv mean? |
There was a bug a while ago that caused HTTP requests to hang, but I believe this was fixed in a more recent release. Which version of newserv are you using? |
I use the last released one (2024-11-11) |
@nynjardin Your endpoint is not returning a valid response. Here is an example of what a valid request to the API looks like via curl.
I have the following set: In your newserv.log you should have something like this indicating a successful startup of the HTTP service: As well as this when you successfully hit it: You can also perform a netstat to ensure the service is up and listening:
|
I don't have this result at all, and sometime, if I perform this command only, the server crash (1 time of 5 maybe) if I wait to much to do ctrl+c in the console who try the curl command. |
I've never seen the application do that. Ever. So you should likely recompile from the latest git source, and ensure your permissions are good on the newserv server directory path and give it a try again. I would avoid reusing any config files you had lying around and instead copy new ones from the live repo and use those with your adjustments. You'll know you did it right when you get similar output as I have shown above. |
The HTTP server apparently does not work on Windows due to a threading issue in Cygwin's libevent build that also affected the patch server in the past, and the HTTP server was never tested on Windows. I've applied the same fix to the HTTP server, but it still doesn't work very well. If you can, I'd recommend running newserv on Linux or macOS instead, since it's unlikely that it will be easy to fix this on Windows. |
Or if you have Windows 10 or better run it in WSL2 which actually Linux.
That's what I'd do if I didn't have a Linux server
…On Tue, 7 Jan 2025, 5:18 pm Martin Michelsen, ***@***.***> wrote:
The HTTP server apparently does not work on Windows due to a threading
issue in Cygwin's libevent build that also affected the patch server in the
past, and the HTTP server was never tested on Windows. I've applied the
same fix to the HTTP server, but it still doesn't work very well. If you
can, I'd recommend running newserv on Linux or macOS instead, since it's
unlikely that it will be easy to fix this on Windows.
—
Reply to this email directly, view it on GitHub
<#588 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUQFSGYWMF5RS7ZJBCFJL2JN5UXAVCNFSM6AAAAABUTQWO26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZUGU2TANBRGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@fuzziqersoftware Ok, I understand that it's "normal", thanks you for these information :) @insanemal Ok, I'll try to make a linux version you're way, if that not work, i'll create a linux VM Thanks everyone :) |
Describe the bug
I've tried to enable REST API without success, I can see the HTTP server is started in the console, but nothing happen when I try to get something.
To reproduce
1-Modifying config.json to enable HTTP server by adding a port in the [ ]
2-Launch the server and wait to the Ready
3-Try any REST endpoint
Additional context
In my case, I've tried multiple server on different computer. Even http://127.0.0.1:88/y/server don't works, so, it's not a firewall problem.
Thanks :)
The text was updated successfully, but these errors were encountered: