We've installed the NewRelic java agent on our WebSphere Application / WebSphere Commerce system and in the NewRelic logs we are seeing this:
Sep 3, 2013 22:47:53 -0400 NewRelic 14 INFO: The data collector is temporarily unavailable. This can happen periodically. In the event that availability of our servers is not restored after a period of time, then please report this to New Relic. java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:11)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:6)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:161)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:36)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1184)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:390)
at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:75)
at com.newrelic.agent.transport.DataSenderImpl.connectAndSend(DataSenderImpl.java:550)
at com.newrelic.agent.transport.DataSenderImpl.send(DataSenderImpl.java:600)
at com.newrelic.agent.transport.DataSenderImpl.invoke(DataSenderImpl.java:480)
at com.newrelic.agent.transport.DataSenderImpl.invokeNoRunId(DataSenderImpl.java:475)
at com.newrelic.agent.transport.DataSenderImpl.getRedirectHost(DataSenderImpl.java:203)
at com.newrelic.agent.transport.DataSenderImpl.connect(DataSenderImpl.java:193)
at com.newrelic.agent.RPMService.launch(RPMService.java:194)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask.attemptConnection(RPMConnectionServiceImpl.java:301)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask.access$1100(RPMConnectionServiceImpl.java:101)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask$3.run(RPMConnectionServiceImpl.java:235)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:328)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:161)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:109)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:191)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:215)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:738)
Caused by: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.SSLJsseUtil.b(SSLJsseUtil.java:125)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:3)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:41)
at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:46)
at com.ibm.net.ssl.www2.protocol.https.b.<init>(b.java:26)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:1)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:5)
at java.net.URL.openConnection(URL.java:957)
at com.newrelic.agent.transport.DataSenderImpl.createConnection(DataSenderImpl.java:676)
at com.newrelic.agent.transport.DataSenderImpl.connectAndSend(DataSenderImpl.java:540)
... 18 more
There seems to be some documentation about how to update an Eclipse based IDE environment to overcome this error in other situations, but nothing specific to NewRelic. Has anyone seen this before that can offer suggestions on how to fix the issue?
The next release of New Relics Java agent should make it possible to run without any configuration changes. With version 2.21.X and earlier please submit a request for support at support.newrelic.com
Read and see if this publication gives you a hint:
http://www-01.ibm.com/support/docview.wss?uid=swg21584437
I went through the same thing. As you might have gathered from the article liked by Robban WebSphere has some restriction in the SSLConnectionFactory, so a quit fix would be to just edit the newrelic.yml and configure:
# The agent communicates with New Relic via https by
# default. If you want to communicate with newrelic via http,
# then turn off SSL by setting this value to false.
# This work is done asynchronously to the threads that process your
# application code, so response times will not be directly affected
# by this change.
# Default is true.
ssl: false
Good luck.
Version 3.0.0 or later of New Relic's Java Agent should completely resolve this issue without any custom configuration, certainly without turning off SSL! Release notes.
Related
I have a Java application running with an OTel agent to collect telemetries and send them to the New Relic platform.
Configuration of OTel Java agent:
-javaagent:./agents/opentelemetry-javaagent-all.jar
-Dotel.traces.exporter=otlp
-Dotel.resource.attributes=service.name=my-application
-Dotel.exporter.otlp.endpoint=https://otlp.nr-data.net:4317
-Dotel.exporter.otlp.headers=api-key=${NEW_RELIC_LICENSE_KEY}
When this app is starting an error occurs:
Caused by: java.lang.IllegalArgumentException: cannot find a NameResolver for https://otlp.nr-data.net:4317
How to resolve this problem?
I would try:
-Dotel.exporter.otlp.endpoint=otlp.nr-data.net:4317
OTLP endpoint should be officially URL (so scheme part should be included), but some implementations need it without scheme part. I guess this is your case.
The problem has been solved for me when adjusting Dockerfile forcing the download of OTel java agent on the image build process.
From:
COPY ./agents/opentelemetry-javaagent-all.jar .
To:
ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar .
I have a java application in which I am using google cloud speech recognition. Everything works fine when I execute the runnable jar in Ubuntu, but when I execute the runnable jar in my raspberry pi 3 with OS Raspbian using the command java -jar JarFile.jar I get an error about a dependency with netty, which I have never used.
I have read this question
Failed to load libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
which is exactly the same as mine, but I don't know how to carry out the answer provided there. If someone could give me more information about how to do that I would be very pleased.
I have already tried:
Using netty in my maven dependencies although I don't need it.
Installing tomcat apache (I thought it could provide some SSL solution)
Adding latest netty .jar to my dependencies
These are the first lines of the error trace I get:
dic 30, 2018 11: 14: 39 PM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
INFORMACIÓN: netty - tcnative unavailable(this may be normal)
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java: 93)
at
Netty does not provide a netty-tcnative artifact for arm32 so you will need to either build it yourself or use another SSL implementation together with grpc. As far as I know they also support using the one which is provided as part of the JDK or allow to use conscrypt.
Has anybody sometime tried to use JRebel with Mule instead of a typical application server? If so, could you describe your experience?
As far as I know, currently, Mule is not officially supported by the JRebel team. However, I was wondering if there might be some workaround to this limitation.
Although Mule ESB is not officially supported by JRebel, we have found a workaround. First of all, let me start by stating that:
As of today, it is not possible to hot-deploy Mule XML flows by using JRebel. Mule, however, offers its own mechanisms for achieving this same thing. As such, the lack of JRebel support for this is no deal breaker.
So, the only thing we can hot-deploy are the Java classes, which is still very welcome. How do we do that?
Start by configuring the JRebel agent in $MULE_HOME/conf/wrapper.conf. The required lines, in our case, were:
wrapper.java.additional.13=-javaagent:{path to jrebel.jar}
wrapper.java.additional.14=-Xbootclasspath:{path to rebelboot.jar}
wrapper.java.additional.16=-Drebel.remoting_plugin=true
wrapper.java.additional.19=-Drebel.remoting_port={whatever}
These are the JVM paremeters required to launch JRebel along with Mule. The numbering of the parameters is arbitrary.
We want to use JRebel in remote mode. You can read about this mode in the docs. That's the reason for the wrapper.java.additional.16=-Drebel.remoting_plugin=true and wrapper.java.additional.19=-Drebel.remoting_port={whatever} paremeters.
Now go ahead and launch Mule by either executing mule.bat or mule.sh, depending on your environment (Windows or *nix). JRebel should start along with it.
Place your Mule applications inside $MULE_HOME/apps. They will be automatically deployed and, from now on, their .class files will be monitored by JRebel.
Inside your IDE, install the JRebel plugin and apply your license. Afterwards, add the JRebel nature to your project and configure its remote server URL using the port we previously defined inside wrapper.conf.
Do whatever changes you need to do to your code and sync. They should be successfully hot-deployed into the running Mule instance.
when I was testing, I noticed that you need to add in the file wrapper.conf the next attributes:
wrapper.java.additional.18=-Drebel.log=true
wrapper.java.additional.19=-Drebel.log.file=/MyPath/LogName.log
With these the JRebel runs correctly. In conclusion, when we´re using a specific port, is necessary to enable JRebel’s logging.
More information, check in Step 6:
https://zeroturnaround.com/software/jrebel/learn/remoting/setting-up-jrebel-remoting-with-intellij-idea-and-tomcat/
When I configured with the points indicated, I have the next exception in Mule´s console:
Launching a JVM...
2015-10-27 11:00:27 JRebel: WARN You are running JRebel using the -javaagent option on a system where -agentpath is supported.<br/>
2015-10-27 11:00:29 JRebel: Monitoring Log4j configuration in 'file:/C:/Dev/Mule%20-%2002-esb-mule-ee%20-%203.4/conf/log4j.properties'.<br/>
Exception in thread "main" java.lang.NoSuchMethodError: javax.xml.parsers.SecuritySupport$1: method <init>()V not found<br/>
at javax.xml.parsers.SecuritySupport.getContextClassLoader(Unknown Source)<br/>
at javax.xml.parsers.FactoryFinder.find(Unknown Source)<br/>
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)<br/>
at com.opensymphony.module.propertyset.config.PropertySetConfig.<init>(PropertySetConfig.java:53)<br/>
at com.opensymphony.module.propertyset.config.PropertySetConfig.getConfig(PropertySetConfig.java:113)<br/>
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:32)<br/>
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:22)<br/>
at com.mulesource.licm.pref.MulePropertySetPreferences.loadPropertySet(MulePropertySetPreferences.java:208)<br/>
at com.mulesource.licm.pref.MulePropertySetPreferences.<clinit>(MulePropertySetPreferences.java:50)<br/>
at com.mulesource.licm.pref.MulePreferencesFactory.<clinit>(MulePreferencesFactory.java:19)<br/>
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br/>
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)<br/>
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)<br/>
at java.lang.reflect.Constructor.newInstance(Unknown Source)<br/>
at java.lang.Class.newInstance(Unknown Source)<br/>
at java.util.prefs.Preferences.factoryOrig(Unknown Source)<br/>
at java.util.prefs.Preferences.userRoot(Unknown Source)<br/>
at com.mulesource.licm.impl.TrueLicenseHelper.createLicenseManagerParameters (TrueLicenseHelper.java:338)<br/>
at com.mulesource.licm.impl.TrueLicenseHelper.createLicenseManagerParameters(TrueLicenseHelper.java:330)<br/>
at com.mulesource.licm.impl.TrueLicenseHelper.<init>(TrueLicenseHelper.java:120)<br/>
at com.mulesource.licm.impl.MuleLicenseManager.<init>(MuleLicenseManager.java:25)<br/>
at com.mulesource.licm.LicenseManagementFactory.createLicenseManager(LicenseManagementFactory.java:48)<br/>
at org.mule.module.boot.LicenseKeyHandler.<init>(LicenseKeyHandler.java:43)<br/>
at org.mule.module.reboot.MuleContainerBootstrap.handleLicenseKey(MuleContainerBootstrap.java:192)<br/>
at org.mule.module.reboot.MuleContainerBootstrap.main(MuleContainerBootstrap.java:62)<br/>
Configuration JRebel in Mule is very similar to configuration in tc Server.
You need to add JRebel Agent as a wrapper.java.additional.* property in $MULE_HOME/conf/wrapper.conf:
wrapper.java.additional.10=-agentpath:[c:\path\to]lib\jrebel64.dll
If you use Java version 7 and newer you use agent:
Windows 64-bit JDK jrebel64.dll
Windows 32-bit JDK jrebel32.dll
Mac OS X 64-bit JDK libjrebel64.dylib
Mac OS X 32-bit JDK libjrebel32.dylib
Linux 64-bit JDK libjrebel64.so
Linux 32-bit JDK libjrebel32.so
If you use Java version 6 and below, you need to use legacy agent jrebel.jar file.
We have a custom service that we install with our application. The only problem is that after it is installed, it will not start, generating the error above. I have tried to diagnose what the problem is, but can't seem to find any useful information as to why it is quitting. I have tried the same service on a non "R2" 2008 server, and manual it worked fine.
service simple java file running using batch file. Deamon service.
Has anyone had any experience troubleshooting this type of problem, where there are so few clues?
Goto:
Registry-> HKEY_LOCAL_MACHINE-> System-> CurrentControlSet-> Services.
Find the concerned service & delete it. Close regedit. Reboot the PC & Re-install the concerned service. Now the error should be gone.
This is a problem related permission.
Make sure that the current user has access to the folder which contains installation files.
I resolved the problem.This is for EAServer Windows Service
Resolution is -->
Open Regedit in Run prompt
Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\EAServer
In parameters, give SERVERNAME entry as EAServer.
[It is sometime overwritten with Envirnoment variable : Path value]
This error message appears if the Windows service launcher has quit immediately after being started.
This problem usually happens because the license key has not been correctly deployed(license.txt file in the license folder).
If service is not strtign with correct key, just put incorrect key and try to start. Once started, place the correct key, it will work.
I had this error, I looked into a log file C:\...\mysql\data\VM-IIS-Server.err and found this
2016-06-07 17:56:07 160c InnoDB: Error: unable to create temporary file; errno: 2
2016-06-07 17:56:07 3392 [ERROR] Plugin 'InnoDB' init function returned error.
2016-06-07 17:56:07 3392 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-06-07 17:56:07 3392 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-06-07 17:56:07 3392 [ERROR] Aborting
The first line says "unable to create temporary file", it sounds like "insufficient privileges", first I tried to give access to mysql folder for my current user - no effect, then after some wandering around I came up to control panel->Administration->Services->Right Clicked MysqlService->Properties->Log On, switched to "This account", entered my username/password, clicked OK, and it woked!
In my case the error 1067 was caused with a specific version of Tomcat 7.0.96 32-bit in combination with AdoptOpenJDK. Spent two hours on it, un-installing, re-installing and trying different Java settings but Tomcat would not start. See...
ASF Bugzilla – Bug 63625
seems to point at the issue though they refer to seeing a different error.
I tried 7.0.99 32-bit and it started straight away with the same AdoptOpenJDK 32-bit binary install.
I solved this issue using Monitor Tomcat application. I ran it and after a few seconds its icon appeared in my system tray. I right clicked on the icon and clicked the start button and after a few seconds Apache Tomcat started.
I'm using the following on Windows 7:
neo4j-community-1.9.2
Java 7 Update 25
I have Windows Firewall disabled.
When I start Neo4j.bat, both as Administrator and normally, I get the following message:
c:\Tools\neo4j\bin>Neo4j.bat
28/07/13 9:34:27 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup tim
eout to: 120000ms based on -1
A blank Java console window pops up, no messages, then the window disappears after a minute or so.
When I go to http://localhost:7474/, I just get a server not found error.
If I try to install it as a service, the service wouldn't start.
Any ideas what I need to do to start Neo4j? I see here that Neo4j 1.9 does support Java 7:
http://blog.neo4j.org/2013/03/neo4j-19m05-released-wrapping-up.html
base.bat correctly points to windows-service-wrapper-5.jar, so not the windows-service-wrapper-*.jar problem that some people have had in the past. It would be helpful if it outputted an error message.
I just tried it with neo4j 2.0 milestone, and it didn't make any difference. The Java window pops up with no messages, http://localhost:7474/ gets a server not found error, then the Java window closes after a minute or two.
I added JAVA_HOME and JRE_HOME system variables, made no difference. I think I would get an error if Neo4j was not able to locate Java anyway.
I've fixed it.
With help from Neo4j's Google Group, I looked at the logs in data/logs/*.log and data/graph.db/messages.log, and found the following exception:
Caused by: java.rmi.server.ExportException: Port already in use: 1337; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Once I disabled my other service that uses that port, Neo4j's web admin at http://localhost:7474 worked. I then found out port 1337 is used by Neo4j's remote shell, I disabled it by adding enable_remote_shell = false to neo4j.properties, then I was able to have both Neo4j and my other service running.
I'm using the version 2.2.1 community edition of Neo4j on Windows 7, Java 1.8 update 45
In my case the log file messages.log was under default.graphdb directory. In there, you'll see the root cause of the problem.