Hi Docker group,
Stuck in a weird situation.
We have two applications - one running inside a container and another outside the container directly on the Ubuntu Host.
Both the apps are using someIP for communication.
Agenda is , the application inside the container should be able to discover the service outside the container and able to communicate with it via someIP.
Issue : Containerized application is not able discover & communicate with service running outside.
someIP configuration of the app running inside container :
{
"unicast": "172.17.0.2",
"applications": [
{
"name" : "Consumer",
"id": "0x1002"
}
],
"clients" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"unreliable" : [ 30509, 32344 ]
}
],
"routing" : "Consumer",
"service-discovery" :
{
"enable" : "true",
"multicast" : "224.244.224.245",
"port" : "30490",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "3",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}
configuration of the application running outside container :
{
"unicast": "192.168.226.193",
"applications": [
{
"name" : "Producer",
"id": "0x1001"
}
],
"services": [
{
"service": "0x1234",
"instance": "0x5678",
"unreliable" : "30509",
"events":[
{
"event" : "0x4321"
}
],
"eventgroups":[
{
"eventgroup" : "0x8765",
"events" : [ "0x4321"],
"multicast" :
{
"address" : "224.225.226.233",
"port" : "32344"
}
}
],
"multicast" :
{
"address" : "224.225.226.234",
"port" : "32344"
}
}
],
"routing" : "Producer",
"service-discovery" :
{
"enable" : "true",
"multicast" : "224.244.224.245",
"port" : "30490",
"protocol" : "udp"
}
}
Docker Run command of the container :
docker run --rm -it --cap-add=NET_ADMIN --name cons-cont cons-someip-img
P.S : The container is up and running and waiting for someIP service to up.
Approaches Tried :
- Tried to ping host IP (192.168.226.193) from the container, and it worked.
- Tried to send UDP multicast packet from the host to the container and it worked :
Container : tcpdump -i eth0 port 30490
Host : echo -n “Hello SOME/IP” | nc -u -w1 172.17.0.2 30490
Worked, the message “Hello SOME/IP” is reaching the container from the host.
3. Tried with --network host, Macvlan and normal Bridge networks, still didn’t work.
Seems there is no issue with the network route, but still unable to find the root cause why service discovery cannot happen.
Any help would be helpful.