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

GetLastError: 10049 - The requested address is not valid in its context. #4

Open
dbiscan opened this issue Apr 13, 2022 · 2 comments
Open

Comments

@dbiscan
Copy link

dbiscan commented Apr 13, 2022

Using a standard recieve string
NTttcp.exe -r -v -p 1025 -m 1,3,
It fails and this is the resulting output :

4/13/2022 11:33:22 StartSenderReceiver start thread 0 port 1025
4/13/2022 11:33:22 SetupNet port 1025
4/13/2022 11:33:22 bound to port 1025
4/13/2022 11:33:22 ERROR: SetupNet failed: error in connect/bind function, GetLastError: 10049 - The requested address is not valid in its context.
4/13/2022 11:33:22 ERROR: StartSenderReceiver in thread: 0 failed: error in SetupNet function
4/13/2022 11:33:22 ERROR: StartSenderReceiver in thread: 0 failed: closesocket, GetLastError: 10038 - An operation was attempted on something that is not a socket.

It's windows server 2018 running powershell in administrator mode.
There is no other error information, just the above.
Please advise.

@famousgrumblecakes
Copy link

In this paste, it looks like you didn't specify the IP address of the interface receiving the traffic. Should be
-m 1,3,192.168.1.1 or whatever the IP of your target interface is.

@dominikkristof
Copy link

dominikkristof commented Nov 11, 2023

In my case I have same error but IP is specified:
11/11/2023 10:27:16 proc_speed: 3600 MHz
11/11/2023 10:27:16 SetupThreads
11/11/2023 10:27:16 Threads: 1 Processor: 3 Host: 192.168.1.130
11/11/2023 10:27:16 created thread 0 port 5001
11/11/2023 10:27:16 StartSenderReceiver start thread 0 port 5001
11/11/2023 10:27:16 SetupNet port 5001
11/11/2023 10:27:16 bound to port 5001
11/11/2023 10:27:16 ERROR: SetupNet failed: error in connect/bind function, GetLastError: 10049 - The requested address is not valid in its context.
11/11/2023 10:27:16 ERROR: StartSenderReceiver in thread: 0 failed: error in SetupNet function
11/11/2023 10:27:16 ERROR: StartSenderReceiver in thread: 0 failed: closesocket, GetLastError: 10038 - An operation was attempted on something that is not a socket.
11/11/2023 10:27:16 StartSenderReceiver done thread 0 port 5001

Command was:
.\NTttcp.exe -r -v -m 1,*,192.168.1.130 -rb 100kb
What might be the problem? In packet capture I can see packets coming in from sender machine but this receiver does not send SYN ACK.

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