miniproject4-team4 / NGINX-PROXY-SERVER

0 stars 0 forks source link

ngrinder controller, agent 연결 문제 #4

Closed shimguh closed 7 months ago

shimguh commented 7 months ago

다른 기기의 ngrinder 연결 문제

원인

netsh 사용하여 해결

netsh를 사용하여 해당 포트의 접근을 wsl와 연결

# 등록 - WSL IP : 172.27.121.71
netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 connectport=8080 connectaddress=172.27.121.71

# 목록확인
netsh interface portproxy show v4tov4

# 목록 삭제
netsh interface portproxy delete v4tov4 listenport=8080 listenaddress=0.0.0.0
shimguh commented 7 months ago

controller, agent 연결 문제

provide more agent java execution option if necessary.

agent.java_opt=

provide more agent jvm classpath if necessary.

agent.jvm.classpath=

set following false if you want to use more than 1G Xmx memory per a agent process.

agent.limit_xmx=true

please uncomment the following option if you want to send all logs to the controller.

agent.all_logs=true

some jvm is not compatible with DNSJava. If so, set this false.

agent.enable_local_dns=false

please uncomment the following option if you want to run controller_to_agent connection mode agent.

agent.connection_mode=controller_to_agent

agent.connection_port=14000

set following with the ip you want to broadcast yourself. Set this option if the agent needs to be discovered as public ip.

agent.broadcast_ip=


- run 결과 erro 발생

2024-02-28 15:14:34,299 INFO agent controller: Connected to agent controller server at /192.168.0.29:8080 2024-02-28 15:14:34,299 INFO agent controller: Waiting for agent controller server signal 2024-02-28 15:14:34,308 INFO agent controller: agent controller communication is shutdown 2024-02-28 15:14:34,312 ERROR agent controller: Exception whilst sending message. This error is not critical if it doesn't occur much.


- 16001 포드도 같은 과정 후 실행 했더니 동일한 에러 발생
- ~/.ngrinder_agent/agent.conf  WSL 내부 IP로 수정 후 재실행

agent.controller_host=172.27.121.71 agent.controller_port=16001

- 다른 오류 발생

2024-02-28 15:39:43,662 INFO agent config: NGRINDER_AGENT_HOME : /home/awya5/.ngrinder_agent 2024-02-28 15:39:43,797 INFO starter: 2024-02-28 15:39:43,798 INFO starter: Start nGrinder Agent ... 2024-02-28 15:39:43,798 INFO starter: 2024-02-28 15:39:43,798 INFO starter: JVM server mode is disabled. 2024-02-28 15:39:43,851 INFO starter: connecting to controller 172.27.121.71:16001 2024-02-28 15:39:43,906 INFO agent controller daemon: The agent controller daemon is started. 2024-02-28 15:41:57,569 ERROR agent controller: Error while connecting to agent controller server at /172.27.121.71:16001


- ~/.ngrinder_agent/agent.conf 재수정

common.start_mode=agent agent.controller_host=192.168.0.29 agent.controller_port=16001 agent.subregion= agent.owner=admin

agent.host_id=

agent.server_mode=true

provide more agent java execution option if necessary.

agent.java_opt=

provide more agent jvm classpath if necessary.

agent.jvm.classpath=

set following false if you want to use more than 1G Xmx memory per a agent process.

agent.limit_xmx=true

please uncomment the following option if you want to send all logs to the controller.

agent.all_logs=true

some jvm is not compatible with DNSJava. If so, set this false.

agent.enable_local_dns=false

please uncomment the following option if you want to run controller_to_agent connection mode agent.

agent.connection_mode=controller_to_agent

agent.connection_port=14000

set following with the ip you want to broadcast yourself. Set this option if the agent needs to be discovered as public ip.

agent.broadcast_ip=



수정 후 실행 결과 성공
shimguh commented 7 months ago

ngrinder test 시작 시 오류

해결

$ netsh interface portproxy show v4tov4

ipv4 수신 대기: ipv4에 연결:

주소 포트 주소 포트


0.0.0.0 8080 172.27.121.71 8080 0.0.0.0 16001 172.27.121.71 16001 0.0.0.0 12000-12010 172.27.121.71 12000-12010

- 포트를 한번에 열지 않고 하나씩 열어서 해결

$ netsh interface portproxy show v4tov4

ipv4 수신 대기: ipv4에 연결:

주소 포트 주소 포트


0.0.0.0 8080 172.27.121.71 8080 0.0.0.0 16001 172.27.121.71 16001 0.0.0.0 12000 172.27.121.71 12000 0.0.0.0 12001 172.27.121.71 12001 0.0.0.0 12002 172.27.121.71 12002 0.0.0.0 12003 172.27.121.71 12003 0.0.0.0 12004 172.27.121.71 12004 0.0.0.0 12005 172.27.121.71 12005 0.0.0.0 12006 172.27.121.71 12006 0.0.0.0 12007 172.27.121.71 12007 0.0.0.0 12008 172.27.121.71 12008 0.0.0.0 12009 172.27.121.71 12009



- ngrinder 가이드 : https://github.com/naver/ngrinder/wiki/Installation-Guide#prerequisite
- 가이드를 통해 각각의 포트를 확인