Category: Error Messages
Error: "Could not connect to server - no RPC server name found(specify on command line or in environment variable MAPMARKER_RPC_".
The following error is encountered when running mm_main while connected to the server:
"Could not connect to server - no RPC server name found(specify on command line or in environment variable MAPMARKER_RPC_".
Initially, it would appear that an environment variable is not set up correctly. However, there is no MAPMARKER_RPC_ environment variable (as is represented in the original standard error above, it is assumed that the environment variable is MAPMARKER_RPC_HOSTNAME).
The machine needs to be set up to use the MAPMARKER_RPC_HOSTNAME. This is the name of the host machine, which must be set to the location of the server on the client (DataBlade) machine.
By typing "env | grep MAP", this will print out to the console all of MapInfo specific environment variables. Make sure that MAPMARKER_RPC_HOSTNAME is included.
By taking a look into the source code for mm_main.c, notice that there is a segment where the MAPMARKER_RPC_HOSTNAME is loaded from the environment variable. It is necessary to make sure that this is set before running the object code (mm_main.o), as this will cause the error which has been encountered above.
char *rpcServerName = "";
rpcServerName = (char *)getenv("MAPMARKER_RPC_HOSTNAME");
"Could not connect to server - no RPC server name found"
"(specify on command line or in environment variable "
"MAPMARKER_RPC_HOSTNAME and rerun)");
Notice that the "if" statement exits upon error with an error condition of "1" as in exit(1). Exiting with a condition of "0", indicates that the program terminated normally, any other exit status terminates with error. For this reason, the program fails or "crashes" with the above noted comment.
Setting up the environment variables:
The installer initially creates two files in the MapMarker for UNIX directory. These files are mme.profile and mme.cshrc. These files contain environment variables. It is necessary to run either of the two (example: typing "source mme.cshrc" at the c shell command window in the topmost MapMarker Unix directory). It is possible to setup these environment variables for system wide use at startup in a file similar to etc/profile.