Coder Social home page Coder Social logo

socket error about libutp HOT 38 CLOSED

bittorrent avatar bittorrent commented on September 26, 2024
socket error

from libutp.

Comments (38)

ghazel avatar ghazel commented on September 26, 2024

What is the error?

from libutp.

 avatar commented on September 26, 2024

client:::

[sangeeta@localhost utp_test]$ ./utp_test 8904 abc.log 0.0.0.0:8901 configs
listening on port 8904
logging to 'abc.log'
connecting to 0.0.0.0:8901
using settings file configs
ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt"
ignored unrecognized setting: "utp_target_delay"
ignored unrecognized setting: "utp_max_window_decay"
ignored unrecognized setting: "utp_reorder_buffer_size"
ignored unrecognized setting: "utp_packet_size"
ignored unrecognized setting: "utp_serializations_per_target"
ignored unrecognized setting: "utp_min_window_size"
ignored unrecognized setting: "utp_use_packet_pacing"
ignored unrecognized setting: "utp_duplicate_acks_before_resend"
ignored unrecognized setting: "utp_delayed_ack_byte_threshold"
ignored unrecognized setting: "utp_delayed_ack_time_threshold"
ignored unrecognized setting: "utp_ratecheck_interval"
using configuration:

g_send_limit: 50000000

creating socket 0x9a7c170
connecting socket 0x9a7c170
[865564] sent: 0/50000000 0.0 bytes/s socket error: (110) Connection timed out
[sangeeta@localhost utp_test]$

server:::
[sangeeta@localhost utp_test]$ ./utp_test 8901 abc.log 0.0.0.0:8904 configs
listening on port 8901
logging to 'abc.log'
connecting to 0.0.0.0:8904
using settings file configs
ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt"
ignored unrecognized setting: "utp_target_delay"
ignored unrecognized setting: "utp_max_window_decay"
ignored unrecognized setting: "utp_reorder_buffer_size"
ignored unrecognized setting: "utp_packet_size"
ignored unrecognized setting: "utp_serializations_per_target"
ignored unrecognized setting: "utp_min_window_size"
ignored unrecognized setting: "utp_use_packet_pacing"
ignored unrecognized setting: "utp_duplicate_acks_before_resend"
ignored unrecognized setting: "utp_delayed_ack_byte_threshold"
ignored unrecognized setting: "utp_delayed_ack_time_threshold"
ignored unrecognized setting: "utp_ratecheck_interval"
using configuration:

g_send_limit: 50000000

creating socket 0x9115170
connecting socket 0x9115170
[834511] sent: 0/50000000 0.0 bytes/s socket error: (110) Connection timed out

from libutp.

ghazel avatar ghazel commented on September 26, 2024

The destination parameter needs a real IP, probably in your case 127.0.0.1 would be functional, instead of 0.0.0.0.

from libutp.

 avatar commented on September 26, 2024

Alright Ghazel.
But what about "ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt""
In settings file parameter I have given configs, is it right?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

The settings file only supports g_send_limit. The rest have been disabled due to lack of support.

from libutp.

 avatar commented on September 26, 2024

Now I have given IP address 127.0.0.0, now its giving this

[sangeeta@localhost utp_test]$ ./utp_test 8904 abc.log 127.0.0.0:8901 configs
listening on port 8904
logging to 'abc.log'
connecting to 127.0.0.0:8901
using settings file configs
ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt"
ignored unrecognized setting: "utp_target_delay"
ignored unrecognized setting: "utp_max_window_decay"
ignored unrecognized setting: "utp_reorder_buffer_size"
ignored unrecognized setting: "utp_packet_size"
ignored unrecognized setting: "utp_serializations_per_target"
ignored unrecognized setting: "utp_min_window_size"
ignored unrecognized setting: "utp_use_packet_pacing"
ignored unrecognized setting: "utp_duplicate_acks_before_resend"
ignored unrecognized setting: "utp_delayed_ack_byte_threshold"
ignored unrecognized setting: "utp_delayed_ack_time_threshold"
ignored unrecognized setting: "utp_ratecheck_interval"
using configuration:

g_send_limit: 50000000

creating socket 0x9116170
connecting socket 0x9116170
buffering packet: 1 Permission denied
[3857958] sent: 0/50000000 0.0 bytes/s buffering packet: 2 Permission denied
[3864064] sent: 0/50000000 0.0 bytes/s socket error: (110) Connection timed out

One thing also, which file it will try to download or upload?
I want to transfer data(upload/download) and catch it through wireshark so that I can understand what headers are sent across.

from libutp.

ghazel avatar ghazel commented on September 26, 2024

utp_test just writes random data and does nothing with it on the reading side. sendto getting "Permission denied" is curious, but not uTP related - perhaps a local firewall?

from libutp.

 avatar commented on September 26, 2024

My firewall is off.

from libutp.

ghazel avatar ghazel commented on September 26, 2024

What OS?

from libutp.

 avatar commented on September 26, 2024

RHEL 6

from libutp.

ghazel avatar ghazel commented on September 26, 2024

