Open lowang opened 1 year ago
@lowang sorry to hear that you're running into issues - thanks for letting us know about this though
Have you successfully been using our agent with Solr before - perhaps different combinations of versions - or is this your first time using our agent?
Assuming that you've successfully been using our agent with Solr before, what changes/upgrades in your environment have been made recently?
Have you identified any other workarounds you're able to use?
@kford-newrelic unfortunately no, I'm stuck here. Since I'm using official Solr image I was hoping to get it working out of the box. Looking for your assistance how to proceed.
Seems like JAVA_VERSION
variable changed between Solr 8.6 & 9 versions from: 11.0.15
to jdk-17.0.5+8
but according to https://docs.newrelic.com/docs/apm/agents/java-agent/getting-started/compatibility-requirements-java-agent/
this is supported.
Are you able to try using Java 11?
Just want to see if we can rule in/out whether it's Java 17 related
@kford-newrelic I've build Solr image using java 11, according to https://github.com/apache/solr/tree/main/solr/docker#building-from-the-solr-binary-distribution
docker build --build-arg BASE_IMAGE=eclipse-temurin:11-jre-focal -f solr-9.1.0/docker/Dockerfile -t solr:9.1.0 - < solr-9.1.0.tgz
however result is the same.
@lowang sorry to hear that; we do have some customers using Solr 9 successfully, so we'd need to investigate more what's going on with the image/approach that you're using.
Unfortunately, we weren't able to get this on our roadmap for the next (Jan-Mar) quarter, so we can't give a commitment on when that can happen.
Jira CommentId: 149713 Commented by jkeller:
This can be repro'd by downloading the [Solr 9.1.1 binary,|#solr-911] adding the agent in the {{bin/solr.in.sh}} script (as shown below), {code:java} SOLR_OPTS="$SOLR_OPTS -javaagent:/path/to/newrelic/newrelic.jar" {code} and starting the solr server demo project via {code:java} bin/solr start -e techproducts {code} You should see the {{VerifyError}} in the {{../solr-9.1.1/example/techproducts/logs/solr.log}}
From the list of major changes:
Solr now runs with the Java security manager enabled by default. Hadoop users may need to disable this.
It appears that disabling this may prevent this issue
Need to investigate further to understand the root cause of the conflict
I also ran into this - confirmed that setting SOLR_SECURITY_MANAGER_ENABLED=false 'fixes' the issue.
So adding the following grants into the security manager gets you to the above message, assuming you're installing newrelic into /opt/newrelic.
grant {
// allow the new relic agent
permission java.io.FilePermission "/opt/newrelic${/}-", "read";
permission java.io.FilePermission "/opt/newrelic", "read,";
permission java.io.FilePermission "/proc/sys/kernel/random/boot_id", "read";
permission java.io.FilePermission "/proc/self/mountinfo", "read";
permission java.io.FilePermission "/proc/self/cgroup", "read";
permission java.io.FilePermission "/proc/cpuinfo", "read";
};
with solr.
Additionally this seems to be the same issue in #1416 where @jasonjkeller did an excellent analysis of the broader issues involved with the weaver/weaving, this appears from initial analysis to be the same.
Description
Solr fails to start, first WARN is
then logs are full of:
Cannot reach Solr UI on localhost:8983
Expected Behavior
Solr UI reachable via localhost:8983
Troubleshooting or NR Diag results
Steps to Reproduce
download and unzip newrelic-java.zip in current folder, then:
Your Environment
Eclipse Adoptium OpenJDK 64-Bit Server VM 17.0.5 17.0.5+8 Official solr:9 docker image.
Additional context