It seems there is a bug in this function call
src/vcl/vppcom.c line 633
int
vppcom_session_bind (uint32_t session_index, vppcom_endpt_t * ep)
{
//xxx
session->transport.lcl_ip = to_ip46 (ep->is_ip4 ? IP46_TYPE_IP4 :
IP46_TYPE_IP6, ep->ip);
//shall be changed to
session->transport.lcl_ip = to_ip46 (!ep->is_ip4, ep->ip);
// to_ip46 first parameter is isipv6, and IP46_TYPE_IP4, IP6 would be always
true, and the bind will copy a wrong IP for v4 case(over stack)
}
BR//Terry
-- Original --
From: "Florin Coras";
Date: Tue, Jul 24, 2018 11:50 PM
To: "xiaodong.zhang";
Cc: "vpp-dev";
Subject: Re: [vpp-dev] vcl error
Hi Terry,
From the errors you’re seeing, I can only guess you have configured vcl to
attach to the host stack using a local scope. Do you have vcl.conf configured
with “app-scope-local” or have you exported VCL_APP_SCOPE_LOCAL environment
variable? If yes, try disabling them. If neither global nor local scope is
requested, the stack defaults to global scope.
Secondly, at this time, vcl does not handle well multiple application workers.
This is something we’re working on but in the mean time, make sure that nginx
uses only one worker.
Regards,
Florin
> On Jul 24, 2018, at 5:31 AM, xiaodong.zhang
> wrote:
>
> [root@localhost vpp] nginx
> vl_api_bind_sock_reply_t_handler:335: VCL<3312>: ERROR: vpp handle 0x0, sid
> 0: bind failed: Invalid value #2 (-8)
> nginx: [emerg] listen() to 0.0.0.0:19090, backlog 511 failed (111: Connection
> refused)
>
> messages:
> Jul 24 05:30:30 localhost vnet[28515]: vnet_bind: bind failed
>
> I got above error when starting nginx using the VCL with LD_PRELOAD.
>
> The sock_test_server is working fine.
>
> And I tried a very simple TCP socket server code, which binding to
> 0.0.0.0:port, but it failed with "bind failed: Invalid value #2 (-8)"too when
> calling the listen().
>
> Any idea?
>
> Thanks.
>
> BR//Terry
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#9918): https://lists.fd.io/g/vpp-dev/message/9918
> Mute This Topic: https://lists.fd.io/mt/23802581/675152
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [fcoras.li...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9931): https://lists.fd.io/g/vpp-dev/message/9931
Mute This Topic: https://lists.fd.io/mt/23802581/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-