When tomcat is started, the system prompts that port 8080 is occupied. After searching, the following conclusions are found:
If you install other servers that use port 8080, such as Oracle, tomcat, and jboss, on one machine, the port 8080 is occupied.
I. first check the usage of port 8080
[Root @ olivenan root] # lsof-I: 8080-n
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
Tnslsnr 1031 oracle 12u IPv4 2013 TCP *: webcache (LISTEN)
[Root @ olivenan root] # lsof-I tcp: 8080-n
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
Tnslsnr 1031 oracle 12u IPv4 2013 TCP *: webcache (LISTEN)
It is found that port 8080 is used by oracle. Pay attention to the use of lsof command parameters.
[Root @ olivenan root] # lsof-I udp: 8080-n
[Root @ olivenan root] # lsof-I | grep 8080
[Root @ olivenan root] # netstat-tln | grep 8080
Tcp 0 0 0.0.0.0: 8080 0.0.0.0: * LISTEN
[Root @ olivenan root] #
Ii. solution 1
Find a solution
Set *. dispatchers = '(PROTOCOL = TCP) (SERVICE = orclXDB )'
Change to # *. dispatchers = '(PROTOCOL = TCP) (SERVICE = orclXDB )'
[Oracle @ olivenan dbs] $ sqlplus "/as sysdba"
SQL * Plus: Release 9.2.0.4.0-Production on Fri Jul 6 10:37:32 2007
Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.
Connected:
Oracle9i Enterprise Edition Release 9.2.0.4.0-Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0-Production
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> create spfile from pfile;
File created.
SQL> startup
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> exit
[Root @ olivenan root] # lsof-I: 8080-n
[Root @ olivenan root]
Result port 8080 is stopped.
Iii. solution 2
Convert the xmlDB port to another port. In this example, convert it to 8082.
SQL> call dbms_xdb.cfg_update (updateXML (dbms_xdb.get _get (), '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text
() ', 8082 ));
Call completed.
SQL> exec dbms_xdb.mongo_refresh;
PL/SQL procedure successfully completed.
Convert an ftp port from 2100 to 2111
SQL> call dbms_xdb.cfg_update (updateXML (dbms_xdb.get _get (), '/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text
() ', 2111 ));
Call completed.
SQL> commit;
Commit complete.
SQL> exec dbms_xdb.mongo_refresh;
PL/SQL procedure successfully completed.
SQL>
SQL> select dbms_xdb.get _get from dual;
Pai_get
--------------------------------------------------------------------------------
$ @ Serverendp. ssh admin 4321 4322-register
$ Exit
You can replace 8080 with 4321 and 9090 with 4322.