Reputation: 1
We are using the following command to start the mdsd process:
start("mdsd", "-a", "-C", "-j", "-T", "0x100000", "0x200000", "0x40000", "0x4000", "0x2002", "-c", "/etc/mdsd.d/mdsd.xml", "-r", MDSD_ROLE_PREFIX, "-e", MDSD_LOG+"/mdsd.err", "-w", MDSD_LOG+"/mdsd.warn", "-o", MDSD_LOG+"/mdsd.info", "-q", MDSD_LOG+"/mdsd.qos", "-L", MDSD_EVENTS_PERSIST_PATH, "-p", MDSD_PORT)
Even though we are specifying -p option we can see it's not via tcp_json but only json: 2024-01-30T14:30:12.6149880Z:
virtual void Subscription::execute(const MdsTime&) (.../mdsd/Subscription.cc +83) Start time 2024-01-30T14:25:00.0000000Z, end time 2024-01-30T14:30:00.0000000Z 2024-01-30T14:30:12.6200070Z: virtual void Subscription::execute(const MdsTime&) (.../mdsd/Subscription.cc +119) Processed 0 lines for 0x2de06c0 (Event [Bond]azurenfsaasfileaccesslogsver1v0, interval 300) 2024-01-30T14:30:15.4814710Z: void ProtocolListener::run() (.../mdsd/ProtocolListener.cc +168) New connection is ready for protocol 'json' on fd=22
I am able to start the process but when creating the client on a different host than where the process is running, I am not able to receive the ack from mdsd and it gets stuck on Read:
conn, err = net.Dial("tcp", "127.0.0.1:9001")
chunk := make([]byte, 10)
read, err := conn.Read(chunk)
if err != nil {
//return received, buffer.Bytes(), err
}
So how do we make mdsd listen to AF_INET tcp socket instead of AF_UNIX when starting mdsd process(what arguments to pass)?
root@20034a5fbc49:/var/run/mdsd# ls
default.lock default.pidport default_bond.socket default_djson.socket default_fluent.socket default_influx.socket default_json.socket default_syslog.socket
Upvotes: 0
Views: 397
Reputation: 3448
So how do we make mdsd listen to AF_INET tcp socket instead of AF_UNIX when starting mdsd process(what arguments to pass)?
MDSD is correctly configured to listen on an AF_INET
TCP socket.
Start cmd:
start("mdsd", "-a", "-C", "-j", "-T", "0x100000", "0x200000", "0x40000", "0x4000", "0x2002", "-c", "/etc/mdsd.d/mdsd.xml", "-r", MDSD_ROLE_PREFIX, "-e", MDSD_LOG+"/mdsd.err", "-w", MDSD_LOG+"/mdsd.warn", "-o", MDSD_LOG+"/mdsd.info", "-q", MDSD_LOG+"/mdsd.qos", "-L", MDSD_EVENTS_PERSIST_PATH, "-p", "tcp://127.0.0.1:9001")
TCP transport is -t
, and I want mdsd to listen on TCP port 9001,
Upvotes: 0