If the CmapServer is giving problems because of the amount of memory allocated, possibly because the number of folders or resources stored is in the tens or hundreds of thousands, you may need to increase the amount of memory allocated to run it.
The CmapServer is written in Java. The Java Virtual Machine (VM) is assigned a specific amount of memory when launched, and is limited by that amount. On the other hand, the VM consumes memory until it uses all the memory allocated to it, so you need to be careful not to allocate too much memory, particularly if your computer does not have a lot of memory.
By default, IHMC CmapServer is assigned 512 MB for the minimum heap size and 1024 MB for the maximum heap size of memory. This has been found to be adequate for most users. (For reference, the large Public CmapServers at IHMC run with a maximum heap size of 3072 MB. The smaller CmapServers at IHMC run with a maximum of 1024 MB).
To increase the amount of memory allocated, you need to modify a file called "CmapServer.lax" which is found in a directory (folder) called "bin", under the directory (folder) where the CmapServer program was installed. By default, this file is located in the directory (folder):
C:\Program Files\IHMC CmapServer\bin (Windows)
/home/<user_name>/IHMC_CmapServer (Linux)
Inside the file, using a text editor (e.g. NotePad, vi), find the line that indicates, in bytes, the amount of memory that will be used by the CmapServer. It should look something like (the number at the end may be different):
lax.nl.java.option.java.heap.size.max =1073741824
(where the number at the end indicates the number of bytes)
To increase the amount of memory, for example to 2048 MB , you need to change the line to:
lax.nl.java.option.java.heap.size.max =2122317824
(where 2,122,317,824 bytes = 2048 * 1024 * 1024 = 2048 MB)
For this change to take effect, save the file and start the CmapServer again.
Locate the folder where the CmapServer application is installed. Open the "bin" folder.
Right-click on the "CmapServer.app" file and select "Show Package Contents".
Open the "Contents" folder.
With a text editor, edit the "Info.plist" file.
Look for the entries:
<string>-Xms256M</string>
<string>-Xmx512M</string>
These are the minimum and maximum sizes. Change and 256M and 512M for whatever value you need, particularly the maximum size.
For this change to take effect, save the file and start the CmapServer again.
A CmapServer is identified within the CmapTools network by its "serverid", its unique identifier. This identifier is defined in the "serverconfig.txt" file, located in the "bin" directory, which is under the directory where the CmapServer is installed. It is therefore key that this "serverid", and in general that this "serverconfig.txt" file be kept.
The following steps show how to copy a CmapServer to another directory within the same computer or to another computer.
COPY “…/<current CmapServer installation directory>/serverRootFolder”
TO “…/<destination CmapServer installation directory>/serverRootFolder”
COPY “…/<current CmapServer installation directory>/bin/serverconfig.txt”
TO “…/<destination CmapServer installation directory>/bin/serverconfig.txt”
Important ! If you move the CmapServer to another computer, its best if you maintain the Host Name, domain name and IP Address of the original computer on the destination computer so that URL links pointing to resources stored in your CmapServer are preserved. This includes the HTML version of Cmaps already stored on your CmapServer.
If there are blanks next to “server.hostname=” and “server.ip.address=” in the CmapServer Configuration File (serverconfig.txt) on the new location, then fill them in with the Host Name and IP Address that you just assigned to the destination computer in these two locations on the "serverconfig.txt" file (located in the "bin" directory). If your host computer has more than one network card, make sure you give the IP Addres to the "server.bind.address=" parameter.
##################################################################################
# The bind address is the Internet address that the server and the
# webserver will be listening on for incoming requests. When not specified,
# the server and the webserver will listen on any/all local addresses
# (including 127.0.0.1).
#
# Unless the server and the webserver need to be configured to run in a
# multi-homed environment, it is recommended to leave this parameter
# empty.
#
# Example: server.bind.address = 123.123.123.1
server.bind.address= ################################################################################# # The hostname is the Internet address that will be used to generate the URLs of the web # pages of the Cmaps stored on the CmapServer, and it is determined automatically by the # server. # # Edit this property if you want the server to use a specific hostname to generate the URLs. # It is recommended that you enter a full computer name rather than an IP address. # # Example: server.hostname=mypc.mydomain # server.hostname= # ################################################################################# # The IP address is the Internet address that CmapTools will use to contact the CmapServer and # it is automatically determined and registered by the server. # # Edit this property if you want the server to register a specific IP address. Use only dotted- # decimal TCP/IP addresses. # # Example: server.ip.address=123.123.123.1 # server.ip.address= # ##################################################################################
By default, the CmapServer registers its services with the Directoy of Places (DOP). The CmapTools client contacts the DOP to get a list of registered CmapServers. To prevent your CmapServer from automatically registering with the DOP, you need to locate and edit the "slp.conf" configuration file which is found in a directory (folder) called "bin", under the directory (folder) where the CmapServer program was installed. Edit the file and locate the line:
net.slp.registerWithDa=true
Change the entry to read:
net.slp.registerWithDa=false
The CmapServer must be restarted for change to take effect. The entry will be removed from the DOP after it timesout.
Yes. The CmapTool Desktop client and the CmapServer can use an LDAP server for permissions. For more information on how to configure LDAP with a CmapServer and use LDAP permissions in CmapTools, please visit the LDAP documentation for both CmapTools and the CmapServer:
Yes, you can change passwords and add additional server admins to the standard and LDAP root folder Administrator lists. You can also change the the SSL keystore password, the PKI keystore password, the current "AdminTool" admin password, and replace the admin account of the existing "AdminTool" admin of the server with a different admin.
Here is the procedure:
ssl.keystore.password=
pki.keystore.password=
admin.password=
root.folder.password=
ldap.root.folder.password=
admin.account=
To add a new Administrator for either of the root folder accounts, you'll need to replace the user ID(s) with the new admin's user ID for one or both of these parameters:root.folder.account=
ldap.root.folder.account=
If you added a new root folder admin, they should now be successfully added as an additional root folder Administrator in the permissions list in CmapTools. Additionally if you added a new root folder admin, you will not have to worry whether or not the first admin's account was replaced; the previously-listed admin should still be listed as an Administrator of the server root folder when viewing its permissions list using CmapTools. If you just changed the existing root folder admin's password, that admin must now authenticate in CmapTools using their new password.
All passwords that were replaced will again be encrypted in the "serverconfig.txt" file once the CmapServer has been launched.
If you have a .p12 file (PKCS12 certificate) which already includes the private key, certificate, and certificate chain, you can skip to step 3.
Here is the procedure:
openssl pkcs12 -in <certificate.p12> -out clientcert.pem -nodes –clcerts
openssl pkcs12 -export -in <server certificate> -inkey <private key> -out <server.p12> -name <chose-an-alias> -CAfile <CA certificate chaine> -caname root -chain
keytool -importkeystore -deststorepass <output password> -destkeypass <output password>
-destkeystore <output keystore filename> -srckeystore <.p12 file> -srcstoretype PKCS12
-srcstorepass <password to open .p12 file> -alias <alias from step 2>
Versions of the CmapServer that are v4.11 Beta 2 or higher can successfully authenticate and bind with the Active Directory LDAP server, but only for users at this time. No groups are currently recognized when using CmapTools to browse the list of groups for permissions on a folder stored in a CmapServer that binds with an AD server. When configuring the CmapServer to use an AD LDAP server, the server admin should keep the following in mind: