Logtstash config for websocket output plug-in

Hi,
I am trying to use the Logstash websocket Output plugin to transfer data from one server to another.

Host 1: created a config file given below

input {
stdin {}
}

filter {}

output {
websocket {
codec => "json"

            host => "host2_ip_address"
            port => "6700"
            }

}

Getting the below error:
websocket server failed {:exception=>#Errno::EADDRNOTAVAIL: Cannot assign requested address - bind - Cannot assign requested address>, :level=>:error}

I have checked the host2:6700 is accessible from host1.

Regards,
Asrar

Quoting the docs:

This output runs a websocket server and publishes any messages to all connected websocket clients.

So, the plugin expects host2 to connect to it, not the other way around. Perhaps you should use the http output instead?