"java.nio.channels.UnresolvedAddressException" happens only on home Wifi - scala

I'm Having an issue running my code only on my home wifi
The same code runs if i change the network to phone hotspot or any other network
Running some Play application and have an error of
"java.nio.channels.UnresolvedAddressException: null"
at com.timgroup.statsd.NonBlockingStatsDClient.<init>(NonBlockingStatsDClient.java:95)
at com.timgroup.statsd.NonBlockingStatsDClient.<init>(NonBlockingStatsDClient.java:64)
at dependencies.DashboardModule.getStatsdClient(DashboardModule.scala:204)
at dependencies.DashboardModule$$FastClassByGuice$$ed685f3b.invoke(<generated>)
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:264)
at com.google.inject.internal.ProviderMethod$Factory.provision(ProviderMethod.java:401)
at com.google.inject.internal.ProviderMethod$Factory.get(ProviderMethod.java:376)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
Caused by: java.nio.channels.UnresolvedAddressException: null
at sun.nio.ch.Net.checkAddress(Net.java:104)
at sun.nio.ch.DatagramChannelImpl.connect(DatagramChannelImpl.java:729)
at com.timgroup.statsd.NonBlockingUdpSender.<init>(NonBlockingUdpSender.java:23)
at com.timgroup.statsd.NonBlockingStatsDClient.<init>(NonBlockingStatsDClient.java:93)
at com.timgroup.statsd.NonBlockingStatsDClient.<init>(NonBlockingStatsDClient.java:64)
at dependencies.DashboardModule.getStatsdClient(DashboardModule.scala:204)
at dependencies.DashboardModule$$FastClassByGuice$$ed685f3b.invoke(<generated>)
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:264)
at com.google.inject.internal.ProviderMethod$Factory.provision(ProviderMethod.java:401)
at com.google.inject.internal.ProviderMethod$Factory.get(ProviderMethod.java:376)```
while trying to use some google injection

Related

java.io.IOException: Too many open files from akka.actor.internal-dispatcher

I have a REST API written in Scala with Play framework and Akka, deployed on the production server. Periodically the container with the API crashes with the following error:
[ERROR] [01/18/2023 13:14:02.762] [application-akka.actor.internal-dispatcher-3] [akka://application/system/IO-TCP/selectors/$a/0] Accept error: could not accept new connection
java.io.IOException: Too many open files
at java.base/sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at java.base/sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:533)
at java.base/sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:285)
at akka.io.TcpListener.acceptAllPending(TcpListener.scala:128)
at akka.io.TcpListener$$anonfun$bound$1.applyOrElse(TcpListener.scala:96)
at akka.actor.Actor.aroundReceive(Actor.scala:537)
at akka.actor.Actor.aroundReceive$(Actor.scala:535)
at akka.io.TcpListener.aroundReceive(TcpListener.scala:36)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579)
at akka.actor.ActorCell.invoke(ActorCell.scala:547)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
at akka.dispatch.Mailbox.run(Mailbox.scala:231)
at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
I have tried to increase a ulimit. It is now set to 1000000, didn't help at all. I assume it is connected to the amount of TCP connections but I cannot pinpoint the exact cause, nor can I reproduce it on my machine.
Would greatly appreciate any tips on how to handle this.

Unable to connect perfecto mobile through eclipse

I am trying to test the cloud mobles using perfectomobiles though test case in eclipse for that i added Perfecto mobile add-in to eclipse and while creating a project i given below details
Cloud : mobilecloud.perfectomobile.com, username and password
after created the project we didn't get any MobileCloud views those MobileCloud Recording and MobileCloud Dashboard tabs are empty. i didn't under stand where we need to add mobiles(i am thinking like we are unable to connect to perfectomobile.com)
Then, i tried to connect through code like below
MobileDriver driver = new MobileDriver("mobilecloud.perfectomobile.com","username","password");
try {
// write your code here
IMobileDevice device = driver.getDevice("3152168C4EAA1E2A5DE93CF7B89222720E3A62E0");
device.open();
IMobileWebDriver webDriver = device.getDOMDriver("google.com");
webDriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
webDriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
webDriver.findElement(By.xpath("(//input[#id=\"lst-ib\"])[1]")).sendKeys("Perfecto Mobile");
webDriver.findElement(By.xpath("(//button[#id=\"tsbb\"])[1]")).click();
}
But, I am getting exception like below
10:40:39.569 [main] ERROR c.p.selenium.util.EclipseConnector - Failed to connect to MobileCloud for Eclipse plugin on host: localhost and port: 3287. Possible reasons are: The code doesn't run in Eclipse or the user doesn't have ECLIPSE role or the MobileCloud recording view is not open. In these cases use the MobileDriver constructor that receives the host, user and password.
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.7.0_55]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) ~[na:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) ~[na:1.7.0_55]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) ~[na:1.7.0_55]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.7.0_55]
at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_55]
at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_55]
at java.net.Socket.<init>(Socket.java:425) ~[na:1.7.0_55]
at java.net.Socket.<init>(Socket.java:208) ~[na:1.7.0_55]
at com.perfectomobile.selenium.util.EclipseConnector.<init>(EclipseConnector.java:34) ~[pm-selenium-3.5.0.000.jar:na]
at com.perfectomobile.selenium.MobileDriver.initWithEclipseParams(MobileDriver.java:79) [pm-selenium-3.5.0.000.jar:na]
at com.perfectomobile.selenium.MobileDriver.<init>(MobileDriver.java:64) [pm-selenium-3.5.0.000.jar:na]
at com.perfectomobile.selenium.MobileDriver.<init>(MobileDriver.java:60) [pm-selenium-3.5.0.000.jar:na]
at MobileTest.main(MobileTest.java:42) [bin/:na]
Can any one help me
I believe your Perfecto mobile account doesn't have the Eclipse Role (or license) added to it (yes, they have something like this for Eclipse). Contact support to get it added. I faced the same issue earlier.

Error Connecting To Remote Host In Mirth

I need to create a connection between a lab machine and a server.
The lab machine can send HL7 messages for test results.
I decided to use mirthconnect to process the message and so i created a channel.
The channel source connector was configured as a "TCP LISTENER"
The Listener settings use a "specific interface" with ip address of the machine entered.
Response settings are configured to "auto-generate after source transformer"
Transmission mode is "MLLP" using "Server" mode.
Receive timeout is 0 ms, and "keep Connection Open" radio button is checked.
I also specified a port number "2468" to listen on and it showed as enabled when i did a
"netstat -at" command.
On the sending computer on the network, i created a channel again and i put in the IP address of the first machine with the receiving channel on the destination. I also put in the port number that was used when creating the channel on the "receiving" computer.
However when i clicked on the "Test Connection" button i got an
unable to connect to host error
I also tried to send a message after deploying the channel and the message was not sent.
The error generated is shown below:
TCP Sender error
ERROR MESSAGE: Connection refused: connect
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.mirth.connect.connectors.tcp.SocketUtil.connectSocket(SocketUtil.java:62)
at com.mirth.connect.connectors.tcp.TcpDispatcher.send(TcpDispatcher.java:213)
at com.mirth.connect.donkey.server.channel.DestinationConnector.handleSend(DestinationConnector.java:599)
at com.mirth.connect.donkey.server.channel.DestinationConnector.process(DestinationConnector.java:336)
at com.mirth.connect.donkey.server.channel.DestinationChain.call(DestinationChain.java:224)
at com.mirth.connect.donkey.server.channel.Channel.process(Channel.java:1428)
at com.mirth.connect.donkey.server.channel.Channel.dispatchRawMessage(Channel.java:956)
at com.mirth.connect.donkey.server.channel.SourceConnector.dispatchRawMessage(SourceConnector.java:175)
at com.mirth.connect.server.controllers.DonkeyEngineController.dispatchRawMessage(DonkeyEngineController.java:520)
at com.mirth.connect.server.servlets.MessageObjectServlet$2.run(MessageObjectServlet.java:193)
at java.lang.Thread.run(Unknown Source)
I can successfully ping both systems and can connect to a MySQL server on the host by using
mysql -utest -ptest -hipaddressofhost
I am using Mirthconnect 3.0.
Please where am i missing it?...thanks
(I also have not encrypted the message nor am i using SSL To test the transmission...i believe this is not an issue??)
There is several things that could possibly go wrong with something that seems as simple as this is:
Did you verify that you have no firewall installed or active. The commands you use seem to indicate that you may be using Linux. As such, you could become quite frustrated by something like iptables (/etc/init.d/iptables status) or another firewall like that.
Are you sure you do not have any kind of firewall in the way that would prevent network communications between the sender and the box that is listening on port 2468? Are they on the same subnets? If they are not on the same subnet it is possible that some kind of network device/firewall is blocking the traffic.
Can you telnet to the listener's ip address and port (telnet )?
Another simple way to test if you are on the right path is to import the channel (or just the destination that is sending to the listener) into the listener machine's Mirth instance. If you are able to establish a connection while not making any changes to the port and ip address in this destination you probably have some kind of network/firewall issue that is preventing traffic on that specific port from getting through.
Not sure if this will help you much, but good luck either way.
Frans

Android Emulator 4.2 (API Level 17) "Unfortunately camera has stopped" When try to access camera from the main menu

I'm using Android 4.2 (API Level 17) emulator.
Whenever I clicked on the Camera, I got the following error message :
Unfortunately, camera has stopped
These are the logcat errors :
E/CameraService(40): CameraService::connect X (pid 862) rejected (invalid cameraId 0).
E/CameraHolder(862): fail to connect Camera
E/CameraHolder(862): java.lang.RuntimeException: Fail to connect to camera service
E/CameraHolder(862): at android.hardware.Camera.native_setup(Native Method)
E/CameraHolder(862): at android.hardware.Camera.<init>(Camera.java:340)
E/CameraHolder(862): at android.hardware.Camera.open(Camera.java:302)
E/CameraHolder(862): at com.android.camera.CameraHolder.open(CameraHolder.java:131)
E/CameraHolder(862): at com.android.camera.Util.openCamera(Util.java:267)
E/CameraHolder(862): at com.android.camera.Camera$4.run(Camera.java:1100)
E/AndroidRuntime(862): java.lang.RuntimeException: openCamera failed
E/AndroidRuntime(862): at com.android.camera.Util.openCamera(Util.java:272)
E/AndroidRuntime(862): at com.android.camera.Camera$4.run(Camera.java:1100)
E/AndroidRuntime(862): Caused by: com.android.camera.CameraHardwareException: java.lang.RuntimeException: Fail to connect to camera service
E/AndroidRuntime(862): at com.android.camera.CameraHolder.open(CameraHolder.java:135)
E/AndroidRuntime(862): at com.android.camera.Util.openCamera(Util.java:267)
E/AndroidRuntime(862): Caused by: java.lang.RuntimeException: Fail to connect to camera service
E/AndroidRuntime(862): at android.hardware.Camera.native_setup(Native Method)
E/AndroidRuntime(862): at android.hardware.Camera.<init>(Camera.java:340)
E/AndroidRuntime(862): at android.hardware.Camera.open(Camera.java:302)
E/AndroidRuntime(862): at com.android.camera.CameraHolder.open(CameraHolder.java:131)
I tried various solutions. But no luck :(
No one has given a working solution for this problem so far. Please give me a hint
Webcam : Dell Integrated webcam
OS : windows 8 Professional 64 bit version
Cheers !!!
You probably don't care anymore but this was one of the first ones i got when i googled the same problem so in case anyone else runs into this i found that my problem was that i had selected no camera in the AVD (seems to be default)

How do I connect the NetBeans profiler to a specic remote instance

I have a remote GlassFish server that has a node agent configured. The instance I want to start in profiling mode is controlled by the node agent.
I've installed and calibrated the remote pack and I've modified my domain.xml for the specific instance as follows:
<profiler enabled="true" name="NetBeansProfiler">
<jvm-options>-agentpath:/home/glassfish/glassfish/profiler-server-6.0rc1-linux/lib/deployed/jdk16/linux/libprofilerinterface.so=/home/glassfish/glassfish/profiler-server-6.0rc1-linux/lib,5140</jvm-options>
</profiler>
Now at this point NetBeans tells you to start the domain with the --verbose command but in my case I'm trying to start an instance and "asadmin start-instance" doesn't support --verbose. I've checked the server.log but I'm not seeing any error nor any language that says it's waiting when I try to start the instances.
However, I think GlassFish is properly configured and my NetBeans setup is the issue. Where I think the issue might be is trying to specify the port. If I leave the port off, it just tries to connect forever. If I put the port on it just closes the dialog and the status shows "Inactive".
UPDATE:
It seems there might be a bug with GF2. After verifying everything and getting the server so that it was listening, the following exception is thrown
Could not load Logmanager "com.sun.enterprise.server.logging.ServerLogManager"
java.lang.ClassNotFoundException: com.sun.enterprise.server.logging.ServerLogManager
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.util.logging.LogManager$1.run(LogManager.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.(LogManager.java:156)
According to this URL, http://java.net/jira/browse/GLASSFISH-3256 it's a known issue and won't be fixed until GF3.
Anyway, my question was about how to connect to a specific instance and I think that was answered.
Do not include the port number in the hostname field. The port number is taken from the global profiler settings.