Skip to content
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

Changing Port not working #27

Open
DJTechMo opened this issue Jul 12, 2023 · 4 comments
Open

Changing Port not working #27

DJTechMo opened this issue Jul 12, 2023 · 4 comments

Comments

@DJTechMo
Copy link

Hi there,

first, thank you for your work.
I already got things working and am tweaking the setup now.

As the port 80 is used by multiple services on the server, i had to install a proxy and forward the request to another port.
I chose 8080 as it is free at the moment.
I have a DNS Server to redirect the naxcom adresses to that machine.
And opening http://v720.naxclow.com/dev/list gives the empty device list from another windows pc, so this seems to work.
Unfortunately the camera does not appear in the device list.

With port 80 everything worked/works.
Below is the log, so there appears the call from the camera.
Why is it not registered as device?
Did i miss something?


call is: python3 /opt/a9/src/a9_naxclow.py -s -v --proxy-port 8080

2023-07-12 21:23:17,435  [   INFO] [UDP-SRV :6123] Waiting for connection
2023-07-12 21:23:17,436  [   INFO] [TCP-SRV :6123] Waiting for connection
2023-07-12 21:23:46,475  [   INFO] [HTTP] GET device list: /dev/list
2023-07-12 21:23:46,475  [   INFO] [HTTP] "GET /dev/list HTTP/1.1" 200 -
2023-07-12 21:23:54,725  [   INFO] [HTTP] POST /app/api/ApiServer/getA9ConfCheck?devicesCode=0800c01A079A&random=DEFGHI&token=c42bf98af0
2023-07-12 21:23:54,726  [   INFO] [HTTP] sending: HTTP/1.1 200
Server: nginx/1.14.0 (Ubuntu)
Date: Wed, 12 Jul 2023 21:23:54 -0000
Content-Type: application/json
Connection: keep-alive
Content-Length: 231


{"code": 200, "message": "OK", "data": {"tcpPort": 6123, "uid": "0800c01A079A", "isBind": "8", "domain": "v720.naxclow.com", "updateUrl": null, "host": "192.168.2.150", "currTime": "1689189834", "pwd": "deadbeef", "version": null}}
2023-07-12 21:24:21,964  [   INFO] [HTTP] GET device list: /dev/list
2023-07-12 21:24:21,964  [   INFO] [HTTP] "GET /dev/list HTTP/1.1" 200 -
@intx82
Copy link
Owner

intx82 commented Jul 16, 2023

Do you follow this issue? #15

Camera will still use an old port (80) and trying to do request via it, if you didn't see these requests in logs then something wrong with a proxy. Use configs in provided above issue

@DJTechMo
Copy link
Author

Yeah right have the nginx on port 80 which redirects to 8080.
In the Issue above, the solution was using another system ( Debian ).
I am using Ubuntu 22.04.1 LTS.

I also did all the steps by vale-max in the issue...
So localhost:/dev/list works.
connection to v720.naxclow.com/dev/list from other pcs work.
And everything on vanilla 80 also works.

What is the POST /app/api/ApiServer/getA9ConfCheck?devicesCode=0800c01A079A&random=DEFGHI&token=c42bf98af0
Request? And what is the request i need to see for the camera to "arrive"?

@intx82
Copy link
Owner

intx82 commented Jul 17, 2023

POST /app/api/ApiServer/getA9ConfCheck?devicesCode=0800c01A079A&random=DEFGHI&token=c42bf98af0

I mention exactly about this request. This is an initial camera configuration request. Camera tries to retrieve server parameters.

If you see it, then proxy able to forward request to the server, but the question is camera receive an answer? You can use wireshark to check this.

This is definitely proxy misconfiguration.

@k1llerk3ks
Copy link

after getting it to run once, i've only been having trouble with this. I am as far as @DJTechMo , getting /app/api/ApiServer/getA9ConfCheck?devicesCode... lines in my nginx log, but nothing more.

still in

2023-09-29 14:31:39,439  [   INFO] [TCP-SRV :6123] Waiting for connection
2023-09-29 14:31:39,439  [   INFO] [UDP-SRV :6123] Waiting for connection

Can't seem to find the issue for this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants