Log Agent Unable to Transmit Data to GRPC
Log Agent Unable to Transmit Data to GRPC in Log Forwarder Agent Issues.
Log Agent Unable to Transmit Data to GRPC#
The following output has the error displayed.Log Agent Unable to Transmit Data to GRPC
2020-08-24 13:40:10 ERROR vjLogger - Exception is got while sending
non-stitched data - null
java.lang.NullPointerException
at
com.appnomic.transformer.sink.GRPCSinkForStitching.sendOnNetwork(GRP
CSinkForStitching.java:101)
at
com.appnomic.transformer.sink.GRPCSinkForStitching.sendOnNetwork(GRP
CSinkForStitching.java:27)
at com.appnomic.appsone.sink.Sink.send(Sink.java:34)
at
com.appnomic.transformer.service.SinkService.processToSend(SinkServi
ce.java:123)
at
com.appnomic.logprocessor.service.LogProcessorService.process(LogPro
cessorService.java:254)
at
com.appnomic.logforwarder.FileReader.readFiles(FileReader.java:62)
at
com.appnomic.logforwarder.FileWatcher.readFiles(FileWatcher.java:127)
at
com.appnomic.logforwarder.Forwarder.infiniteLoop(Forwarder.java:260)
at com.appnomic.logforwarder.Forwarder.main(Forwarder.java:228)
2020-08-24 13:40:10 INFO vjLogger - Sending data....
2020-08-24 13:40:10 ERROR vjLogger - Exception is got while sending
non-stitched data - null
java.lang.NullPointerException
c.a.a.c.core.util.GRPCClient:59 - Error occurred in grpc init
method.
java.lang.IllegalArgumentException: ALPN is not configured properly.
See https://github.com/grpc/grpc-
java/blob/master/SECURITY.md#troubleshooting for more informati
on.
Follow the below steps to rectify the issue:
1. Create a folder inside the component agent.
2. Copy the below file from lib folder and paste in new folder:
netty-tcnative-openssl-static-2.0.7.Final-a1.jar
3. Navigate to new directory and execute the below command.
jar- xf netty-tcnative-openssl-static-2.0.7.Final-a1.jar
The META-INF folder will be generated
4. Navigate inside the META-INF folder:
cd /META_INF/
5. Inside the folder, copy the below file:
libnetty_tcnative
Note: Copy the folder as per OS (like RHEL, AIX, SOLARIS)
6. Check the dynamic library dependencies
ldd libnetty_tcnative_linux_x86_64.so
Expected Output:
warning: you do not have execution permission for
`./libnetty_tcnative_linux_x86_64.so'
linux-vdso.so.1 => (0x00007ffebe32f000)
librt.so.1 => /lib64/librt.so.1 (0x00007ff756d3e000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007ff756b06000)
libpthread.so.0 => /lib64/libpthread.so.0 (not found)
libc.so.6 => /lib64/libc.so.6 (0x00007ff75651d000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007ff756319000)
/lib64/ld-linux-x86-64.so.2 (0x0000556109b0a000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff756115000)
7. Provide the library path according to your environment under below configuration files:
vi .bashrc
or
vi .profile
or
vi .bash_profile
a. For RHEL and SOLARIS
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/users/appsonenode1/Build/Archives/
ssl
b. For AIX
export LIBPATH=$LIBPATH:/users/appsonenode1/Build/Archives/ssl
c. For HPUX
export SHLIBPATH=$SHLIBPATH:/users/appsonenode1/Build/Archives/ssl
d. Execute the below command to apply the recent environment changes instantly, avoiding log out and log in.
source ~/.bash_profile
8. Navigate to selfhealconfig file and provide below line:
JAVA_CUSTOM_ARGS=”-
Djava.library.path=/home/ComponentAgent/1267378jkhkjdhphy-189/netty”
9. Delete the Log file and agent-details.json,
To address issues related to ALPN (Application-Layer Protocol Negotiation) or file not found errors in certain commands, follow these steps:
a. Start by deleting the log file and the agent-details.json file associated with the Component Agent.
b. After performing the above step, initiate the Component Agent.
Failure of the stop.sh Script#
At times, when attempting to stop the LFA using the stop script, the operation fails, and an error message stating that the agent cannot be stopped is displayed.
This issue usually occurs when an incorrect LFA process ID (PID ) is stored in the .pidfile . To resolve this problem, follow these steps:
1. Check the below file, to verify if it contains the correct PID . The file indicates the current PID of the LFA and when it was started (in epoch time).
.pidfile
2. If the PID in the PID file is incorrect, delete the file using the below command:
rm .pidfile
3. To manually stop the LFA, use the below kill command with the correct PID:
kill -TERM <LFA_PID>
Replace <LFA_PID> with the actual process ID of the LFA.
Note:
When the LFA is running, there will be a .pidfile that states the current PID of the LFA and when it started (in epoch time).
After successfully stopping the LFA using stop.sh , a .stoppid file is generated, indicating the stopped PID and when it was stopped (in epoch time).
LFA Unable to Parse Date Format from Access Log#
Follow the below steps to rectify the issue:
1. Remove any extra space character in the "logDateFormats " parameter in your LFA configuration (conf.json) .
It should look like this:
"logDateFormats": [
"yyyy-MM-ddHH:mm:ss"
]
2. Add the "unsupportedChar " parameter under the LTM section after "process " and set it to "true " to eliminate or trim tab spaces:
"unsupportedChar": ["\t"]
Log Agent Startup Issue#
The Log Agent encounters startup issues with the following errors:
2021-06-04 14:34:05 ERROR vjLogger - Could not load saved states :
.log-forwarder—java (No such file or directory)
2021-06-04 14:34:05 ERROR vjLogger - Error : Name is null
java.lang.NullPointerException: Name is null
The root cause of the problem is that the parameter "osType " is missing in the Log Forwarder Agent's conf.json file.
To resolve this issue, add the appropriate "osType " parameter based on your OS:
For Linux:
"osType": "LINUX"
For windows:
"osType": "WINDOWS"
Adding the correct "osType " parameter will prevent this startup issue.