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

Help on running echo client examples #184

Closed
liupeidong0620 opened this issue Oct 23, 2020 · 5 comments
Closed

Help on running echo client examples #184

liupeidong0620 opened this issue Oct 23, 2020 · 5 comments
Labels

Comments

@liupeidong0620
Copy link

liupeidong0620 commented Oct 23, 2020

echo_client does not work

./echo_client -H www.example.com -s 127.0.0.1:12345         
03:37:01.702 [NOTICE] Connection closed

error info

# ./echo_client -H www.example.com -s 127.0.0.1:12345 -L debug
03:35:30.800 [DEBUG] tokgen: TOKGEN2 does not exist: generate
03:35:30.800 [INFO] tokgen: inserted TOKGEN2 of size 110
03:35:30.800 [DEBUG] tokgen: initialized
03:35:30.800 [INFO] engine: instantiated engine
03:35:30.800 [INFO] socket buffer size: 212992 bytes; max # packets is set to 155
03:35:30.800 [DEBUG] local address: 0.0.0.0:54013
03:35:30.801 [DEBUG] engine: grew heaps to 4 elements
03:35:30.801 [DEBUG] conn: generated and assigned SCID 246BADF1AE6DF544
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] bw-sampler: init
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] bbr: initialized
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] cubic: lsquic_cubic_init(cubic, $conn)
03:35:30.801 [INFO] [QUIC:246BADF1AE6DF544] cubic: initialized
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] adaptive-cc: initialized
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] cfcw: recv_off changed: read_off: 0; recv_off: 15728640
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: created client, DCID: 3EE8D28D7847D649DE85
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: Create new SSL_CTX
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: generated transport parameters buffer of 55 bytes
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: max_idle_timeout: 30000; init_max_data: 15728640; init_max_stream_data_bidi_local: 6291456; init_max_stream_data_bidi_remote: 0; init_max_stream_data_uni: 32768; init_max_streams_bidi: 100; init_max_streams_uni: 100; ack_delay_exponent: 3; max_ack_delay: 25; active_connection_id_limit: 8; timestamps: 2; loss_bits: 1; initial_source_connection_id: 246BADF1AE6DF544
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544-18446744073709551615] di: initialized
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544-18446744073709551615] sfcw: recv_off changed: read_off: 0; recv_off: 16384
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544-18446744073709551615] stream: created crypto stream
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544-18446744073709551615] stream: calling on_new_stream
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] sendctl: send_ctl_can_send: n_out: 0 (unacked_all: 0); cwnd: 46720
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] pacer: lsquic_pacer_can_schedule: 1
03:35:30.801 [DEBUG] engine: incref conn 246BADF1AE6DF544, '' -> 'T'
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: handshake stream created successfully
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: negotiating version FF00001F
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: logging using client SCID
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] event: connection created
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] qlog: [231007458907,"CONNECTIVITY","NEW_CONNECTION","LINE",{"ip_version":"4","srcip":"0.0.0.0","dstip":"127.0.0.1","srcport":"54013","dstport":"12345"}]
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] event: version negotiation: proposed version FF00001F
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] qlog: [231007458914,"CONNECTIVITY","VERNEG","LINE",{"proposed_version":"FF00001F"}]
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: record path 0: (0.0.0.0:54013 - 127.0.0.1:12345)
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: spin bit enabled on path 0
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: record new path ID 0
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: delayed stream creation.  Backlog size: 1
03:35:30.801 [DEBUG] engine: decref conn 246BADF1AE6DF544, 'HT' -> 'H'
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] pacer: lsquic_pacer_can_schedule: 1
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: handshake: error:00000001:invalid library (0):OPENSSL_internal:unknown library
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: handshake failed
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: handshake failed
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: enc level clear after on_write: stop
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: Exit shake_stream
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: sit-0 streams: max count: 0; created streams: 0
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] conn: created 0 delayed streams
03:35:30.801 [DEBUG] engine: incref conn 246BADF1AE6DF544, 'H' -> 'CH'
03:35:30.801 [DEBUG] engine: decref conn 246BADF1AE6DF544, 'CH' -> 'C'
03:35:30.801 [DEBUG] engine: decref conn 246BADF1AE6DF544, 'C' -> ''
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: crypto stream level 0 is closed
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544-18446744073709551615] sfcw: read_off goes from 0 to 0
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544-18446744073709551615] stream: destroyed stream
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544-18446744073709551615] stream: history: [CN320L]
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] pacer: scheduled calls: 0
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] bw-sampler: cleanup
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] bbr: cleanup
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] adaptive-cc: cleanup
03:35:30.801 [NOTICE] [QUIC:246BADF1AE6DF544] sendctl: stats: n_total_sent: 0; n_resent: 0; n_delayed: 0
03:35:30.801 [NOTICE] Connection closed
03:35:30.801 [DEBUG] [QUIC:246BADF1AE6DF544] handshake: iquic_esfi_destroy
03:35:30.801 [NOTICE] [QUIC:246BADF1AE6DF544] conn: # ticks: 1
Floating point exception (core dumped)

