Using Remote Requests #823
Replies: 12 comments 6 replies
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: What is the response that comes back from the second curl call? |
Beta Was this translation helpful? Give feedback.
-
Spacey wrote at Jul 23 2018 17:12:59 UTC: I don't get a response at all. The raw access token is printed and then the script ends. |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: And to make sure, your server actually isn't stopping? Can you pass -v to your curl so it pucks out the headers? We should be responding I think. |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: We also support the internal proxy, so you can try using http://DOMAIN/daemon/server/SERVER-UUID/stop as the URL for the curl and see if that works. |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: That response indicates it did send the stop to the server. Does the console on the server not reflect that? It should say "Stopping server" in it. |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: And using the "Stop" button works? That's effectively using the same call. Can you also test with the /start URL once you you stop it to see if it's accepted? You can also try to use /status to get the current status, that should output text. |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: Actually, looking at the code, it should not be returning an empty response if it's a 200. All calls should be returning |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: For giggles, can you curl (it's a GET) to http://DOMAIN:5656 What's the response? There's no auth to that endpoint as it's just effectively an "Am I There" type of call. |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: Interesting. You do run just one node correct? I had created the following PHP before which I had tested using my own panel installation: https://gist.github.com/LordRalex/2e90fc4d8f7544de4d42f9fc63ef8003 Something doesn't line up if you're getting a 200, but no response back with the other calls. /stats is also an endpoint which may have data, but it's hit and miss depending on the status. What about /logs? |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: I'm using Postman to validate endpoints are correct, and they are. You should have been getting the output from curl. Can you use pufferd --version for me? |
Beta Was this translation helpful? Give feedback.
-
LordRalex wrote at Jul 23 2018 17:12:59 UTC: Actually, I think I see the issue. It is not -H 'Authentication: Bearer ' It is It's not getting me a 200 like you're seeing though, but it's definitely going to fail the auth to the daemon. It does get you a 200 when it gets to the daemon, interesting. I'll have to look into that. Does not appear any data is leaking though. |
Beta Was this translation helpful? Give feedback.
-
Spacey wrote at Jul 23 2018 17:12:59 UTC: Yep
fixed it for me. I probably should have spotted this earlier, thanks again for your help. |
Beta Was this translation helpful? Give feedback.
-
Spacey wrote at Jul 23 2018 17:12:59 UTC:
Hello,
I have not had any luck so far trying to use remote requests. I am simply trying to remotely stop my server at the moment. So far the all of the oauth works correctly, and it's just the bottom line that doesn't return any response.
Not working:
Any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions