"unknown.prolexic.com: unknown error" in Hadoop setup - java

I am trying to setup Hadoop 2.6.0 in my Mac OS
I am following this article:
http://hadoop.apache.org/docs/r2.4.0/hadoop-project-dist/hadoop-common/SingleCluster.html#Standalone_Operation
when i run this command
bin/hdfs namenode -format
i get following error.
15/01/08 09:35:03 WARN net.DNS: Unable to determine local hostname -falling back to "localhost"
java.net.UnknownHostException: unknown.prolexic.com: unknown.prolexic.com: unknown error
However when i do
ssh localhost
, i am able to login. Please help

Set hostname using:
scutil --st HostName "localhost"
and it will fix the issue.
Reference: http://biomedicalontologies.com/2012/11/14/fixing-java-net-local-host-name-unknown-error-on-mac-os-x/

Related

Connect to aerospike running in a vagrant vm on MacOS

I followed above steps to install aerospike on my Mac - https://www.aerospike.com/docs/operations/install/vagrant/mac/index.html
I am able to open the AMC console on my system but I am unable to connect to aerospike via my Java aerospike client
I am creating my AerospikeClient like below in my Java code.
new AerospikeClient("172.28.128.3", 8081);
Getting below error. Can anyone let me know what the problem is.
Factory method 'aerospikeClient' threw exception; nested exception is com.aerospike.client.AerospikeException$Connection: Error Code 11: Failed to connect to host(s):
172.28.128.3 8081 java.io.EOFException
Try connecting to port 3000, not 8081. That one is only open to allow AMC to connect from the macOS side to the cluster.
Install the tools package for macOS and try the following:
asinfo -h "172.28.128.3" -v version

Intellij debugger giving error for groovy tests while running using gradle test runner but works while using java test runner [duplicate]

I am trying to debug a simple Java application on my machine using Eclipse as an IDE. When I try to debug the application by entering the Debug Perspective, I set a breakpoint and start debug. Within a few seconds, the following pop-up window:
Launching unicodeRead has encountered a problem. Cannot connect to VM.
The message dumped on the console is as follows:
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:708]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
How do I correct this? Why does this happen?
I just had the same problem.
Yesterday everything worked fine, now nothing - same error as you gave. I found out that network admins made some changes in the meantime. Some firewall stuff. Problem is that Eclipse tries to establish connection to JVM at "localhost" (and some random port). When I tried pinging localhost (or 127.0.0.1) I got following:
C:\Windows\system32>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
and
C:\Windows\system32>ping localhost
Ping request could not find host localhost. Please check the name and try again.
It seams that in some cases DNS is expected to resolve this, and if firewall prevents localhost requests to DNS - stuff breaks. I had to alter hosts file and remove comments in following lines, so I would not rely on DNS for this anymore:
# 127.0.0.1 localhost
# ::1 localhost
Although it is written that hosts file changes take effect immediately, I think that some processes locked this and restart was necessary in my case. After that, everything worked again.
Had same problem, but the solution was to run the application with -server=y option and not with -server=n.
Before:
java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:5005
After:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005
Looks like the same problem as here. A reboot of the pc fixed the problem there. I haven't found any other solutions.
I was seeing an error while using the -X format:
java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n myapp
The error went away when I switched to the newer format:
java -agentlib:jdwp=transport=dt_socket,server=y,address=4000,suspend=n myapp
Its Very Simple,Just do the Following Changes in eclipse.ini file.
-vm
binary\com.sun.java.jdk.win32.x86_1.6.0.u43\jre\bin\javaw.exe
I changed
-agentlib:jdwp=transport=dt_socket,address=9009,server=n,suspend=y
to
-agentlib:jdwp=transport=dt_socket,address=9009,server=y,suspend=n
and that did the trick!
My case is I have a bunch of domains refer to 127.0.0.1 in hosts file, like this:
127.0.0.1 localhost domian1.local domain2.local domain3.local
one day I added another new domain to refer to 127.0.0.1. By mistake, I put the domain in front of "localhost", like this:
127.0.0.1 domain4.local localhost domian1.local domain2.local domainx.local
After this, I always got an alert window in eclipse while debugging:
Cannot connect to VM
com.sun.jdi.connect.TransportTimeoutException
In console:
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP: Failed to initialize transport via localhost:50470, trying localhost via 127.0.0.1:50470
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
The solution is keep "localhost" at the first position all the time.
127.0.0.1 localhost domian1.local domain2.local domainx.local domain4.local
What solved for me was deleting the entire domain1 folder inside the domains folder on glassfish main folder.
Eclipse will ask you to recreate a domain and then everything works again.
In eclipse select Run tab -> Debug configuration -> Junit -> select your test name ->
Environment tab -> add variable server=y .
I was getting the same error on my ubuntu machine because of a mishap with the /etc/hosts file. I had commented out the mapping of localhost to 127.0.0.1, and to complicate matters further there was a swap file hanging around.
This was the first line of my /etc/hosts:
127.0.0.1 #localhost
Deleting the # fixed the problem, whereas rebooting understandably had not.
My cause & solution were completely different.
I think in my case it was due to the installation of JProfiler. I fixed it by uninstalling JProfiler and launching eclipse with the -clean option. I suspect that JProfiler was inserting itself in the debugger. The -clean option forces Eclipse to re-assess its plugins, so that alone might have been sufficient.
Continuing #gonadarian's answer, it seems Eclipse uses port 127.0.0.1 for debug purposes. This port is also called localhost. The way this error can be removed is by ensuring that there are no processes or services running on the above ports. The way to do this, on Linux is:
As root, enter the command:
netstat -tulpn | grep 127.0.0.1
If there are processes running on the above port, it will show up in the format:
process_id/process name.
Kill the above processes like so: kill -KILL process_id
Restart the computer for these changes to take effect. The error should no longer occur.