echo_server runing

# ./echo_server -c www.example.com,/home/quiche/lsquic/ssl/server.crt,/home/quiche/lsquic/ssl/server.key -L debug
03:34:36.195 [DEBUG] host: 0.0.0.0; port: 12345
03:34:36.195 [DEBUG] tokgen: TOKGEN2 does not exist: generate
03:34:36.195 [INFO] tokgen: inserted TOKGEN2 of size 110
03:34:36.195 [DEBUG] tokgen: initialized
03:34:36.195 [DEBUG] handshake: generated QUIC server context of 38 bytes for version FF00001B
03:34:36.195 [DEBUG] handshake: max_idle_timeout: 30000; init_max_data: 1572864; init_max_stream_data_bidi_local: 0; init_max_stream_data_bidi_remote: 1048576; init_max_stream_data_uni: 12288; init_max_streams_bidi: 100; init_max_streams_uni: 3; active_connection_id_limit: 8; timestamps: 2
03:34:36.195 [DEBUG] handshake: generated QUIC server context of 38 bytes for version FF00001C
03:34:36.195 [DEBUG] handshake: max_idle_timeout: 30000; init_max_data: 1572864; init_max_stream_data_bidi_local: 0; init_max_stream_data_bidi_remote: 1048576; init_max_stream_data_uni: 12288; init_max_streams_bidi: 100; init_max_streams_uni: 3; active_connection_id_limit: 8; timestamps: 2
03:34:36.195 [INFO] prq: initialized queue of size 10000
03:34:36.195 [INFO] purga: create purgatory, min life 30000000 usec
03:34:36.195 [INFO] engine: instantiated engine
03:34:36.196 [INFO] socket buffer size: 212992 bytes; max # packets is set to 155
03:34:36.196 [DEBUG] local address: 0.0.0.0:12345
03:34:36.196 [DEBUG] entering event loop

code brach

  • master

system

  • CentOS Linux release 7.7.1908 (Core)
@liupeidong0620
Copy link
Author

The test echo example for this branch (v2.19.4) is running normally.

@dtikhonov
Copy link
Contributor

Thank you for the report -- this will be fixed in the next release.

@dtikhonov
Copy link
Contributor

The error has to do with the ALPN requirements in IETF QUIC, which BoringSSL now enforces. If you don't care that it's IETF QUIC, you can use gQUIC by adding the version to the client's command line: -o version=Q050.

litespeedtech pushed a commit that referenced this issue Oct 28, 2020
- [FEATURE] QUIC and HTTP/3 Internet Draft 31 support.  Drop ID-30
  and ID-31 support.
- [BUGFIX] Divide-by-zero in newly enabled conn stats code when no
  packets were sent.
- [BUGFIX] Memory leak in gQUIC client when server hello cannot be
  parsed.
- [BUGFIX] Server Initial packet size calculation.
- Log user-agent and CONN_CLOSE reason when peer reports error.
- Example programs: Specify ALPN for echo and md5 clients and servers
  (issue #184).
- Example programs: Don't add "QUIC_" prefix to lines in keylog file
  (issue #185).
- http_server: Fix fd leak in preadv mode; fix preadv() usage when
  reading from disk.
@Hyatt-Zhong
Copy link

如果你重写echo_client遇到这个错误,那么加上这个就好了: eapi.ea_alpn = "echo";

@Hyatt-Zhong
Copy link

https://github.com/dtikhonov/lsquic-tutorial 这里的教程程序也会有这个错误 请加上它 eapi.ea_alpn = "echo";

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

No branches or pull requests

4 participants