Solution to Oracle Tomcat 8080 port conflict in Linux

Source: Internet
Author: User

When tomcat is started, the system prompts that port 8080 is occupied. After searching, the following conclusions are found:

Install other servers that use port 8080, such as Oracle, tomcat, and jboss, on one machine. The error 8080 port 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] #

2. search for solutions

Solution 1,

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

SQL>

Check the Conversion Result and find that ports 80 and 8082 are disabled, while ports 2111 and are used.

[Root @ olivenan root] # lsof-I: 8080-n

[Root @ olivenan root] # lsof-I: 8082-n

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

Tnslsnr 1031 oracle 12u IPv4 18456 TCP *: 8082 (LISTEN)

[Root @ olivenan bin] # lsof-I: 2100-n

[Root @ olivenan root] # lsof-I: 2111-n

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

Tnslsnr 1031 oracle 13u IPv4 18462 TCP *: 2111 (LISTEN)

[Root @ olivenan root] #

Iv. Use of lsof commands

Lsof-I TCP: port-n

Lsof-I UDP: port-n

Lsof-I: port-n

# Lsof-I tcp: 8080-n

Reprinted below

************************************

Note: The above resolves conflicts with XDB. I found that most people are asking about conflicts with the OSE (oracle servlet engine), which occurs when accessing port 8080, what I see is a stubborn little fliggy.

The solution is as follows:

My oracle is installed on the d disk. You can find it based on your situation.

D: oracleora90jisinstall> sess_sh-u sys/change_on_install-role SYSDBA-s jdbc: oracle: oci8: @ oradb (enter your service name here. Mine is

Oradb)

-- Session Shell --

-- Type "help" at the command line for help message

$ @ Serverendp. ssh admin 4321 4322-register

$ Exit

You can replace the original 8080 with 4321, and replace 9090 with 4322.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.