CXB - Core | DEBUG | Unknown POST endpoint /data, from 192.168.1.xxx to port 8080 #28

Closed
opened 2023-08-10 00:34:57 +00:00 by dadrewster569 · 20 comments

I've been trying to move my once working megaime setup to artemis with no success, for my Crossbeats setup.

My setup connects, but with yellow / green connection logo and within the networking tab in the service menu, I can connect to everything BUT the game server, I get a GAME SERVER BAD. Can't card into my profile as a result.

I've enabled debug logging in artemis and that's where I got the Unknown POST endpoint /data, from 192.168.1.153 to port 8080

I then enabled debug logging in my old megaime setup and I noticed I get something in my logs that looks related:

CXB | INFO | Rev SunriseS2 Request /data -> 10104/ServerState/ServerState

I'm assuming this request is being made from the game and megaime is able to properly handle it but not artemis. I haven't been able to figure out if this is just a missing route or if I have something misconfigured on my end.

I'm wondering if this call succeeds if I'll restore my setup back to a working state!

I've been trying to move my once working megaime setup to artemis with no success, for my Crossbeats setup. My setup connects, but with yellow / green connection logo and within the networking tab in the service menu, I can connect to everything BUT the game server, I get a `GAME SERVER BAD`. Can't card into my profile as a result. I've enabled debug logging in artemis and that's where I got the `Unknown POST endpoint /data, from 192.168.1.153 to port 8080` I then enabled debug logging in my old megaime setup and I noticed I get something in my logs that looks related: `CXB | INFO | Rev SunriseS2 Request /data -> 10104/ServerState/ServerState` I'm assuming this request is being made from the game and megaime is able to properly handle it but not artemis. I haven't been able to figure out if this is just a missing route or if I have something misconfigured on my end. I'm wondering if this call succeeds if I'll restore my setup back to a working state!
Collaborator

Hello

Did you double check the cxb.yaml file for the right port and SSL if you use that?

That error you saw is usually when the port isn't set right or if you have SSL enabled without an actual SSL

Hello Did you double check the cxb.yaml file for the right port and SSL if you use that? That error you saw is usually when the port isn't set right or if you have SSL enabled without an actual SSL
Author

Wow, thanks for the insane speed xD

within my cxb.yaml, I've left the port as what it was on default, but c hanged the hostname

server:
  enable: True
  loglevel: "debug"
  hostname: "192.168.1.64"
  ssl_enable: False
  port: 8082
  port_secure: 443
  ssl_cert: "cert/title.crt"
  ssl_key: "cert/title.key"

should I have not changed that from localhost?

Wow, thanks for the insane speed xD within my cxb.yaml, I've left the port as what it was on default, but c hanged the hostname ``` server: enable: True loglevel: "debug" hostname: "192.168.1.64" ssl_enable: False port: 8082 port_secure: 443 ssl_cert: "cert/title.crt" ssl_key: "cert/title.key" ``` should I have not changed that from `localhost`?
Collaborator

Well the logs you provided says it tried to reach port 8080 and not 8082 that you have binded in that cxb.yaml

Make sure the game tries to send a response to 8082 in that case instead of 8080

Well the logs you provided says it tried to reach port 8080 and not 8082 that you have binded in that cxb.yaml Make sure the game tries to send a response to 8082 in that case instead of 8080
Midorica added the
help wanted
cxb
labels 2023-08-10 00:56:31 +00:00
Author

Hmmm I'm not too sure how to pull that off. At first I was thinking I could just add a :8082 to my server IP in segatools.ini but that didn't yield anything, is there documentation on that somewhere?

Other things of note, the setup is identical on megaime, it was also configured to run on 8082 while functioning:

