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

[BUG]: Local routing endpoint creation failed. Client ID: 0000: Protocol not available #843

Open
AhMmedMahmoud opened this issue Feb 4, 2025 · 1 comment
Labels

Comments

@AhMmedMahmoud
Copy link

vSomeip Version

v3.5.4

Boost Version

1.81

Environment

QNX

Describe the bug

vsomeip.json
{
"unicast" : "127.0.0.1",
"logging" :
{
"level" : "debug",
"console" : "true",
"file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "client-sample",
"id" : "0x1343"
},
{
"name" : "other-client-sample",
"id" : "0x1344"
},
{
"name" : "service-sample",
"id" : "0x1277"
}
],
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
"unreliable" : "31000"
},
{
"service" : "0x1235",
"instance" : "0x5678",
"reliable" : { "port" : "30506", "enable-magic-cookies" : false },
"unreliable" : "31000"
}
],
"routing" : "server-sample",
"service-discovery" :
{
"enable" : "false",
"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"
}
}

Service side

COMMONAPI_CONFIG=/tmp/commonapi.ini ./BroadcastService

[CAPI][INFO] Loading configuration file '/tmp/commonapi.ini'
[CAPI][INFO] Using default binding 'someip'
[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
[CAPI][DEBUG] Loading library for local:commonapi.examples.Broadcast:v1_0:commonapi.examples.Methods stub.
[CAPI][INFO] Loading configuration file /etc//commonapi-someip.ini
[CAPI][DEBUG] Added address mapping: local:commonapi.examples.Broadcast:v1_0:commonapi.examples.Methods <--> [1234.5678(1.0)]
[CAPI][VERBOSE] Registering function for creating "commonapi.examples.Broadcast:v1_0" proxy.
[CAPI][INFO] Registering function for creating "commonapi.examples.Broadcast:v1_0" stub adapter.
[CAPI][DEBUG] Loading interface library "libBroadcast-someip.so" succeeded.
[CAPI][INFO] Registering stub for "local:commonapi.examples.Broadcast:v1_0:commonapi.examples.Methods"
2025-01-23 15:28:39.192061 [info] Parsed vsomeip configuration in 0ms
2025-01-23 15:28:39.192061 [info] Configuration module loaded.
2025-01-23 15:28:39.192061 [info] Security disabled!
2025-01-23 15:28:39.192061 [info] Initializing vsomeip (3.5.4) application "service-sample".
2025-01-23 15:28:39.192071 [info] Instantiating routing manager [Host].
2025-01-23 15:28:39.192071 [info] create_routing_root: Routing root @ /var/vsomeip-0
2025-01-23 15:28:39.192071 [error] Local routing endpoint creation failed. Client ID: 0000: Protocol not available
2025-01-23 15:28:39.192081 [warning] Routing root creating (partially) failed. Please check your configuration.
2025-01-23 15:28:39.192081 [info] Service Discovery enabled. Trying to load module.
2025-01-23 15:28:39.192132 [info] Service Discovery module loaded.
2025-01-23 15:28:39.192132 [info] Application(service-sample, 0100) is initialized (11, 100).
2025-01-23 15:28:39.192142 [info] Starting vsomeip application "service-sample" (0100) using 2 threads I/O nice 0
2025-01-23 15:28:39.192142 [info] offer_event: Event [1234.5678.80f2] uses configured cycle time 0ms
2025-01-23 15:28:39.192142 [info] REGISTER EVENT(0100): [1234.5678.80f2:is_provider=true]
2025-01-23 15:28:39.192142 [info] rmi::offer_service added service: 1234 to pending_sd_offers_.size = 1
2025-01-23 15:28:39.192142 [info] main dispatch thread id from application: 0100 (service-sample) is: 6
2025-01-23 15:28:39.192152 [error] Local UDS server endpoint initialization failed. Client 0100 Path: /var/vsomeip-100 Reason: Protocol not available
2025-01-23 15:28:39.192152 [info] shutdown thread id from application: 0100 (service-sample) is: 7
2025-01-23 15:28:39.192162 [info] OFFER(0100): [1234.5678:1.0] (true)
Successfully Registered Service!
2025-01-23 15:28:39.192162 [error] create_server_endpoint Server endpoint creation failed. Reason: Invalid argument Port: 30490 (0)
2025-01-23 15:28:39.192172 [error] Service Discovery endpoint could not be created. Please check your network configuration.
2025-01-23 15:28:39.192172 [error] Couldn't start service discovery
2025-01-23 15:28:39.192172 [info] Port configuration missing for [1234.5678]. Service is internal.
2025-01-23 15:28:39.192172 [info] rmi::start_ip_routing: clear pending_sd_offers_
2025-01-23 15:28:39.192182 [info] SOME/IP routing ready.
2025-01-23 15:28:39.192182 [info] create_routing_root: Routing root @ /var/vsomeip-0
2025-01-23 15:28:39.192182 [error] Local routing endpoint creation failed. Client ID: 0000: Protocol not available
2025-01-23 15:28:39.192192 [warning] Routing root creating (partially) failed. Please check your configuration.
2025-01-23 15:28:39.192192 [info] Watchdog is disabled!
2025-01-23 15:28:39.192202 [info] io thread id from application: 0100 (service-sample) is: 9
2025-01-23 15:28:39.192202 [info] io thread id from application: 0100 (service-sample) is: 5
2025-01-23 15:28:39.192202 [info] vSomeIP 3.5.4 | (default)

Reproduction Steps

echo -e "[default]\nbinding=someip\n\n[logging]\nconsole = true\nfile = ./mylog.log\ndlt = true\nlevel = verbose" > /tmp/commonapi.ini

export VSOMEIP_CONFIGURATION=/mnt/usr/etc/

export VSOMEIP_CONFIGURATION=/mnt/usr/etc/vsomeip.json

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/usr/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/tmp

cd /mnt/bin

COMMONAPI_CONFIG=/tmp/commonapi.ini ./BroadcastService

Expected behaviour

No response

Logs and Screenshots

Image

@AhMmedMahmoud
Copy link
Author

AhMmedMahmoud commented Feb 5, 2025

update

vsomeip.json

{
"unicast" : "127.0.0.1",
"logging" :
{
"level" : "debug",
"console" : "true",
"file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "client-sample",
"id" : "0x1343"
},
{
"name" : "other-client-sample",
"id" : "0x1344"
},
{
"name" : "service-sample",
"id" : "0x1277"
}
],
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
"unreliable" : "31000"
},
{
"service" : "0x1235",
"instance" : "0x5678",
"reliable" : { "port" : "30506", "enable-magic-cookies" : false },
"unreliable" : "31000"
}
],
"routing" : "service-sample",
"service-discovery" :
{
"enable" : "false",
"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"
}
}
# export VSOMEIP_CONFIGURATION=/mnt/tmp/conf/ncm0/vsomeip.json
# 
# 
# COMMONAPI_CONFIG=/tmp/commonapi.ini ./BroadcastService
[CAPI][INFO] Loading configuration file '/tmp/commonapi.ini'
[CAPI][INFO] Using default binding 'someip'
[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
[CAPI][DEBUG] Loading library for local:commonapi.examples.Broadcast:v1_0:commonapi.examples.Methods stub.
[CAPI][INFO] Loading configuration file /etc//commonapi-someip.ini
[CAPI][DEBUG] Added address mapping: local:commonapi.examples.Broadcast:v1_0:commonapi.examples.Methods <--> [1234.5678(1.0)]
[CAPI][VERBOSE] Registering function for creating "commonapi.examples.Broadcast:v1_0" proxy.
[CAPI][INFO] Registering function for creating "commonapi.examples.Broadcast:v1_0" stub adapter.
[CAPI][DEBUG] Loading interface library "libBroadcast-someip.so" succeeded.
[CAPI][INFO] Registering stub for "local:commonapi.examples.Broadcast:v1_0:commonapi.examples.Methods"
2025-01-24 05:02:37.575949  [info] Using configuration file: "/mnt/tmp/conf/ncm0/vsomeip.json".
2025-01-24 05:02:37.575949  [info] Parsed vsomeip configuration in 4ms
2025-01-24 05:02:37.575949  [info] Configuration module loaded.
2025-01-24 05:02:37.575949  [info] Security disabled!
2025-01-24 05:02:37.575949  [info] Initializing vsomeip (3.5.4) application "service-sample".
2025-01-24 05:02:37.575949  [info] Instantiating routing manager [Proxy].
2025-01-24 05:02:37.575959  [info] Client [1277] is connecting to [0] at /var/vsomeip-0 endpoint > 58a6376c18
2025-01-24 05:02:37.575959  [info] Application(service-sample, 1277) is initialized (11, 100).
2025-01-24 05:02:37.575959  [info] Starting vsomeip application "service-sample" (1277) using 2 threads I/O nice 0
2025-01-24 05:02:37.575959  [info] offer_event: Event [1234.5678.80f2] uses configured cycle time 0ms
Successfully Registered Service!
2025-01-24 05:02:37.575969  [debug] Thread created. Number of active threads for service-sample : 1
2025-01-24 05:02:37.575969  [info] main dispatch thread id from application: 1277 (service-sample) is: 4
2025-01-24 05:02:37.575979  [info] shutdown thread id from application: 1277 (service-sample) is: 5
2025-01-24 05:02:37.575979  [warning] local_client_endpoint_impl::connect: couldn't enable SO_REUSEADDR: Protocol not available
2025-01-24 05:02:37.575979  [info] io thread id from application: 1277 (service-sample) is: 6
2025-01-24 05:02:37.575979  [info] io thread id from application: 1277 (service-sample) is: 3
2025-01-24 05:02:37.575979  [warning] cei::connect_cbk: restarting socket due to(2):No such file or directory endpoint > 58a6376c18 socket state > 1
2025-01-24 05:02:37.575979  [warning] cei::shutdown_and_close_socket_unlocked: socket shutdown error (257): Socket is not connected endpoint > 58a6376c18 socket state > 1
2025-01-24 05:02:37.575989  [warning] cei::shutdown_and_close_socket_unlocked: socket has been reset  endpoint > 58a6376c18 socket state > 0
2025-01-24 05:02:37.575989  [info] routing_manager_client::on_disconnect: Client 0x1277 calling host_->on_state with DEREGISTERED
2025-01-24 05:02:37.576998  [warning] local_client_endpoint_impl::connect: couldn't enable SO_REUSEADDR: Protocol not available
2025-01-24 05:02:37.576998  [warning] cei::connect_cbk: restarting socket due to(2):No such file or directory endpoint > 58a6376c18 socket state > 1
2025-01-24 05:02:37.576998  [warning] cei::shutdown_and_close_socket_unlocked: socket shutdown error (257): Socket is not connected endpoint > 58a6376c18 socket state > 1
2025-01-24 05:02:37.576998  [warning] cei::shutdown_and_close_socket_unlocked: socket has been reset  endpoint > 58a6376c18 socket state > 0
2025-01-24 05:02:37.576998  [info] routing_manager_client::on_disconnect: Client 0x1277 calling host_->on_state with DEREGISTERED
Sent status event with data size: 2073604 bytes
Waiting for calls... (Abort with CTRL+C)
2025-01-24 05:02:37.579008  [warning] local_client_endpoint_impl::connect: couldn't enable SO_REUSEADDR: Protocol not available
2025-01-24 05:02:37.579008  [warning] cei::connect_cbk: restarting socket due to(2):No such file or directory endpoint > 58a6376c18 socket state > 1
2025-01-24 05:02:37.579008  [warning] cei::shutdown_and_close_socket_unlocked: socket shutdown error (257): Socket is not connected endpoint > 58a6376c18 socket state > 1
2025-01-24 05:02:37.579008  [warning] cei::shutdown_and_close_socket_unlocked: socket has been reset  endpoint > 58a6376c18 socket state > 0
2025-01-24 05:02:37.579008  [info] routing_manager_client::on_disconnect: Client 0x1277 calling host_->on_state with DEREGISTERED
Sent status event with data size: 2073608 bytes
Waiting for calls... (Abort with CTRL+C)
Sent status event with data size: 2073616 bytes

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

1 participant