Working With U2 Clients Against U2 Unirpcd Daemons Using a Different Port

Paul Chang

June 12, 2019

Using multiple unirpcd daemons to balance client requests can have a positive impact on performance. Also, using a different port for a specific application simplifies management. And, if users are on a newer version of UniData or UniVerse, they might want to use a different port specifically for a secure connection.

On newer versions of UniData and UniVerse, multiple Unirpcd Daemons with different port numbers on Microsoft Windows is supported. When you install UniData or UniVerse, the unirpcd daemon uses deaful port # 31438. This allow all U2 clients ti connect to the UniData or UniVerse server without any additional setting. You might want to start two unirpcd daemons with two different ports for shared unirpcd daemon loading. This blog provides details on U2 clients working against the Unirpcd daemon with different port setting., e.g. # 32438.


Data Server Verson
UniVerse (Windows) or later

Univers (UNIX), 12.1.1 or later
UniData (Windows) 8.2.1 or later
UniData (UNIX) 9.0.0 or later

On UniVerse, users can create a new unirpcd daemon with a different port. This feature with more options will be implemented in future UniData and UniVerse versions.


unirpcd -i [-n “name-of-service”] [ -p xxxxx] [-m “Description”]
• -i – install new windows service
• -n name-of-service – Windows service name
• -p xxxxx is the port number of the unirpcd listener
• -m Description – Service name description

The next example is to start another unirpcd daemon on Windows with port # 32438. You must start a command prompt in administrator mode and run the unirpcd command with the option.

C:\U2\unishared\unirpc>unirpcd -i -p 32438 -n “Uni RPC Service – 32438” -m “unirpcd_32438” unirpc-32438 installed.


You can use Windows Service control to start the service or the net start command.

C:\U2\unishared\unirpc>net start “Uni RPC Service – 32438”

The Uni RPC Service – 32438 service is starting.

The Uni RPC Service – 32438 service was started successfully.

If you want to remove a newly created service name, you can use the “-r” parameter to remove it.

C:\U2\unishared\unirpc>unirpcd -r -p 32438

Are you sure you want to remove Uni RPC Service listening on port 32438? [y|n]: y

unirpc-32438 removed.

For other U2 clients, it might be different to set a new port. We will use the following samples to explain the different port setting.

For UniObjects, U2 Toolkit native, uci and JDBC connection, you can specify the port number in the host field using the colon “:” as a delimiter. For example, you could set it to “localhost:32438” for using the port # 32438 daemon.


When using the U2 ODBC client, you can define the port number inside the host field in the U2 ODBC UCI configuration (uci.config) file.

Here is an example for the localuv data source defined in the uci.config file.

< localuv >


network = TCP/IP

service = uvserver

host = localhost:32438

In the UO.NET session object, you can specify the port number # 32438 instead of the default # 31438.

Here is the sample UO.NET session syntax.

Uonet_session = UniObjects.OpenSession(“localhost”, 32438, “administrator”, “password”, “HS.SALES”, “uvcs”)

It is similar for UniObjects for Java (UOJ) connection. You need to set the host port in the session object.

Here is another sample syntax for UOJ.








unirpcd -pxxxxx

The next example is to start another unirpcd daemon on UNIX with port # 32438. You must add a new service name in the /etc/services file.

[[email protected]]# ./unirpcd -p32438

[[email protected]]# netstat -na|grep 32438

tcp 0 0 :::32438 :::* LISTEN


[[email protected]]# netstat -na|grep 32438

tcp 0 0 :::32438 :::* LISTEN

tcp 0 0 ::ffff: ::ffff: ESTABLISHED