User Tools

Site Tools


agent_no_relative_directories

Specify Working Directories for Agent Files

Fluorine

By default the agent.xml file, log4j2.xml file, and perspectium_data directory will be saved in the parent Replicator Agent directory. However, you can make some manual changes to agent configuration files to specify a different “working directory” for these files/directories.

NOTE: You will still need to keep a conf directory in the parent directory for the Replicator Agent. However, in the new working directory that you specify you must also create a conf directory containing your agent.xml and log4j2.xml files. You must also create a logs directory. This is where your agent logs will be generated. The perspectium_data directory will be generated in the first level of the working directory alongside these two directories.

Specifying Working Directories for the Agent in Windows

To specify a working directory for the Replicator Agent in Windows, follow these steps:

1. Locate the agent.bat file in the Replicator Agent parent directory that was created upon initial installation of the agent.

2. Open the agent.bat file in your preferred text editing application and locate the following line in the file: SET JAVA_ARGS=-Xmx%2 -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=“%~dp0..\conf\log4j2.xml” -Dcom.perspectium.working.directory=“DIRECTORY_PATH” -classpath “%~dp0..\jars*”;“%~dp0..\extlib*” com.perspectium.replicator.Replicator

Replace this line with: SET JAVA_ARGS=-Xmx%2 -Dfile.encoding=UTF-8 -Dlog4j.configurationFile=“DIRECTORY_PATH\conf\log4j2.xml” -Dcom.perspectium.working.directory=“DIRECTORY_PATH” -classpath “%~dp0..\jars*”;“%~dp0..\extlib*” com.perspectium.replicator.Replicator

where DIRECTORY_PATH is the full path for the working directory where you want to save these directories.

3. Also within the agent.bat file, locate this line: SET JAVA_ARGS=-Dfile.encoding=UTF-8 -Dlog4j.configurationFile=“%~dp0..\conf\log4j2.xml” -Dcom.perspectium.working.directory=“DIRECTORY_PATH” -classpath “%~dp0..\jars*”;“%~dp0..\extlib*” com.perspectium.replicator.Replicator

Replace this line with: SET JAVA_ARGS=-Dfile.encoding=UTF-8 -Dlog4j.configurationFile=“DIRECTORY_PATH\conf\log4j2.xml” -Dcom.perspectium.working.directory=“DIRECTORY_PATH” -classpath “%~dp0..\jars*”;“%~dp0..\extlib*” com.perspectium.replicator.Replicator

where DIRECTORY_PATH is the full path for the working directory where you want to save these directories.


Specifying Working Directories for the Agent in Linux

To specify the working directory for the Replicator Agent in Linux, follow these steps:

1. Locate the wrapper.conf file within the conf directory in the Replicator Agent parent directory that was created upon initial installation of the agent.

2. Open the wrapper.conf file in your preferred text editing application and locate the following line in the file: wrapper.java.additional.2=-Dlog4j.configurationFile=file:../conf/log4j2.xml

Replace this line with: wrapper.java.additional.2=-Dlog4j.configurationFile=file:DIRECTORY_PATH/conf/log4j2.xml

3. Directly under this line add another line: wrapper.java.additional.3=-Dcom.perspectium.working.directory=DIRECTORY_PATH

where DIRECTORY_PATH is the full path for the working directory where you want to save these folders.

agent_no_relative_directories.txt · Last modified: 2020/02/27 13:52 by robert.fan