SMA and LLA Guide : Creating and running SMA applications : Troubleshooting SMA
  
Troubleshooting SMA
This section provides instructions and guidelines on how to prevent or troubleshoot common problems while configuring or using SMA.
Error: Server could not allocate shared memory segment by id -1
Symptoms
When trying to start a SMA server, the following type of error is displayed, and the SMA server cannot be started.
solidDB® process has encountered an internal error and is unable to
continue normally. Report the following information to technical support.
SOLID Fatal error: Out of central memory when allocating buffer memory (size = 33554432)
Date: 2014-11-30 15:39:44
Product: solidDB®
Version: 100.0.0.0 Build 2014-11-30
[solid1]~ ./solidsma -f -c .
Server could not allocate shared memory segment by id -1
Causes
The SMA server startup fails because there is no memory available. This situation can occur if:
When a SMA application or SMA server terminates abnormally, they can leave shared memory allocated. Even if you shut down all SMA processes, the shared memory is still left reserved.
You have allocated too little memory for SMA use.
This leads to a situation where all memory is used and you cannot start a SMA server any more.
Resolving the problem
In Linux and UNIX environments, clear the hanging shared memory segments with the ipcrm command.
For example in Linux environments, use the following script to identify and remove the unused shared memory segments.
#!/bin/sh

if [ $# -ne 1 ]
then
  echo "$0 user"
  exit 1
fi

for shm_id in $(ipcs -m|grep $1|awk -v owner=$1 ' { if ( owner == $3 )
     {print $2} }')
do
  ipcrm -m $shm_id
done
For more details on the ipcrm command, see your operating system documentation.
Cannot map shared memory area
Symptoms
When trying to connect to a SMA server, the following type of error is displayed, and the connection fails.
Linux and UNIX operating systems
cannot map shared memory area 1288077395 to 0x2b0029800000 Cannot connect to target database.
Windows operating systems
SQL State "08004"; Native Error Code "25215";
Error Text "SMA failed in MapViewOfFileExt,
desired addr: 0000000800000000, got addr: 000000000000000000, error: 6.
Causes
When started, the SMA starts attaching shared memory segments to an address space that is used by another process.
Resolving the problem
In general, the earlier your application connects to the SMA server, the less likely it is that the address space requested by solidDB® is in use.
The SMA server uses the following address spaces by default:
Operating system
Default start address space [1]
AIX
0x700000010000000ul
Linux 64-bit
0x2c0000000000
Linux 32-bit
0x50000000
Solaris Intel
0x2b0000000000
Solaris Sparc
0xffffffff60000000
Windows
0x0000000080000000
[1] The start address space is the value of the parameter shmaddr in the shmat() system call.
1 Force the start address space for the SMA server to a different address space using the environment variable SOLSMASTART.
Linux and UNIX operating systems:
export SOLSMASTART=<start_address_space>
For example:
export SOLSMASTART=0x2b0000000000
Windows operating systems:
set SOLSMASTART=<start_address_space>
For example:
set SOLSMASTART=0x0000000800000000
2 Restart the SMA server.
Error 21300: Protocol 'sma' is not supported
Symptoms
When trying to connect to a SMA server, the following type of error is displayed:
Error HY000: SOLID Communication Error 21300: Protocol 'sma' is not supported SQLConnect failed
Causes
The application has been linked both to the solidDB® ODBC library and the SMA library (ssolidsmaxx).
Resolving the problem
Check your application code and remove any references to the solidDB® ODBC libraries (for example, sacl2x70.so or socw6470.dll.
See also
Creating and running SMA applications