An error occurred when I tried to start up dbconsole of Oracle database 11g.
oracle@solaris11vm:~$ emctl start dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_localhost_ORCL not found.
Looked into the filename format:
It seemed that the server name was resolved as localhost, not the hostname (i.e. solaris11vm in this case). We should check the existence of the specified file.
oracle@solaris11vm:~$ cd $ORACLE_HOME/oc4j/j2ee/
drwxr-x--- 10 oracle oinstall 10 Jan 29 22:51 OC4J_DBConsole_solaris11vm_ORCL
Sure there is the correct file. I think emctl should take this one to start dbconsole, but it was ignored. So I suspected that the name resolution is the possible cause.
Next I checked /etc/hosts
127.0.0.1 localhost loghost solaris11vm
Oh, someone added the hostname to 127.0.0.1, so I removed the hostname.
127.0.0.1 localhost loghost
It's back to normal.
If your /etc/hosts is nothing wrong, I suggest that you should still focus on name resolution related configuration.