Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-10191][Agent] Delete the useless code related to 8008 listen port #10192

Merged
merged 5 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docker/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ services:
- DATAPROXY_IP=dataproxy
- DATAPROXY_PORT=46801
- AUDIT_PROXY_URL=audit:10081
ports:
- "8008:8008"
volumes:
- ./collect-data:/data/collect-data

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public class AgentConstants {
public static final String AGENT_FETCHER_CLASSNAME = "agent.fetcher.classname";
public static final String AGENT_CONF_PARENT = "agent.conf.parent";
public static final String DEFAULT_AGENT_CONF_PARENT = "conf";
public static final String AGENT_HTTP_PORT = "agent.http.port";
public static final int DEFAULT_AGENT_HTTP_PORT = 8008;
public static final String CHANNEL_MEMORY_CAPACITY = "channel.memory.capacity";
public static final int DEFAULT_CHANNEL_MEMORY_CAPACITY = 2000;
public static final String JOB_NUMBER_LIMIT = "job.number.limit";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
import static org.apache.inlong.agent.constant.AgentConstants.AGENT_CLUSTER_IN_CHARGES;
import static org.apache.inlong.agent.constant.AgentConstants.AGENT_CLUSTER_NAME;
import static org.apache.inlong.agent.constant.AgentConstants.AGENT_CLUSTER_TAG;
import static org.apache.inlong.agent.constant.AgentConstants.AGENT_HTTP_PORT;
import static org.apache.inlong.agent.constant.AgentConstants.AGENT_NODE_GROUP;
import static org.apache.inlong.agent.constant.AgentConstants.DEFAULT_AGENT_HTTP_PORT;
import static org.apache.inlong.agent.constant.FetcherConstants.AGENT_MANAGER_HEARTBEAT_HTTP_PATH;
import static org.apache.inlong.agent.constant.FetcherConstants.DEFAULT_AGENT_MANAGER_HEARTBEAT_HTTP_PATH;

Expand Down Expand Up @@ -148,15 +146,13 @@ public void reportHeartbeat(HeartbeatMsg heartbeat) {
*/
private HeartbeatMsg buildHeartbeatMsg() {
final String agentIp = AgentUtils.fetchLocalIp();
final int agentPort = conf.getInt(AGENT_HTTP_PORT, DEFAULT_AGENT_HTTP_PORT);
final String clusterName = conf.get(AGENT_CLUSTER_NAME);
final String clusterTag = conf.get(AGENT_CLUSTER_TAG);
final String inCharges = conf.get(AGENT_CLUSTER_IN_CHARGES);
final String nodeGroup = conf.get(AGENT_NODE_GROUP);

HeartbeatMsg heartbeatMsg = new HeartbeatMsg();
heartbeatMsg.setIp(agentIp);
heartbeatMsg.setPort(String.valueOf(agentPort));
heartbeatMsg.setComponentType(ComponentTypeEnum.Agent.getType());
heartbeatMsg.setReportTime(System.currentTimeMillis());
if (StringUtils.isNotBlank(clusterName)) {
Expand All @@ -183,7 +179,6 @@ private HeartbeatMsg buildDeadHeartbeatMsg() {
heartbeatMsg.setNodeSrvStatus(NodeSrvStatus.SERVICE_UNINSTALL);
heartbeatMsg.setInCharges(conf.get(AGENT_CLUSTER_IN_CHARGES));
heartbeatMsg.setIp(AgentUtils.fetchLocalIp());
heartbeatMsg.setPort(String.valueOf(conf.getInt(AGENT_HTTP_PORT, DEFAULT_AGENT_HTTP_PORT)));
heartbeatMsg.setComponentType(ComponentTypeEnum.Agent.getType());
heartbeatMsg.setClusterName(conf.get(AGENT_CLUSTER_NAME));
heartbeatMsg.setClusterTag(conf.get(AGENT_CLUSTER_TAG));
Expand Down
1 change: 0 additions & 1 deletion inlong-agent/agent-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ADD ${AGENT_TARBALL} /opt/inlong-agent
RUN cp /usr/share/java/snappy-java.jar lib/snappy-java-*.jar
# add mysql connector
RUN wget -P lib/ https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar
EXPOSE 8008
ENV MANAGER_OPENAPI_IP=127.0.0.1
ENV MANAGER_OPENAPI_PORT=8082
ENV DATAPROXY_IP=127.0.0.1
Expand Down
2 changes: 1 addition & 1 deletion inlong-agent/agent-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ docker pull inlong/agent:latest

##### Start Container
```
docker run -d --name agent -p 8008:8008 \
docker run -d --name agent \
-e MANAGER_OPENAPI_IP=manager_opeapi_ip -e DATAPROXY_IP=dataproxy_ip \
-e MANAGER_OPENAPI_AUTH_ID=auth_id -e MANAGER_OPENAPI_AUTH_KEY=auth_key \
-e MANAGER_OPENAPI_PORT=8082 -e DATAPROXY_PORT=46801 inlong/agent
Expand Down
4 changes: 0 additions & 4 deletions inlong-agent/conf/agent.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
########################
# bdb data readonly
agent.localStore.readonly=false
# whether enable http service
agent.http.enable=true
# http default port
agent.http.port=8008

######################
# fetch center
Expand Down
Loading