#500 from API with nothing in logs

45 messages · Page 1 of 1 (latest)

gusty canyon
#

Hi! I was working on the API (specifically /api/client/servers/x/resources) but when trying to request it, I get a 500 back. There is nothing in (install location)/storage/logs/laravel-2023-10-11.log. I'm doing the API request with a pterodactyl_session cookie but progrematically using Golang. (It's complicated but I need to do it that way)

fallen yarrow
gusty canyon
#

Like I said, I need to do it this way. And there is no reason it wouldn't work anyway?

fallen yarrow
gusty canyon
fallen yarrow
gusty canyon
fallen yarrow
#

als this is for #api-and-modding

gusty canyon
#

Um so Automod doesn't like my message with the request..

#

Yeah they expire, and that is behavior I want in my application. My request is as simple as this:

curl 
  --request GET   
  --url http://localhost:2001/api/client/servers/1aa80c68-84fb-403a-8421-630d35818e61/resources   
  --header 'Accept: application/json'   
  --header 'Cookie: [pterodactyl session cookie redacted]'
#

It did not like pterodactyl _ session

gusty canyon
fallen yarrow
#

the Cookie is not realy a header it is a cookie zo in curl that is -b or --cookie not --header

gusty canyon
#

Yeah but cookies are passed as headers to a server? You can send it like that but you can also just use a header.

#

But sure. I'll use --cookie for you.

#

Still 500.

fallen yarrow
gusty canyon
#

And if that were the issue, it should've been a 400 or 401 anyway.

fallen yarrow
#

something is wrong on the panel side

gusty canyon
#
[perny@fedora ~]$ cat /home/perny/Documents/pterodactyl/storage/logs/laravel-2023-10-11.log
[perny@fedora ~]$ 
fallen yarrow
#

I get that the log file is empty no worry

gusty canyon
fallen yarrow
#

you run a lot of non default stufff,n non default ports , not default pterodactyl path.

and the panel itself functions fine?

#

what users owns the storage folder?

gusty canyon
gusty canyon
#

And it's just my workstation Fedora so I just put in Documents.

fallen yarrow
gusty canyon
#

No. The docs tell you it needs to be 775.

fallen yarrow
#

My bet someone will know in #api-and-modding

but you run

  • in a non default dir
  • on a non default port
  • folder is not owned by the webserver user ( bad for sequrity)
  • on a not supported os
gusty canyon
#

I just set it to 777 since there is nothing to execute anyway.

gusty canyon
fallen yarrow
#

but try in #api-and-modding , as that there no logs that is just strange

gusty canyon
fallen yarrow
# gusty canyon

I saw that no worry's I have installed the panel many times

gusty canyon
#

But doesn't seem like you understand what's under the hood. I'll move to api and modding.

fallen yarrow
#

I get it, you make an api request to the resource endpoint and it return 500, so 40x = you made a mistake, 500 = server made a mistake

so something is wrong on the server side.

1 last thing, habe you tryed using the short uuid
so for example
"identifier": "1a7ce997",
"internal_id": "1a7ce997-259b-452e-8b4e-cecc464142ca",

have you tryed using 1a7ce997 instad of 1a7ce997-259b-452e-8b4e-cecc464142ca

so for you 1aa80c68

gusty canyon
gusty canyon
#

also it's 4xx and 5xx not 40x since there are more than 10 client side errors :)

#

But I might've possibly found the issue. Wings currently cannot contact Pterodactyl (only the other way around) due to an issue with my infrastructure. That could be the reason for the error.