AS 400 error

Hi,
within AS 400, I did get this error

2014-09-11 11:54:58,204 - Testing server shutting down, initialisation failed  
java.net.UnknownHostException: COMP.SRV01: Host COMP.SRV01 not found
 at java.lang.Throwable.<init>(Throwable.java:195)                              
 at java.lang.Exception.<init>(Exception.java:41)                              
 at java.io.IOException.<init>(IOException.java:40)                            
 at java.io.IOException.<init>(IOException.java:40)                            
 at java.net.InetAddress.getLocalHost(InetAddress.java:1251)                    
 at com.misys.meridian.runtime.server.TestingServer.<init>(TestingServer.java:
 at com.misys.meridian.runtime.server.TestingServer.main(TestingServer.java:22
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
 at java.lang.reflect.Method.invoke(Method.java:324)                            
 at com.misys.meridian.utilities.classpath.TestingClassRunner.run(TestingClass
 at com.misys.meridian.utilities.classpath.TestingClassRunner.run(TestingClass
 at com.misys.meridian.runtime.server.StartServer.main(StartServer.java:17)    

and want to know what I should check within AS 400? How to know which java version is being used there and what is the real reason of problem?
LVL 11
HuaMin ChenProblem resolverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Radek BaranowskiFull-stack Java DeveloperCommented:
you are probably missing an entry in your system's HOST TABLE.

here's an article about adding entries to this table (system can resolve host's up ip address based on that)
http://www.midrangenews.com/view?id=1417

hope this helps
0
Gary PattersonVP Technology / Senior Consultant Commented:
On the IBM i command line enter these commands:

call qcmd
ping 'COMP.SRV1'

If name resolution is properly configured, the PING command will be able to resolve the address of COMP.SRV1.  If not, you'll get an error - typically "Unknown host".

Manually maintaining the IBM i host table is a -terrible- (though unfortunately common) way to resolve hostnames on IBM i.  It is hard to maintain, and the root cause of many problems that I've diagnosed over the years.

Why is the host table bad?  Because it is static.

Most systems rely on DNS to resolve system names and FQDNs into IP addresses.  So if a network administrator needs to change the IP address of a device, all they have to do is update DNS, and all the systems in the network that need to reach that host will get the new address - EXCEPT ones that have configured the old address statically in their HOSTS table.  Suddenly any services or programs that need to reach the changed host with fail, and programmers, system administrators, and network administrators will have to figure out that it was due to a static host name mapping in the IBM i HOSTS table.

A much better method (and the one most commonly used by just about every other system in the world) is to properly configure DNS using the CHGTCPDMN command to point your IBM i to a DNS server in your organization that can resolve the name "COMP.SRV01".  

You should probably get assistance from your network administrator or IBM i system administrator, since the wrong setting can have serious consequences.

However, Radek's fundamental point is correct - this looks like a name resolution issue.

And you asked about Java version.  

You can get the java version on IBM i just like on any other platform, with the "java -version" command.  From the IBM i command line, start a qshell session:

QSH

And then enter the command:

java -version
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverAuthor Commented:
Many thanks all.

Gary,
when using "CHGTCPDMN" to adjust anything, is it better to have any backup to the system before that? Appreciated a lot.
0
Gary PattersonVP Technology / Senior Consultant Commented:
No, it is just a simple settings change, but it can have a significant impact if you make a mistake.  I strongly suggest you get an experienced system administrator or network administrator involved to help you configure it properly and test it - particularly if this is a production system.

I suggest that you make a record of the existing setting before making any changes, just in case you need to revert.

Odds are there are no DNS servers configured.  If that is the case, then adding local DNS servers is pretty low risk.  Once you add local DNS servers, if they are reachable from your IBM i system (no firewall preventing access to them for example), you should be able to ping servers in the local network by name from the IBM i.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Mainframe OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.