I know since most of us still working from home, I always suggest firing commands which takes more than 2 mins in Background. Today, one of my colleague complained while starting oms service. He is getting -“Admin Server Port is occupied by another process. Please stop process to free port“. error while stopping oms service.
Table of Contents
Cause of Admin Server Port is occupied by another process. Please stop process to free port
When I asked by colleague, he said, he executed the command to start the oms services but session got terminated due to network fluctuation.
How to Use nohup to run the command in background
nohup <your command> & for example - nohup /oms/oem13c/app/oracle/Middleware13c5/bin/emctl start oms &
He has tried following two command after he lost the session on which he started the oms service. Stop the oms service and stop the oms service forcefully. But both gave us same error.
$ /oms/oem13c/app/oracle/Middleware13c5/bin/emctl stop oms -all -force Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. Stopping Oracle Management Server... WebTier Successfully Stopped Node Manager Not Running Oracle Management Server is Up JVMD Engine is Up Admin Server Port is occupied by another process. Please stop process to free port. $
$ /oms/oem13c/app/oracle/Middleware13c5/bin/emctl stop oms -all Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. Stopping Oracle Management Server... WebTier Successfully Stopped Node Manager Not Running Oracle Management Server is Up JVMD Engine is Up Admin Server Port is occupied by another process. Please stop process to free port. $
Again we checked the status of it and we found WebTier is Down, Oracle Management Server is Up and JVMD Engine is Up.
$ /oms/oem13c/app/oracle/Middleware13c5/bin/emctl status oms Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. WebTier is Down Oracle Management Server is Up JVMD Engine is Up
As a suggestion I asked him to check for any service which is running with start and see if any of them you can kill. Those start command might be holding the session.
ps -ef | grep start
Even after killing start command we couldn’t had any success.
Solution for Admin Server Port is occupied by another process. Please stop process to free port.
Identify process id for EMGC_ADMINSERVER and kill the session –
$ ps -ef | grep EMGC_ADMINSERVER oem12c 19333628 8651142 0 08:59:04 pts/0 0:00 grep EMGC_ADMINSERVER oem12c 20644144 1 0 08:37:37 - 0:52 /oms/oem13c/app/oracle/Middleware13c5/oracle_common/jdk/bin/java -Xms1740M -Xmx1740M -cp /oms/oem13c/app/oracle/Middleware13c5/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=EMGC_ADMINSERVER -Djava.security.policy=/oms/oem13c/app/oracle/Middleware13c5/wlserver/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.system.BootIdentityFile=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/security/boot.properties -Dweblogic.nodemanager.ServiceEnabled=true -Dweblogic.nmservice.RotationEnabled=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/oem13c/agent/null/sysman/log/oms_heap_dump -XX:OnOutOfMemoryError=/oms/oem13c/app/oracle/Middleware13c5/bin/heap_dump_rolling.sh -Djavax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory -Djava.security.egd=file:///dev/./urandom -Dweblogic.debug.DebugWebAppSecurity=true -Dweblogic.SSL.LoginTimeoutMillis=300000 -Djps.auth.debug=true -Djps.authz=ACC -Djps.combiner.optimize.lazyeval=true -Djps.combiner.optimize=true -Djps.subject.cache.key=5 -Djps.subject.cache.ttl=600000 -Doracle.apm.home=/oms/oem13c/app/oracle/Middleware13c5/apm/ -DAPM_HELP_FILENAME=oesohwconfig.xml -Dweblogic.data.canTransferAnyFile=true -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 -DHTTPClient.retryNonIdempotentRequest=false -Dweblogic.security.SSL.minimumProtocolVersion=TLSv1 -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=org.apache.xerces.jaxp.validation.XMLSchemaFactory -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dopss.version=12.2.1.3 -Digf.arisidbeans.carmlloc=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/carml -Digf.arisidstack.home=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/oms/oem13c/app/oracle/Middleware13c5/oracle_common/modules/oracle.ossoiap,/oms/oem13c/app/oracle/Middleware13c5/oracle_common/modules/oracle.oamprovider,/oms/oem13c/app/oracle/Middleware13c5/oracle_common/modules/oracle.jps -Doracle.mds.filestore.preferred= -Dadf.version=12.2.1.3.0 -Dweblogic.jdbc.remoteEnabled=true -Dcommon.components.home=/oms/oem13c/app/oracle/Middleware13c5/oracle_common -Djrf.version=12.2.2 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain -Doracle.server.config.dir=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/servers/EMGC_ADMINSERVER -Doracle.domain.config.dir=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig -Dohs.product.home=/oms/oem13c/app/oracle/Middleware13c5/ohs -javaagent:/oms/oem13c/app/oracle/Middleware13c5/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/oms/oem13c/app/oracle/Middleware13c5/wlserver/server -Dweblogic.home=/oms/oem13c/app/oracle/Middleware13c5/wlserver/server -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder -Djava.util.logging.manager=oracle.core.ojdl.logging.ODLLogManager weblogic.Server $ kill -9 20644144
Identify java related process running from your user. And kill the session.
$ ps -ef | grep java oem12c 17498390 8651142 0 08:59:20 pts/0 0:00 grep java oem12c 19661176 1 0 08:38:30 - 1:52 /oms/oem13c/app/oracle/Middleware13c5/oracle_common/jdk/bin/java -Xms1740M -Xmx1740M -XX:CompileThreshold=8000 -Xgcpolicy:gencon -cp /oms/oem13c/app/oracle/Middleware13c5/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=EMGC_OMS1 -Djava.security.policy=/oms/oem13c/app/oracle/Middleware13c5/wlserver/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Dweblogic.system.BootIdentityFile=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/nodemanager/boot.properties -Dweblogic.nodemanager.ServiceEnabled=true -Dweblogic.nmservice.RotationEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.ReverseDNSAllowed=false -DINSTANCE_HOME=/oms/oem13c/app/oracle/gc_inst1/em/EMGC_OMS1 -DORACLE_HOME=/oms/oem13c/app/oracle/Middleware13c5 -Ddomain.home=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain -Djava.awt.headless=true -Ddomain.name=GCDomain -Doracle.sysman.util.logging.mode=dual_mode -Djbo.doconnectionpooling=true -Djbo.txn.disconnect_level=1 -Docm.repeater.home=/oms/oem13c/app/oracle/Middleware13c5 -Dweblogic.servlet.POJARScanDisabled=true -Dweblogic.oif.serialFilterScope=weblogic -Djbo.ampool.minavailablesize=1 -Djbo.ampool.timetolive=-1 -Djbo.load.components.lazily=true -Djbo.max.cursors=5 -Djbo.recyclethreshold=50 -Djbo.ampool.maxavailablesize=50 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/oem13c/agent/null/sysman/log/oms_heap_dump -XX:OnOutOfMemoryError=/oms/oem13c/app/oracle/Middleware13c5/bin/heap_dump_rolling.sh -Djavax.xml.bind.JAXBContext=com.sun.xml.bind.v2.ContextFactory -Djava.security.egd=file:///dev/./urandom -Dweblogic.debug.DebugWebAppSecurity=true -Dweblogic.SSL.LoginTimeoutMillis=300000 -Djps.auth.debug=true -Djps.authz=ACC -Djps.combiner.optimize.lazyeval=true -Djps.combiner.optimize=true -Djps.subject.cache.key=5 -Djps.subject.cache.ttl=600000 -Doracle.apm.home=/oms/oem13c/app/oracle/Middleware13c5/apm/ -DAPM_HELP_FILENAME=oesohwconfig.xml -Dweblogic.data.canTransferAnyFile=true -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 -DHTTPClient.retryNonIdempotentRequest=false -Dweblogic.security.SSL.minimumProtocolVersion=TLSv1 -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=org.apache.xerces.jaxp.validation.XMLSchemaFactory -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dopss.version=12.2.1.3 -Digf.arisidbeans.carmlloc=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/carml -Digf.arisidstack.home=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/servers/EMGC_OMS1/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/oms/oem13c/app/oracle/Middleware13c5/oracle_common/modules/oracle.ossoiap,/oms/oem13c/app/oracle/Middleware13c5/oracle_common/modules/oracle.oamprovider,/oms/oem13c/app/oracle/Middleware13c5/oracle_common/modules/oracle.jps -Doracle.mds.filestore.preferred= -Dadf.version=12.2.1.3.0 -Dweblogic.jdbc.remoteEnabled=true -Dcommon.components.home=/oms/oem13c/app/oracle/Middleware13c5/oracle_common -Djrf.version=12.2.2 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain -Doracle.server.config.dir=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig/servers/EMGC_OMS1 -Doracle.domain.config.dir=/oms/oem13c/app/oracle/gc_inst1/user_projects/domains/GCDomain/config/fmwconfig -Dohs.product.home=/oms/oem13c/app/oracle/Middleware13c5/ohs -javaagent:/oms/oem13c/app/oracle/Middleware13c5/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/oms/oem13c/app/oracle/Middleware13c5/wlserver/server -Dweblogic.home=/oms/oem13c/app/oracle/Middleware13c5/wlserver/server -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder -Dweblogic.management.server=https://je95039oemap1.icicibankltd.com:7101 -Djava.util.logging.manager=oracle.core.ojdl.logging.ODLLogManager weblogic.Server oem12c 21103034 7799124 0 Dec 19 - 1:58 /oem13c/oracle/agent13c/agent_13.4.0.0.0/oracle_common/jdk/bin/java -Xmx160M -server -Djava.security.egd=file:///dev/./urandom -Dsun.lang.ClassLoader.allowArraySyntax=true -Xgcpolicy:gencon -Dwatchdog.pid=7799124 -cp /oem13c/oracle/agent13c/agent_13.4.0.0.0/jdbc/lib/ojdbc7.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/ucp/lib/ucp.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/oracle_common/modules/jsch-0.1.54.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/oracle_common/modules/com.oracle.http_client.http_client.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/oracle_common/modules/oracle.xdk/xmlparserv2.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/oracle_common/modules/oracle.dms/dms.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/oracle_common/modules/oracle.odl/ojdl.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/oracle_common/modules/oracle.odl/ojdl2.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/lib/optic.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/sysman/jlib/log4j-core.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/jlib/gcagent_core.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/sysman/jlib/emagentSDK-intg.jar:/oem13c/oracle/agent13c/agent_13.4.0.0.0/sysman/jlib/emagentSDK.jar oracle.sysman.gcagent.tmmain.TMMain $ kill -9 19661176
How if we check for the oms status-
WebTier is Down
Oracle Management Server is Down
JVMD Engine is Down
$ /oms/oem13c/app/oracle/Middleware13c5/bin/emctl status oms Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2021 Oracle Corporation. All rights reserved. WebTier is Down Oracle Management Server is Down JVMD Engine is Down
Now start the oms services.
$ /oms/oem13c/app/oracle/Middleware13c5/bin/emctl start oms
Thank you for reading 🙂