$ bin/hadoop namenode -format STARTUP_MSG: host = java.net.UnknownHostException:

I'm currently learning Hadoop by http://tecadmin.net/steps-to-install-hadoop-on-centosrhel-6/
in the 5th step when I apply this command $ bin/hadoop namenode -format I get following error
I also have checked these links for resolving my problem
"hadoop namenode -format" returns a java.net.UnknownHostException
java.net.UnknownHostException: Invalid hostname for server: local
I don't know where is domain name in the configuration files for replacing it by localhost.
also I went to /etc/hosts file and replaced text by localhost.. still I haven't resolve the problem please someone help me.
The unknownHostException could be resolved by the following steps:
Go to /etc/hosts
Edit the "hosts" file with IP 127.0.0.1 [space] HostName (e.g. static.98.35.ebonenet.com)
Save the file and try again
With the help of Aadil's answer I resolved The unknownHostException by the following steps:
Step-1 Go to /etc/hosts
Step-2 Edit the "hosts" file with IP 127.0.0.1 [space/tab] localhost [space/tab] HostName (e.g. static.98.35.ebonenet.com)
Step-3 Save the file and try again
Problem:
If anyone facing:
SHUTDOWN_MSG: Shutting down NameNode at java.net.UnknownHostException:
ubuntu: ubuntu: unknown error
Solution:
Go to /etc/hosts
Disable/Remove if any IPV6 configuration maintained in /etc/hosts file
Save the file and try again

java.net.UnknownHostException

I'm installing CSVN using jdk1.6.0_23 and I'm getting the following Java error:
2011-02-10 16:25:50,951 [WrapperJarAppMain] WARN util.GrailsUtil - [WARNING] Property [ldapServerPort] of domain class com.collabnet.svnedge.console.Server has type [int] and doesn't support constraint [nullable]. This constraint will not be checked during validation.
2011-02-10 16:25:51,117 [WrapperJarAppMain] ERROR ehcache.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: vkqgae01: vkqgae01
java.net.UnknownHostException: vkqgae01: vkqgae01
at java.net.InetAddress.getLocalHost(InetAddress.java:1354)
at net.sf.ehcache.Cache.<clinit>(Cache.java:143)
My server has 3 NICs (eth0, eth1 and eth2). I've added an entry to the hosts file bellow localhost containing the following:
127.0.0.1 vkqgae01
I can successfully ping vkqgae01, but nslookup cannot resolve it.
Any ideas?
That is related with
hostname
and
/etc/hosts
If /etc/hosts doesn't containt the definition of the hostname it fails. Just add your hostname to /etc/host for example if your hostname is work add or modified the following line:
127.0.0.1 work localhost
I can succesfully ping vkqgae01, but nslookup cannot resolve it.
Any ideas?
What happens?
vkqgae01 is resolved locally thanks to your hosts file.
nslookup sends a query to your DNS, where vkqgae01 is unknown.
Suggestion: add vkqgae01 to hosts file of every machine where you "use" it.
Basically, the fact that the local hosts file on vkqgae01 contains 127.0.0.1 localhost vkqgae01 doesn't help other machines to solve its name.
Just added the line below in /etc/hosts and it worked.
127.0.0.1 imac
nslookup queries DNS specifically and directly. This means it will not be able to show anything added directly to an /etc/hosts file (as that isn't DNS).
If you want to properly make sure your system will resolve a name, use getent:
'getent hosts vkqgae01'
You need to restart the container if /etc/hosts was changed as far as JVM caches local addresses/names on the first InetAddress call. It looks like InetAddress implementation bug, but still not fixed.

Issues running grails on a remote environment

I have a server that is "named" and it seems to cause Grails to be unable to find localhost.
Running Grails application..
2011-01-12 20:45:14,046 [main] ERROR ehcache.Cache - Unable to set localhost. This prevents creation of a GUID. Cause was: zaftra: zaftra
java.net.UnknownHostException: zaftra: zaftra
at java.net.InetAddress.getLocalHost(InetAddress.java:1426)
at net.sf.ehcache.Cache.<clinit>(Cache.java:143)
at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:463)
at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:369)
at net.sf.ehcache.CacheManager.configure(CacheManager.java:445)
at net.sf.ehcache.CacheManager.init(CacheManager.java:302)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:260)
at net.sf.ehcache.hibernate.EhCacheProvider.start(EhCacheProvider.java:128)
Contents of /etc/hosts (as shown):
127.0.0.1 localhost localhost.localdomain zaftra
::1 localhost localhost.localdomain zaftra
I'm going to assume that you're on some flavor of linux. If that's the case, you might have a look at your /etc/hosts file - is there an entry for localhost? I'd expect to see something like:
127.0.0.1 localhost zaftra
::1 localhost
I did some Googling - there's a similar question over on SuperUser - the suggestion there was to add the following to /etc/resolv.conf:
search (domainname) // in your case, search (zaftra)
You might also try:
search zaftra
// or
search zaftra.example.com // if there's a more fully-qualified domain name you can use
(That's based off of an entry I've got in resolv.conf on one of my Ubuntu machines).
I'm using AWS(running amazon linux) and ran into the exact same issue, my fix was to add this to /etc/hosts:
102.130.27.257 LAMP-LIVE01-N123 www.mydomain.com
where those values came from:
{internal IP} {instance name} {domain for grails app}
and then I restarted httpd and my grails app server(tomcat)

Categories