1

Apache httpd をロード バランサーとして使用しています。すべての SOAP リクエストは正常に機能しており、ロード バランサーをナビゲートしています。しかし問題は、ロード バランサーへのすべてのレストフル リクエストが 404 を返すことです。

ロード バランサーの構成と Java Web サービス コードをここに添付しました。

 Listen 7060

<VirtualHost *:7060>
        ServerName domain.com
        ProxyRequests off
        <Proxy balancer://mycluster>

                # StartBalancerMember
                BalancerMember http://127.0.0.1:7071/
                BalancerMember http://127.0.0.1:7072/
                BalancerMember http://127.0.0.1:7073/
                BalancerMember http://127.0.0.1:7074/
                BalancerMember http://127.0.0.1:7075/
                BalancerMember http://127.0.0.1:7076/
                BalancerMember http://127.0.0.1:7077/
                BalancerMember http://127.0.0.1:7078/
                BalancerMember http://127.0.0.1:7079/
                # EndBalancerMember

                # Security "technically we aren't blocking anyone but this the place to make those chages
                Order Deny,Allow
                Deny from none
                Allow from all
                # Load Balancer Settings We will be configuring a simple Round Robin style load balancer.  This means that all webheads take an equal share of of the load.
                ProxySet lbmethod=byrequests
        </Proxy>
        # balancer-manager This tool is built into the mod_proxy_balancer module and will allow you to do some simple modifications to the balanced group via a gui web interface.
        <Location /balancer-manager>
                SetHandler balancer-manager
                # I recommend locking this one down to your your office
                Order deny,allow
                Allow from all
        </Location>
        # Point of Balance This setting will allow to explicitly name the the location in the site that we want to be balanced, in this example we will balance "/" or everything in the site.
        ProxyPass /balancer-manager !
        ProxyPass / balancer://mycluster/

</VirtualHost>


@Service
@Produces("application/json")
@Consumes("application/json")
@Path("/executionRest")
public class RestWebService {

    @Resource
    private ExecutionManager executionManager;

    @GET
    @Path("/restTest")
    public String testInvocation() {
        return "Rest test";
    }
}

ブラウザで最初のメンバー uri に直接入力すると、次のようになります。

http://localhost:7071/bdes/ws/rs/executionRest/restTest

応答として「残りのテスト」を取得します

しかし、ブラウザに入力すると:

http://localhost:7060/bdes/ws/rs/executionRest/restTest

私は404を取得します!

ロードバランサーの設定に問題があるのでしょうか?

前もって感謝します

4

0 に答える 0