COVESA / vsomeip

An implementation of Scalable service-Oriented MiddlewarE over IP
Mozilla Public License 2.0
1.01k stars 647 forks source link

[BUG]: 1 Configuration module could not be loaded! #642

Closed anonymousAlpha-96 closed 2 months ago

anonymousAlpha-96 commented 2 months ago

vSomeip Version

v3.4.10

Boost Version

1.71

Environment

UBUNTU 20.04.6LTS

Describe the bug

Hi team,

Newly I started working on this application, so I followed the steps which is provided by the group [ https://github.com/COVESA/capicxx-someip-tools/wiki/CommonAPI-C---SomeIP-in-10-minutes and https://github.com/COVESA/capicxx-dbus-tools/wiki/CommonAPI-C---D-Bus-in-10-minutes]. Once after the execution of HelloworldService and HelloworldClient application I'm getting an error like 1 Configuration module could not be loaded! and the command prompt stops responding so any suggestions or supports would be helpful.

Thanks! image

Reproduction Steps

No response

Expected behaviour

Server-Side application output : <.>/project$ COMMONAPI_CONFIG=commonapi4someip.ini LD_LIBRARY_PATH=../install_folder/lib:$PWD/build/ build/HelloWorldService [23950.507151]~DLT~236605~INFO ~FIFO /tmp/dlt cannot be opened. Retrying later... [CAPI][INFO] Loading configuration file 'commonapi4someip.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.HelloWorld:v0_1:commonapi.examples.HelloWorld stub. [CAPI][INFO] Loading configuration file /etc//commonapi-someip.ini [CAPI][DEBUG] Added address mapping: local:commonapi.examples.HelloWorld:v0_1:commonapi.examples.HelloWorld <--> [1234.1234(0.1)] [CAPI][VERBOSE] Registering function for creating "commonapi.examples.HelloWorld:v0_1" proxy. [CAPI][INFO] Registering function for creating "commonapi.examples.HelloWorld:v0_1" stub adapter. [CAPI][DEBUG] Loading interface library "libHelloWorld-someip.so" succeeded. [CAPI][INFO] Registering stub for "local:commonapi.examples.HelloWorld:v0_1:commonapi.examples.HelloWorld" 2024-01-15 15:19:37.859585 [info] Parsed vsomeip configuration in 0ms 2024-01-15 15:19:37.860096 [info] Configuration module loaded. 2024-01-15 15:19:37.860236 [info] Security disabled! 2024-01-15 15:19:37.860327 [info] Initializing vsomeip (3.4.10) application "service-sample". 2024-01-15 15:19:37.860947 [info] Instantiating routing manager [Host]. 2024-01-15 15:19:37.862274 [info] create_routing_root: Routing root @ /tmp/vsomeip-0 2024-01-15 15:19:37.863333 [info] Service Discovery enabled. Trying to load module. 2024-01-15 15:19:37.866415 [info] Service Discovery module loaded. 2024-01-15 15:19:37.866855 [info] vsomeip tracing not enabled. . vsomeip service discovery tracing not enabled. 2024-01-15 15:19:37.866967 [info] Application(service-sample, 1000) is initialized (11, 100). 2024-01-15 15:19:37.868205 [info] Starting vsomeip application "service-sample" (1000) using 2 threads I/O nice 255 2024-01-15 15:19:37.869827 [info] Client [1000] routes unicast:127.0.0.1, netmask:255.255.255.0 2024-01-15 15:19:37.869839 [info] shutdown thread id from application: 1000 (service-sample) is: 7fabd1aa0640 TID: 236612 2024-01-15 15:19:37.869587 [info] main dispatch thread id from application: 1000 (service-sample) is: 7fabd22a1640 TID: 236611 2024-01-15 15:19:37.871275 [info] create_local_server: Listening @ /tmp/vsomeip-1000 2024-01-15 15:19:37.871338 [info] Watchdog is disabled! 2024-01-15 15:19:37.871649 [info] OFFER(1000): [1234.1234:0.1] (true) Successfully Registered Service! Waiting for calls... (Abort with CTRL+C) 2024-01-15 15:19:37.872233 [info] io thread id from application: 1000 (service-sample) is: 7fabd2aa2640 TID: 236610 2024-01-15 15:19:37.872284 [info] io thread id from application: 1000 (service-sample) is: 7fabd0a9e640 TID: 236614 2024-01-15 15:19:37.873185 [info] vSomeIP 3.4.10 | (default) 2024-01-15 15:19:37.873665 [info] Network interface "lo" state changed: up 2024-01-15 15:19:47.873624 [info] vSomeIP 3.4.10 | (default) 2024-01-15 15:19:48.958002 [info] Application/Client 1001 is registering. 2024-01-15 15:19:48.958866 [info] Client [1000] is connecting to [1001] at /tmp/vsomeip-1001 2024-01-15 15:19:48.965954 [info] REGISTERED_ACK(1001) 2024-01-15 15:19:48.047561 [info] REQUEST(1001): [1234.1234:0.4294967295] sayHello('World'): 'Hello World!' sayHello('World'): 'Hello World!'

Client-Side output : <.>/project$ COMMONAPI_CONFIG=commonapi4someip.ini LD_LIBRARY_PATH=../install_folder/lib:$PWD/build/ build/HelloWorldClient [23961.712646]~DLT~236711~INFO ~FIFO /tmp/dlt cannot be opened. Retrying later... [CAPI][INFO] Loading configuration file 'commonapi4someip.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.HelloWorld:v0_1:commonapi.examples.HelloWorld proxy. [CAPI][INFO] Loading configuration file /etc//commonapi-someip.ini [CAPI][DEBUG] Added address mapping: local:commonapi.examples.HelloWorld:v0_1:commonapi.examples.HelloWorld <--> [1234.1234(0.1)] [CAPI][VERBOSE] Registering function for creating "commonapi.examples.HelloWorld:v0_1" proxy. [CAPI][INFO] Registering function for creating "commonapi.examples.HelloWorld:v0_1" stub adapter. [CAPI][DEBUG] Loading interface library "libHelloWorld-someip.so" succeeded. [CAPI][VERBOSE] Creating proxy for "local:commonapi.examples.HelloWorld:v0_1:commonapi.examples.HelloWorld" 2024-01-15 15:19:48.930730 [info] Parsed vsomeip configuration in 0ms 2024-01-15 15:19:48.932947 [info] Configuration module loaded. 2024-01-15 15:19:48.933987 [info] Security disabled! 2024-01-15 15:19:48.934975 [info] Initializing vsomeip (3.4.10) application "client-sample". 2024-01-15 15:19:48.936279 [info] Instantiating routing manager [Proxy]. 2024-01-15 15:19:48.937839 [info] Client [ffff] is connecting to [0] at /tmp/vsomeip-0 2024-01-15 15:19:48.943738 [info] vsomeip tracing not enabled. . vsomeip service discovery tracing not enabled. 2024-01-15 15:19:48.943958 [info] Application(client-sample, ffff) is initialized (11, 100). Checking availability! 2024-01-15 15:19:48.947412 [info] Starting vsomeip application "client-sample" (ffff) using 2 threads I/O nice 255 2024-01-15 15:19:48.950385 [info] io thread id from application: ffff (client-sample) is: 7f8b4b048640 TID: 236717 2024-01-15 15:19:48.950519 [info] io thread id from application: ffff (client-sample) is: 7f8b49845640 TID: 236720 2024-01-15 15:19:48.951232 [info] shutdown thread id from application: ffff (client-sample) is: 7f8b4a046640 TID: 236719 2024-01-15 15:19:48.951872 [info] main dispatch thread id from application: ffff (client-sample) is: 7f8b4a847640 TID: 236718 2024-01-15 15:19:48.955628 [info] create_local_server: Listening @ /tmp/vsomeip-1001 2024-01-15 15:19:48.956241 [info] Client 1001 (client-sample) successfully connected to routing ~> registering.. 2024-01-15 15:19:48.956510 [info] Registering to routing manager @ vsomeip-0 2024-01-15 15:19:48.963835 [info] Application/Client 1001 (client-sample) is registered. 2024-01-15 15:19:48.048616 [info] ON_AVAILABLE(1001): [1234.1234:0.1] Available... 2024-01-15 15:19:48.049840 [info] Client [1001] is connecting to [1000] at /tmp/vsomeip-1000 [CAPI][DEBUG] Message sent: SenderID: 1234 - ClientID: 4097, SessionID: 1 Got message: 'Hello World!' [CAPI][DEBUG] Message sent: SenderID: 1234 - ClientID: 4097, SessionID: 2 Got message: 'Hello World!'

Logs and Screenshots

BrunoLSilvaCTW commented 2 months ago

Hi @anonymousAlpha-96,

1 Configuration module could not be loaded! usually points to an issue with LD_LIBRARY_PATH. Check if the path actually points to the vsomeip libraries, and try running ldconfig to update the library cache.

See #466 for more info.

anonymousAlpha-96 commented 2 months ago

hi @BrunoLSilvaCTW

I cross checked the above-mentioned issue ticket, but I guess both issues are different. I built the project inside the directory of capicxx-someip-runtime repository and the above mentioned is built inside the vsomeip directory. I tried the above-mentioned (#466) procedures, but the issue remains the same. kindly suggest any other ways.

thanks in advance!

BrunoLSilvaCTW commented 2 months ago

Can you share the output of the following command?

find ../install_folder/lib "$PWD/build/" -iname "*libvsomeip3-cfg*"

Run it in the same folder where you run the executable. The output should look something like this:

$ find ./build ./local -iname "*libvsomeip3-cfg*"
./build/vsomeip/libvsomeip3-cfg.so
./build/vsomeip/libvsomeip3-cfg.so.3
./build/vsomeip/libvsomeip3-cfg.so.3.5.0
./local/lib/libvsomeip3-cfg.so
./local/lib/libvsomeip3-cfg.so.3
./local/lib/libvsomeip3-cfg.so.3.5.0
anonymousAlpha-96 commented 2 months ago

Hi @BrunoLSilvaCTW ,

Results for the above-mentioned commands:

find ./build ./local -iname "libvsomeip3-cfg"

find_libvsomeip3-cfg_insideProjectDir find_libvsomeip3-cfg_insideVSomeIP

_find ../installfolder/lib "$PWD/build/" -iname "libvsomeip3-cfg"

find_libvsomeip3-cfg
BrunoLSilvaCTW commented 2 months ago

It does seem like the libraries are in the correct path. Can you also run this command?

LD_LIBRARY_PATH="../install_folder/lib:$PWD/build/" COMMONAPI_CONFIG=commonapi4someip.ini strace -o strace.txt build/HelloWorldService

This will generate a strace.txt file with the system calls that the application is performing. Please, upload the file here so we can have a look.

anonymousAlpha-96 commented 2 months ago

Hi, I'm attaching the strace file for the further reference:

strace.txt

BrunoLSilvaCTW commented 2 months ago
openat(AT_FDCWD, "../install_folder/lib/libvsomeip3-cfg.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

It seems that the executable is unable to find the library. Can you try specifying the complete path when calling the executable? Something like:

LD_LIBRARY_PATH=/full/path/to/install_folder/lib
anonymousAlpha-96 commented 2 months ago

Hi @BrunoLSilvaCTW ,

Yup it works. Thanks a lot.

I'm attaching the final output screen for the future reference with the appropriate command: _LD_LIBRARY_PATH="/mnt/d/CPPDemo/ComSomSetUP/install_folder/lib:$PWD/build/" COMMONAPI_CONFIG=commonapi4someip.ini strace -o strace.txt build/HelloWorldService_

image