Recognition and treatment of WebService problems in Nginx + Tomcat load Balancing _nginx

Source: Internet
Author: User
Tags tomcat server nginx load balancing wsdl

Because there are webservice services in my project, it's necessary to comb through the problems I've encountered. 1. Webservice cannot be started at the same time on the same machine

Problem Description:

The Nginx cluster cannot be started at the same time--the port is occupied because the webservice is first started by Tomcat on the same computer.

Workaround:

Method One, prepare two servers, deploy the project to the Tomcat application server separately.

Method Two, in the same computer, change one of the Tomcat's WebService port (this method changes the port does not recommend adoption). 2, WebService can't open [Nginx not do WebService agent]

Problem Description:

Due to the problem described in 1, the test on this machine so that the port was changed to 8088 and 8090;nginx.conf set two Tomcat server address, so through the nginx can quickly access to the project dynamic or static pages and resources. But through http://localhost:8088/mobilewebservice?wsdl and http://localhost:8090/mobilewebservice?wsdl but how also can not access to webservice.

Note: The localhost here is the Nginx local access path instead of the usual localhost that we tomcat access, although very similar but not the same thing, nginx defaults to 80 ports and the tomcat default port is 8080.

Workaround:

Try the original WebService access address-that is, Tomcat's address before the load balancing is configured. Access to Tomcat's WebService address: http://192.168.1.147:8090/mobilewebservice?wsdl and http://192.168.1.147:8088/ MOBILEWEBSERVICE?WSDL access was successful, indicating that Nginx load balancing does not affect Tomcat's original webservice, so how to access it now.

Note: The access port for my webservice is 8088 and 8090.



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.