API help

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Ludentoe
Posts: 2
Joined: Tue Mar 19, 2024 7:07 am

Hello guys!

I need some help! I have made a code in JS that send some data to Betangel by thier API. Everything works just fine when I use the local port. But when I am trying to access the same it trough another computer, and when I do not use local but instead use: IPv4 address I do not get it to work.

This is the case right now:

I can make the two computers connected to each other, so that is not the case, the setup and the port work between these computers. The code should all be set up correct to handle this as well. The problem is when I run the code without putting any match in the Guardian, I get the same error as when I run it local, so it can indeed talk to each other.

Here is the differences, when I put a match in Guardian in local mode, the script works, but when I do it using it from another computer, I get an error saying:

EADDRINUSE, which indicates that the port I am trying to connect to on the target machine is already in use by another application or process.

Anyone that got a solution to this?

Thanks!
Luden
User avatar
hecojef928
Posts: 56
Joined: Sun Jan 14, 2024 3:15 am

Ludentoe wrote:
Tue Mar 19, 2024 7:20 am
Hello guys!

I need some help! I have made a code in JS that send some data to Betangel by thier API. Everything works just fine when I use the local port. But when I am trying to access the same it trough another computer, and when I do not use local but instead use: IPv4 address I do not get it to work.

This is the case right now:

I can make the two computers connected to each other, so that is not the case, the setup and the port work between these computers. The code should all be set up correct to handle this as well. The problem is when I run the code without putting any match in the Guardian, I get the same error as when I run it local, so it can indeed talk to each other.

Here is the differences, when I put a match in Guardian in local mode, the script works, but when I do it using it from another computer, I get an error saying:

EADDRINUSE, which indicates that the port I am trying to connect to on the target machine is already in use by another application or process.

Anyone that got a solution to this?

Thanks!
Luden
To resolve the port conflict, you need to identify the other process on the same port. What port number are you using? Is it a common port? UPNP enabled? Also, could you specify whether the machine is running on Linux or Windows? Can you confirm, are you seen? https://canyouseeme.org

Try this, find the conflict and kill the process:

Code: Select all

lsof -i:3000 
kill -9 [PID]
Ludentoe
Posts: 2
Joined: Tue Mar 19, 2024 7:07 am

hecojef928 wrote:
Tue Mar 19, 2024 10:09 am
Ludentoe wrote:
Tue Mar 19, 2024 7:20 am
Hello guys!

I need some help! I have made a code in JS that send some data to Betangel by thier API. Everything works just fine when I use the local port. But when I am trying to access the same it trough another computer, and when I do not use local but instead use: IPv4 address I do not get it to work.

This is the case right now:

I can make the two computers connected to each other, so that is not the case, the setup and the port work between these computers. The code should all be set up correct to handle this as well. The problem is when I run the code without putting any match in the Guardian, I get the same error as when I run it local, so it can indeed talk to each other.

Here is the differences, when I put a match in Guardian in local mode, the script works, but when I do it using it from another computer, I get an error saying:

EADDRINUSE, which indicates that the port I am trying to connect to on the target machine is already in use by another application or process.

Anyone that got a solution to this?

Thanks!
Luden
To resolve the port conflict, you need to identify the other process on the same port. What port number are you using? Is it a common port? UPNP enabled? Also, could you specify whether the machine is running on Linux or Windows? Can you confirm, are you seen? https://canyouseeme.org

Try this, find the conflict and kill the process:

Code: Select all

lsof -i:3000 
kill -9 [PID]

Thanks for you answer, I use Windows 10 and port 9101.

On this page, https://canyouseeme.org when I use the computer that should run the code, I get that the port is not recognized or that it broke.

When I check in Poweshell, there is only one program running port 9101, and that is on my computer that got the Betangel setup.

In the terminal in VSC on the computer where the code is, it says it succeeds to find port 9101, but when I run the code I still get that conflict error message
User avatar
hecojef928
Posts: 56
Joined: Sun Jan 14, 2024 3:15 am

Ludentoe wrote:
Tue Mar 19, 2024 2:09 pm
Thanks for you answer, I use Windows 10 and port 9101.

On this page, https://canyouseeme.org when I use the computer that should run the code, I get that the port is not recognized or that it broke.

When I check in Poweshell, there is only one program running port 9101, and that is on my computer that got the Betangel setup.

In the terminal in VSC on the computer where the code is, it says it succeeds to find port 9101, but when I run the code I still get that conflict error message
Are both computers connected to the same network? If they are, you can disregard the results from canyouseeme. It seems like the problem might stem from the JavaScript code itself. Have you thought about experimenting with a different port to check if the conflict persists? I don't have much experience with JS, but just trying to offer some advice.

Perhaps have a look here:
Post Reply

Return to “Bet Angel - Automation”