ansyun / dpdk-ans

ANS(Accelerated Network Stack) on DPDK, DPDK native TCP/IP stack.
https://ansyun.com
BSD 3-Clause "New" or "Revised" License
1.15k stars 322 forks source link

ANS-IP can not bind to Docker application #95

Closed sachithmuhandiram closed 5 years ago

sachithmuhandiram commented 5 years ago

We have erlang application developed using Docker. When I try to bind that erlang application to ans-ip it doesn't bind.

If I use 127.0.0.1, erlang application works. What is the problem here?

[error] <0.823.0>@diameter_tcp:init:292 CRASH REPORT Process <0.823.0> with 0 neighbours crashed with reason: no match of right hand value {error,{{badmatch,{error,eaddrnotavail}},[{diameter_tcp,i,1,[{file,"transport/diameter_tcp.erl"},{line,261}]},{diameter_tcp,init,1,[{file,"transport/diameter_tcp.erl"},{line,205}]}]}} in diameter_tcp:init/7 line 292
2019-03-19 09:54:55.193 [error] <0.832.0>@diameter_tcp:i:261 CRASH REPORT Process <0.832.0> with 0 neighbours crashed with reason: no match of right hand value {error,eaddrnotavail} in diameter_tcp:i/1 line 261
bluenet13 commented 5 years ago

You can try to run ans application in the example directory, and understand the ans. Then try your application. -:)

sachithmuhandiram commented 5 years ago

Yes, I have tried. But I get nothing from server console or in request side when I run https_server examples.

--2019-03-19 16:35:29--  https://10.0.0.2:7838/index.html
Connecting to 10.0.0.2:7838... 
failed: Connection timed out.
Retrying.
sachithmuhandiram commented 5 years ago

Any update about my issue? I still get curl: (7) Failed to connect to 10.0.0.2 port 7838: Connection timed out error.

bluenet13 commented 5 years ago

http_server in example directory listen on 8089 port. why you connect to 7838?

sachithmuhandiram commented 5 years ago

I used https_server example. It was given as an instruction to use curl --insecure https://10.0.0.2:7838/index.html changed port to 8089 but still same, no connection.

bluenet13 commented 5 years ago

Please try http_server example.

sachithmuhandiram commented 5 years ago

When I ran http_server example

affinity to 0 core by default 
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket_28128_286b749e360
EAL: Probing VFIO support...
USER8: LCORE[-1] anssock any lcore id 0xffffffff 
USER8: LCORE[0] anssock app id: 28128 
USER8: LCORE[0] anssock app name: http_server 
USER8: LCORE[0] anssock app lcoreId: 0 
USER8: LCORE[0] mp ops number 4, mp ops index: 0 
open socket on ip:0.0.0.0  port: 8089

Then # curl --insecure http://0.0.0.0:8089/index.html -> curl: (7) Failed to connect to 0.0.0.0 port 8089: Connection refused

# curl --insecure http://10.0.0.2:8089/index.html-> curl: (7) Failed to connect to 10.0.0.2 port 8089: Connection timed out

bluenet13 commented 5 years ago

ping 10.0.0.2 from your client side, what is the result?

sachithmuhandiram commented 5 years ago

I use bare-metal server for this testing, and I can not ping from inside that server.

sachithmuhandiram commented 5 years ago

any update about my problem? any method to solve this problem?

bluenet13 commented 5 years ago

This issue is related to your environment. Check it by yourself

sachithmuhandiram commented 5 years ago

ANS examples are running now, but still docker application is not bind to that port. http_server examples were running. But when I try to bind Docker application to ans IP, it fails

sachithmuhandiram commented 5 years ago

any update? still my Docker application can not bind to ans IP address.

bluenet13 commented 5 years ago

You can google it how to run dpdk process in docker.

sachithmuhandiram commented 5 years ago

My requirement is opposite. I have an application developed using Docker. I need to bind dpdk-ans IP address for that Docker application.

When I try to bind dpdk-ans IP to erlang docker application, it can not identify.

sachithmuhandiram commented 5 years ago

Please update me. I have tried to many times to bind the port.