Giter Site home page Giter Site logo

agent启动问题? about docs HOT 24 CLOSED

flowci avatar flowci commented on August 28, 2024
agent启动问题?

from docs.

Comments (24)

yunheli avatar yunheli commented on August 28, 2024

@yhvh009 这些属于正常的输出,因为有定时任务检测,你在agent页面查看agent是否启动成功

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

agent里面显示是off,已关机

from docs.

yunheli avatar yunheli commented on August 28, 2024

USE_DOCKER 启动的时候 不要用127.0.0.1 Docker里面 127.0.0.1访问的不是外网

FLOW_API_DOMAIN=ip ./start-services.sh
USER_DOCKER=true ./start-agent.sh ip XXXX

from docs.

yunheli avatar yunheli commented on August 28, 2024

@yhvh009

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

可能是路径之类的配置有问题,nohup.out里面输出:

�[34m2018-01-11 17:38:24.459 [TRACE] App - ========= Flow Agent Started =========
�[m�[34m2018-01-11 17:38:24.461 [TRACE] App - === Server: http://127.0.0.1:8080/flow-api
�[m�[34m2018-01-11 17:38:24.461 [TRACE] App - === Token: 1d93cdfd-c2ff-4432-82c2-0fe6905f5520
�[m�[34m2018-01-11 17:38:24.462 [TRACE] App - === Start to load configuration
�[mlog4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
�[34m2018-01-11 17:38:24.924 [TRACE] App - ====== Settings: AgentSettings{agentPath=default#agent_test, webSocketUrl='ws://127.0.0.1:8080/flow-api/agent/cmd/logging', cmdStatusUrl='http://127.0.0.1:8080/flow-control-center/cmd/report', cmdLogUrl='http://127.0.0.1:8080/flow-control-center/cmd/log/upload', zookeeperUrl='127.0.0.1:2181'} com.flow.platform.domain.AgentSettings@275fe372
�[m�[34m2018-01-11 17:38:24.924 [TRACE] App - ====== Zookeeper host: 127.0.0.1:2181
�[m�[34m2018-01-11 17:38:24.925 [TRACE] App - ====== Working zone: default
�[m�[34m2018-01-11 17:38:24.925 [TRACE] App - ====== Agent agent: agent_test
�[m�[34m2018-01-11 17:38:24.925 [TRACE] App - ========= Config initialized =========
�[mSLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "Thread-1" com.flow.platform.util.zk.ZkException: Cannot check existing for path: /flow-agents/default/agent_test
at com.flow.platform.util.zk.ZKClient.exist(ZKClient.java:104)
at com.flow.platform.util.zk.ZKClient.createEphemeral(ZKClient.java:147)
at com.flow.platform.agent.AgentManager.registerZkNodeAndWatch(AgentManager.java:202)
at com.flow.platform.agent.AgentManager.run(AgentManager.java:95)
at java.base/java.lang.Thread.run(Thread.java:844)

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

我是在本地运行的,所以应该不是localhost的问题 @yunheli

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

那个路径不知道是哪里配置的,/flow-agents/default/agent_test

from docs.

yunheli avatar yunheli commented on August 28, 2024

agent 要访问api的地址 在docker里面访问 127.0.0.1:8080/flow-api能访问么

from docs.

yunheli avatar yunheli commented on August 28, 2024

@yhvh009 agent与api打交道是通过api来获取token,但是在docker里面访问127.0.0.1访问的不是外网的,所以需要知道你宿主机器的ip来访问

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

这块不是太懂,宿主机器是指什么?我就是本地mac安装的docker,flowci也是跑在我本地mac上的

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

@yunheli

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

我访问控制台就是直接浏览器访问localhost:3000的,这个是能访问的

from docs.

yunheli avatar yunheli commented on August 28, 2024

宿主机就是你的mac电脑 ,ifconfig 获取到你的mac在局域网的ip之后按照之前的启动就行了

from docs.

yunheli avatar yunheli commented on August 28, 2024

localhost:3000是证明你的api启动成功了,但是你的agent要个api打交道就不能用USE_DOCKER的形式

from docs.

yunheli avatar yunheli commented on August 28, 2024

USE_DOCKER 的形式是访问不到api的

from docs.

yunheli avatar yunheli commented on August 28, 2024

你的机器上如果有java环境就把USE_DOCKER去掉吧

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

哦哦,好的,我先试一下

from docs.

yunheli avatar yunheli commented on August 28, 2024

from docs.

yhvh009 avatar yhvh009 commented on August 28, 2024

@yunheli 还是不太行,可能我哪里的理解有问题吧,能加个QQ或者微信之类的么?

from docs.

KKSun avatar KKSun commented on August 28, 2024

mac上用docker的问题已经解决,推测原因应该是后端端口8080被占用(通过lsof -i:8080发现8080端口被mac版微信占用)

解决方案
前端端口和后端端口按照以下图片的指示改为不常用的端口号(eg. 12345 & 13456)
image
接着在xx/docker目录下用FLOW_API_DOMAIN=127.0.0.1 FLOW_WEB_DOMAIN=127.0.0.1 ./start-services.sh即可实现本机登录(默认登录名、密码见log)

from docs.

LGang avatar LGang commented on August 28, 2024

我也出现了这个问题,具体见截图,就是控制台显示Agent启动成功了,但是在浏览器中看还是关机状态。

cd docker
./start-services.sh
USE_DOCKER=true ./start-agent.sh localhost ***********

browser
console
docker
@yunheli @KKSun 望解答

from docs.

yunheli avatar yunheli commented on August 28, 2024

@yhvh009 使用USE_DOCKER=true时不要使用 localhost

from docs.

yunheli avatar yunheli commented on August 28, 2024

@LGang

from docs.

yunheli avatar yunheli commented on August 28, 2024

+QQ: 1059103388

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.