Skip to main content

Summary

OSAgent cannot be started when the localaddr file is saved with Unicode encoding. The localaddr file is used to restrict OSAgent to use a particular network interface when create a TCP listener in a multi-homed machine. By default, OSAgent will listen on all the network interfaces.

Environment

Product: VisiBroker 8.5
Platform: Windows

Question/Problem Description

The OSAgent could not be started and the debug log shows bind failed error. This particular OSAgent is configured with localaddr file using OSAGENT_LOCAL_FILE environment variable to restrict the IP in a multi-homed machine.

Error Message

The error in the OSAgent debug log is:

==>> Mon Oct 13 17:51:42 2014, dsachdlr.C, 0, Inf
DSAClientHandler() Binding to <ÿþ1, 0>.

==>> Mon Oct 13 17:51:45 2014, dsathdlr.C, 0, Inf
create_instances() Bound to the following interfaces:

==>> Mon Oct 13 17:51:45 2014, dsathdlr.C, 0, Inf
DSATCPClientHandler() Listening on <ÿþ1, 0>.

==>> Mon Oct 13 17:51:48 2014, dsathdlr.C, 0, Ftl
DSATCPClientHandler() Exiting upon bind failed: 0 No error

Resolution

The root cause of this issue is, the localaddr file was saved with Unicode encoding. Unicode represents every character using two bytes. Because of this reason, the OSAgent gets invalid characters such as "ÿþ1" as shown in the log instead of the configured IP from the localaddr file when trying to create a TCP listener. So, the solution for this problem is to save the localaddr file with ANSI encoding. You can also refer [[VisiBroker localaddr file FAQ]] on how to create a localaddr file.


#ansi
#unicode
#VisiBroker
#localaddr
#Security
#osagent