Just tested on an Amazon Linux machine and it worked fine. I think that is based on RHEL 6.

from libutp.

 avatar commented on September 26, 2024

Ya I told you I have RHEL 6, now what I suppose to do to make it work?
Please don't ask me to turn it into Amazon Linux:)

from libutp.

ghazel avatar ghazel commented on September 26, 2024

I'm not sure what sort of OS configuration would cause sendto to give "Permission denied" (besides a firewall). You could ask Redhat.

from libutp.

 avatar commented on September 26, 2024

Great,
Let me try with windows 7.
Would I be able to capture uTP headers with wireshark if it works?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

Yes, I've done that myself.

from libutp.

 avatar commented on September 26, 2024

Great...then if you have those headers can you share with me?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

Not sure what you are asking for. I do not have them handy.

from libutp.

 avatar commented on September 26, 2024

Alright...No probs.
Thank you so much for your help.

from libutp.

 avatar commented on September 26, 2024

Can you tell me how to run utp_test on windows?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

Same as on Linux really, except for the compiler.

On Jan 23, 2012, at 11:27 PM, sangeetaC
[email protected]
wrote:

Can you tell me how to run utp_test on windows?


Reply to this email directly or view it on GitHub:
#32 (comment)

from libutp.

 avatar commented on September 26, 2024

and on which IDE?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

Visual Studio

from libutp.

 avatar commented on September 26, 2024

I tried Visual Studio 2005, but it did not run.
Will it run on any particular version?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

What do you mean "did not run"? The project file in the repo is from VS 2008, but you can convert things, I think: http://www.emmet-gray.com/Articles/ProjectConverter.htm

from libutp.

 avatar commented on September 26, 2024

ya, I have done that
Now when I run it has given
'utp_test.exe': Loaded 'C:\Users\sangeeta.chowdhary\Documents\Visual Studio 2005\Projects\udp_test\debug\utp_test.exe', Symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\ntdll.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\kernel32.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\KernelBase.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.42_none_ef74ff32550b5bf0\msvcr80d.dll', Symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\msvcrt.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\ws2_32.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\nsi.dll', No symbols loaded.

Nothing else after this

from libutp.

 avatar commented on September 26, 2024

It has given this now

'utp_test.exe': Loaded 'C:\Users\sangeeta.chowdhary\Documents\Visual Studio 2005\Projects\udp_test\debug\utp_test.exe', Symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\ntdll.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\kernel32.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\KernelBase.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.42_none_ef74ff32550b5bf0\msvcr80d.dll', Symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\msvcrt.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\ws2_32.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', No symbols loaded.
'utp_test.exe': Loaded 'C:\Windows\System32\nsi.dll', No symbols loaded.
The program '[1064] utp_test.exe: Native' has exited with code 1 (0x1).

from libutp.

 avatar commented on September 26, 2024

On one cmd I have given below command and receved following output
It has again given socket error

C:\Users\sangeeta.chowdhary\Documents\Visual Studio 2005\Projects\udp_test\debug

utp_test.exe 5050 abc.log 127.0.0.0:3128 configs
listening on port 5050
logging to 'abc.log'
connecting to 127.0.0.0:3128
using settings file configs
ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt"
ignored unrecognized setting: "utp_target_delay"
ignored unrecognized setting: "utp_max_window_decay"
ignored unrecognized setting: "utp_reorder_buffer_size"
ignored unrecognized setting: "utp_packet_size"
ignored unrecognized setting: "utp_serializations_per_target"
ignored unrecognized setting: "utp_min_window_size"
ignored unrecognized setting: "utp_use_packet_pacing"
ignored unrecognized setting: "utp_duplicate_acks_before_resend"
ignored unrecognized setting: "utp_delayed_ack_byte_threshold"
ignored unrecognized setting: "utp_delayed_ack_time_threshold"
ignored unrecognized setting: "utp_ratecheck_interval"
using configuration:

g_send_limit: 50000000

creating socket 005632F8
connecting socket 005632F8
[8050] sent: 0/50000000 0.0 bytes/s socket error: (10060) Unknown error
[9051] sent: 0/50000000 0.0 bytes/s
C:\Users\sangeeta.chowdhary\Documents\Visual Studio 2005\Projects\udp_test\debug

On another cmd I have given :

listening on port 3128
logging to 'abc.log'
connecting to 127.0.0.0:5050
using settings file configs
ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt"
ignored unrecognized setting: "utp_target_delay"
ignored unrecognized setting: "utp_max_window_decay"
ignored unrecognized setting: "utp_reorder_buffer_size"
ignored unrecognized setting: "utp_packet_size"
ignored unrecognized setting: "utp_serializations_per_target"
ignored unrecognized setting: "utp_min_window_size"
ignored unrecognized setting: "utp_use_packet_pacing"
ignored unrecognized setting: "utp_duplicate_acks_before_resend"
ignored unrecognized setting: "utp_delayed_ack_byte_threshold"
ignored unrecognized setting: "utp_delayed_ack_time_threshold"
ignored unrecognized setting: "utp_ratecheck_interval"
using configuration:

