Closed AstreeDeshayes closed 2 years ago
I'm assuming you are trying to connect to a UDP receiver on the host. 127.0.0.1 used in plugin.txt refers to localhost of the container. You probably want host.docker.internal (try first) or sometimes 172.17.0.1 (try second) which reference the Docker host computer.
I still have some errors but I succeeded to send a command and to receive it so thank you !
Hello,
I am trying to connect a new interface to my computer with udp. I have configured the "plugin.txt" file as the following :
VARIABLE operations_target_name OPERATIONS
TARGET OPERATIONS <%= operations_target_name %> INTERFACE <%= operations_target_name %>_INT udp_interface.rb 127.0.0.1 8777 nil BURST MAP_TARGET <%= operations_target_name %>
However, once uploaded on COSMOS, the CmdTlmServer displays that my interface is connected but there is the following error message :
OPERATIONS_INT: ECONNREFUSED : Connection refused /usr/lib/ruby/3.0.0/socket.rb:456:in
__write_nonblock' /usr/lib/ruby/3.0.0/socket.rb:456:in
write_nonblock' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/io/udp_sockets.rb:93:inblock in write' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/io/udp_sockets.rb:91:in
loop' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/io/udp_sockets.rb:91:inwrite' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/interfaces/udp_interface.rb:165:in
write_interface' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/interfaces/interface.rb:285:inblock in write' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/interfaces/interface.rb:319:in
block in _write' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/interfaces/interface.rb:319:insynchronize' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/interfaces/interface.rb:319:in
_write' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/interfaces/interface.rb:257:inwrite' interface_microservice.rb:145:in
block in run' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/topics/interface_topic.rb:38:inblock in receive_commands' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:167:in
block (3 levels) in read_topics' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:165:ineach' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:165:in
block (2 levels) in read_topics' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:164:ineach' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:164:in
block in read_topics' /usr/lib/ruby/gems/3.0.0/gems/connection_pool-2.2.5/lib/connection_pool.rb:63:inblock (2 levels) in with' /usr/lib/ruby/gems/3.0.0/gems/connection_pool-2.2.5/lib/connection_pool.rb:62:in
handle_interrupt' /usr/lib/ruby/gems/3.0.0/gems/connection_pool-2.2.5/lib/connection_pool.rb:62:inblock in with' /usr/lib/ruby/gems/3.0.0/gems/connection_pool-2.2.5/lib/connection_pool.rb:59:in
handle_interrupt' /usr/lib/ruby/gems/3.0.0/gems/connection_pool-2.2.5/lib/connection_pool.rb:59:inwith' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:160:in
read_topics' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:66:inpublic_send' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/utilities/store_autoload.rb:66:in
method_missing' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/topics/topic.rb:32:inpublic_send' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/topics/topic.rb:32:in
method_missing' /usr/lib/ruby/gems/3.0.0/gems/cosmos-5.0.6.pre.beta0/lib/cosmos/topics/interface_topic.rb:37:inreceive_commands' interface_microservice.rb:57:in
run' interface_microservice.rb:41:in `block in start'Also, when I am trying to send a command I have : Error sending OPERATIONS EXAMPLE due to RuntimeError: Connection refused
Does someone know why ?
Thanks, Astrée