(megaime, cxb.yaml, not artemis')

server:
  enable: True
  loglevel: "log"
  hostname: "192.168.1.64"
  ssl_enable: False
  port: 8082
  port_secure: 443
  ssl_cert: "cert/title.crt"
  ssl_key: "cert/title.key"
Hmmm I'm not too sure how to pull that off. At first I was thinking I could just add a `:8082` to my server IP in `segatools.ini` but that didn't yield anything, is there documentation on that somewhere? Other things of note, the setup is identical on megaime, it was also configured to run on 8082 while functioning: (megaime, cxb.yaml, not artemis') ``` server: enable: True loglevel: "log" hostname: "192.168.1.64" ssl_enable: False port: 8082 port_secure: 443 ssl_cert: "cert/title.crt" ssl_key: "cert/title.key" ```
Author

Otherwise I can't just move it over to port 8080 as it'll conflict with the title server:

server:
  listen_address: "192.168.1.64"
  allow_user_registration: True
  allow_unregistered_serials: True
  name: "ARTEMiS"
  is_develop: True
  threading: False
  log_dir: "logs"

title:
  loglevel: "debug"
  hostname: "192.168.1.64"
  port: 8080
Otherwise I can't just move it over to port 8080 as it'll conflict with the title server: ``` server: listen_address: "192.168.1.64" allow_user_registration: True allow_unregistered_serials: True name: "ARTEMiS" is_develop: True threading: False log_dir: "logs" title: loglevel: "debug" hostname: "192.168.1.64" port: 8080 ```
Collaborator

there is no documentation on Crossbeats segatools, it wasn't by typing the port after the IP but something about title such as this

default=192.168.1.64
title=http://192.168.1.64:8082
there is no documentation on Crossbeats segatools, it wasn't by typing the port after the IP but something about title such as this ``` default=192.168.1.64 title=http://192.168.1.64:8082 ```
Author

I've added that to my segatools.ini, could I have outdated tools here if it wasn't already there or is that an optional add?

Good news and bad new. I no longer get the original issue!

Bad news... Now I get a builtins.TypeError: render_POST() missing 2 required positional arguments: 'version' and 'endpoint' error. Still same network status as before.

I've added that to my segatools.ini, could I have outdated tools here if it wasn't already there or is that an optional add? Good news and bad new. I no longer get the original issue! Bad news... Now I get a `builtins.TypeError: render_POST() missing 2 required positional arguments: 'version' and 'endpoint'` error. Still same network status as before.
Collaborator

Do you have better logs than just 1 line? troubleshooting anything without proper logs is not really doable

not sure about your tools, i always use SSL for this game on a cabinet

Do you have better logs than just 1 line? troubleshooting anything without proper logs is not really doable not sure about your tools, i always use SSL for this game on a cabinet
Author

I should have known better xD

Here's a more complete block:

[2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 Connected
[2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 wrote 3ea1753064002000000053444341000023010000413639453031413838383800
[2023-08-10 02:13:41] Aimedb | INFO | hello from 192.168.1.153
[2023-08-10 02:13:41] Aimedb | DEBUG | Response 3ea1873065002000010000000000000000000000000000000000000000000000
[2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 wrote 3ea1753066002000000000000000000000000000000000000000000000000000
[2023-08-10 02:13:41] Aimedb | INFO | goodbye from 192.168.1.153
[2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 Disconnected - Connection was closed cleanly.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 1797, in dataReceived
    finishCallback(data[contentLength:])
  File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 2334, in _finishRequestBody
    self.allContentReceived()
  File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 2447, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 1032, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/usr/local/lib/python3.8/dist-packages/twisted/web/server.py", line 227, in process
    self.render(resrc)
  File "/usr/local/lib/python3.8/dist-packages/twisted/web/server.py", line 292, in render
    body = resrc.render(self)
  File "/usr/local/lib/python3.8/dist-packages/twisted/web/resource.py", line 268, in render
    return m(request)
builtins.TypeError: render_POST() missing 2 required positional arguments: 'version' and 'endpoint'

I'm trying to get a bit of a deeper answer here as to what's going wrong but having some difficulty figuring out what's happening behind the HttpDispatcher

I should have known better xD Here's a more complete block: ``` [2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 Connected [2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 wrote 3ea1753064002000000053444341000023010000413639453031413838383800 [2023-08-10 02:13:41] Aimedb | INFO | hello from 192.168.1.153 [2023-08-10 02:13:41] Aimedb | DEBUG | Response 3ea1873065002000010000000000000000000000000000000000000000000000 [2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 wrote 3ea1753066002000000000000000000000000000000000000000000000000000 [2023-08-10 02:13:41] Aimedb | INFO | goodbye from 192.168.1.153 [2023-08-10 02:13:41] Aimedb | DEBUG | 192.168.1.153 Disconnected - Connection was closed cleanly. Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 1797, in dataReceived finishCallback(data[contentLength:]) File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 2334, in _finishRequestBody self.allContentReceived() File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 2447, in allContentReceived req.requestReceived(command, path, version) File "/usr/local/lib/python3.8/dist-packages/twisted/web/http.py", line 1032, in requestReceived self.process() --- <exception caught here> --- File "/usr/local/lib/python3.8/dist-packages/twisted/web/server.py", line 227, in process self.render(resrc) File "/usr/local/lib/python3.8/dist-packages/twisted/web/server.py", line 292, in render body = resrc.render(self) File "/usr/local/lib/python3.8/dist-packages/twisted/web/resource.py", line 268, in render return m(request) builtins.TypeError: render_POST() missing 2 required positional arguments: 'version' and 'endpoint' ``` I'm trying to get a bit of a deeper answer here as to what's going wrong but having some difficulty figuring out what's happening behind the `HttpDispatcher`
Author

I should also add, I keep getting this over and over as the game loops on the title screen. Assuming it's making a ping every time it does the loop

I should also add, I keep getting this over and over as the game loops on the title screen. Assuming it's making a ping every time it does the loop
Collaborator

i just did some tests using postman with a few test requests and it goes through just fine, i'm not seeing any errors on HTTP or HTTPS on the latest artemis master branch

i'm not sure what to tell you about this as the logs you have provided doesn't show an error with one of the artemis files but instead python directly.

you can try sending a test POST request using postman to http://192.168.1.64:8082/data and put this as the raw content of the body

{'dldate': {'filetype': '10104/Path/PathList'}}

the console should return

CXB | INFO | Rev SunriseS2 Request /data -> 10104/Path/PathList

i just did some tests using postman with a few test requests and it goes through just fine, i'm not seeing any errors on HTTP or HTTPS on the latest artemis master branch i'm not sure what to tell you about this as the logs you have provided doesn't show an error with one of the artemis files but instead python directly. you can try sending a test POST request using postman to http://192.168.1.64:8082/data and put this as the raw content of the body {'dldate': {'filetype': '10104/Path/PathList'}} the console should return CXB | INFO | Rev SunriseS2 Request /data -> 10104/Path/PathList
Author

Yeah that was the original reason for me not including it. I'm having a hard time figuring out where the requests get processed to plop down a breakpoint. Would you be able to point me in that general direction

Yeah that was the original reason for me not including it. I'm having a hard time figuring out where the requests get processed to plop down a breakpoint. Would you be able to point me in that general direction
Author

CXB | INFO | Rev SunriseS2 Request /data -> 10104/Path/PathList

Hmmm that's close to what got returned

back when I was using megaime:
CXB | INFO | Rev SunriseS2 Request /data -> 10104/ServerState/ServerState

about to nuke the setup and just try to make it from scratch a third time 😆

> CXB | INFO | Rev SunriseS2 Request /data -> 10104/Path/PathList Hmmm that's close to what got returned back when I was using megaime: `CXB | INFO | Rev SunriseS2 Request /data -> 10104/ServerState/ServerState` about to nuke the setup and just try to make it from scratch a third time 😆
Collaborator

maybe you can set every loglevels inside core.yaml to debug and see what gets reported

maybe you can set every loglevels inside core.yaml to debug and see what gets reported
Author

image

image

From a clean slate, only making these changes I still get the same error with postman:

builtins.TypeError: render_POST() missing 2 required positional arguments: 'version' and 'endpoint'

starting to think my setup is cursed

![image](/attachments/484b37bc-fbd7-4c3c-b53e-97e6098de3d4) ![image](/attachments/64059f59-4f1b-4786-8275-a51af05dcf28) From a clean slate, only making these changes I still get the same error with postman: `builtins.TypeError: render_POST() missing 2 required positional arguments: 'version' and 'endpoint'` starting to think my setup is cursed
Author

Also I had already set all the log levels to debug, at least before I tried going from a clean slate for the above screenshots

Also I had already set all the log levels to debug, at least before I tried going from a clean slate for the above screenshots
Author

Also I should mention, screenshot shows theyre in example_config, just have it there temporarily so I can take a pic of the diff

Also I should mention, screenshot shows theyre in example_config, just have it there temporarily so I can take a pic of the diff
Author

To make things even funnier, I just took my chunithm setup and switched it over to the IP of the artemis server, and that's working perfectly xD

CXB confirmed cursed

To make things even funnier, I just took my chunithm setup and switched it over to the IP of the artemis server, and that's working perfectly xD CXB confirmed cursed
Collaborator

i personally tried CXB without SSL using the edited segatools and it booted just fine on my end

so not sure what is going on in your case to be honest

so far all i can say is it is not an issue with the title code

i personally tried CXB without SSL using the edited segatools and it booted just fine on my end so not sure what is going on in your case to be honest so far all i can say is it is not an issue with the title code
Author

Closing this because something is most likely wrong with my setup, can't reproduce this!

Closing this because something is most likely wrong with my setup, can't reproduce this!
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Hay1tsme/artemis#28
No description provided.