g_send_limit: 50000000

creating socket 005A4DA8
connecting socket 005A4DA8
[3049] sent: 0/50000000 0.0 bytes/s

and command prompt exits after this
Now what shall I do?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

You used 127.0.0.0 which is not valid. Use 127.0.0.1.

from libutp.

 avatar commented on September 26, 2024

Ok thanks a lot.
Can you tell me that with what name it will be identified by wireshark?

from libutp.

ghazel avatar ghazel commented on September 26, 2024

Name? Just look for the packets to/from the ports involved.

from libutp.

 avatar commented on September 26, 2024

Again it has given socket error in one command prompt

At one command prompt

listening on port 3128
logging to 'abc.log'
connecting to 127.0.0.1:5050
using settings file configs
ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt"
ignored unrecognized setting: "utp_target_delay"
ignored unrecognized setting: "utp_max_window_decay"
ignored unrecognized setting: "utp_reorder_buffer_size"
ignored unrecognized setting: "utp_packet_size"
ignored unrecognized setting: "utp_serializations_per_target"
ignored unrecognized setting: "utp_min_window_size"
ignored unrecognized setting: "utp_use_packet_pacing"
ignored unrecognized setting: "utp_duplicate_acks_before_resend"
ignored unrecognized setting: "utp_delayed_ack_byte_threshold"
ignored unrecognized setting: "utp_delayed_ack_time_threshold"
ignored unrecognized setting: "utp_ratecheck_interval"
using configuration:

g_send_limit: 50000000

creating socket 002A4DA8
connecting socket 002A4DA8
[8053] sent: 0/50000000 0.0 bytes/s incoming socket 002A51E0
socket error: (10060) Unknown error
[25109] sent: 0/50000000 0.0 bytes/s

Another command promt

C:\Users\sangeeta.chowdhary\Documents\Visual Studio 2005\Projects\udp_test\debug

utp_test.exe 5050 abc.log 127.0.0.1:3128 configs
listening on port 5050
logging to 'abc.log'
connecting to 127.0.0.1:3128
using settings file configs
ignored unrecognized setting: "utp_max_cwnd_increase_bytes_per_rtt"
ignored unrecognized setting: "utp_target_delay"
ignored unrecognized setting: "utp_max_window_decay"
ignored unrecognized setting: "utp_reorder_buffer_size"
ignored unrecognized setting: "utp_packet_size"
ignored unrecognized setting: "utp_serializations_per_target"
ignored unrecognized setting: "utp_min_window_size"
ignored unrecognized setting: "utp_use_packet_pacing"
ignored unrecognized setting: "utp_duplicate_acks_before_resend"
ignored unrecognized setting: "utp_delayed_ack_byte_threshold"
ignored unrecognized setting: "utp_delayed_ack_time_threshold"
ignored unrecognized setting: "utp_ratecheck_interval"
using configuration:

g_send_limit: 50000000

creating socket 002032F8
connecting socket 002032F8
[2227] sent: 44782328/50000000 21712442.0 bytes/s
C:\Users\sangeeta.chowdhary\Documents\Visual Studio 2005\Projects\udp_test\debug

from libutp.

ghazel avatar ghazel commented on September 26, 2024

Looks like the first one timed out and then the second one worked. Not a big deal - you should still see traffic in wireshark.

from libutp.

 avatar commented on September 26, 2024

I am not able to identify uTP traffic on wireshark.
I have given ip.addr=127.0.0.1 in wireshark filter but nothing has come.
Please tell me how shall I identify?
I think port no we can give with the name of protocol like tcp.port==3214.

from libutp.

ghazel avatar ghazel commented on September 26, 2024

The protocol is UDP. Wireshark might not be capturing localhost traffic, so you might try the ethernet adapter's address instead.

from libutp.

 avatar commented on September 26, 2024

Ok...great
Thanks a lot.
I want to ask one more thing that is how shall I decode uTP header?
uTP header is 32 bits, since its over UDP so I am not able to identify uTP header.

from libutp.

 avatar commented on September 26, 2024

I am not able to see 4 bit version which is 1 for uTP, then next 4 bits for type like that

from libutp.

 avatar commented on September 26, 2024

0000 44 37 e6 63 cb c2 00 20 18 8f a9 f8 08 00 45 00 D7.c... ......E.
0010 00 3a b0 f6 00 00 80 11 1f b4 ac 13 04 96 ac 13 .:...... ........
0020 0d 4c 13 ba 0c 38 00 26 cf 6c 21 02 00 29 00 38 .L...8.& .l!..).8
0030 23 b6 00 00 00 00 00 38 00 00 18 be 48 23 00 08 #......8 ....H#..
0040 00 00 00 00 00 00 00 00 ........

This is the dump of one packet which I have got from wireshark...can you help me to decode uTP header in this

from libutp.

 avatar commented on September 26, 2024

Greg,

Can you please guide me?
It would be great help from your side.

from libutp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.