'ERROR: ctaInitialize' when using Windows Terminal Server
Information
Dialogic NaturalAccess Software is use to create development and runtime environment for creating voice, fxs, conferencing and video application using the Dialogic CG Series Media Boards.
Symptom
When a user attempts to login remotely to a server running Dialogic® NaturalAccess™ software, the message 'ERROR: ctaInitialize...' may be generated.
Errors such as CTAERR_INVALID_BOARD, CTAERR_SHAREMEM_ACCESS could be returned.
This procedure replicates the issue:
Connect to a server and log in with an account with administrator privileges from a client machine.
From the command line, use this command:
mstsc /v SERVER
Open a command prompt on SERVER, and start the CTATEST program. These actions will produce the following results:
NA Demonstration and Test Program V.2.3 (Apr 28 2004) NA Version is 4.13 … Initializing and creating the queue... ERROR: ctaInitialize returned 0x00000010 (see ctaerr.h)
Reason for the issue
The NaturalAccess ctdaemon service creates and manages processing contexts on behalf of applications, allowing applications to share and hand-off server resources. Ctdaemon also allows developers to modify system global default parameters, set the global trace mask, and optionally log trace messages to a file. Ctdaemon is installed as a Windows service and is started up at boot time.
When developing new NaturalAccess applications, it is common for developers to remotely log in via a Windows Terminal Server session. Ctdaemon creates global shared memory at startup and does not follow the proper naming conventions for global named objects, such as shared memory and synchronization primitives, that need to be shared between login sessions. This causes a problem in the ctaInitialize function if the developer is not connected to the “Console” session.
Workaround
It is possible to work around this issue by connecting to the 'console' session (session id 0). This can be accomplished by using the following command line:
mstsc /v SERVER /console
Only one user at a time can connect to the console session.
NOTE
The /console switch has been deprecated for the following Windows version
Windows Server 2008
Windows Vista Service Pack 1 (SP1)
Windows XP Service Pack 3 (SP3)
For those Windows version, the /console switch can be replaced by the /admin switch ( introduced in RDC 6.1 ) .
mstsc.exe /admin