I get this and nothing is really working in SM either, I think a bunch of it is related.
Si, java program to the rescue – jeepers, I’m terrible at java. Google to the rescue. http://stackoverflow.com/questions/24057234/getting-ip-address-instead-of-hostname-from-gethostbyname-function-from-inetaddr
import java.net.InetAddress;
class GetHost{
public static void main(String args[])throws Exception{
String hostIp=args[0];
InetAddress addr = InetAddress.getByName(hostIp);
String host = addr.getHostName();
if(host.endsWith(".local"))
{
int lenght=host.length() ;
System.out.print(""+host.substring(0,lenght-6));
}
else
System.out.print(host);
}
}
>javac getHostName.java
> java GetHost 10.10.10.49
this returns the IP address
Right, I’m getting somewhere. So this host is not known to DNS, so it spews back the IP. Okay, this makes sense about a lot of things now.
So… get the machine added to DNS, or a poor mans solution:
vi /etc/hosts as root
10.10.10.49 vltweb01 vltweb01.vjde.com
Now try the program again.
[oracle@vltweb01 logs]$ java GetHost 10.10.10.49
vltweb01[oracle@vltweb01 logs]$
Cool! I then changed the order so the FQDN is returned.
STOP SM
[oracle@vltweb01 bin]$ ./stopAgent
[oracle@vltweb01 bin]$ pwd
/u01/oracle/jde_home_1/SCFHA/bin
Delete from SM console
Start it again
wait patiently (pounding the F5 key on your browser)
Totally cool!Now I have a pile of other errors to fix, but that is one down!
No comments:
Post a Comment