首页 文章

发出访问docker容器外的vespa的问题

提问于
浏览
1

在Mac上安装了Docker并尝试按照以下链接https://docs.vespa.ai/documentation/vespa-quick-start.html中指定的步骤在Docker上运行Vespa

直到第4步我没有遇到任何问题 . 我看到步骤2之后运行的vespa容器和第3步返回200 OK响应 .

但是步骤5未能返回200 OK响应 . 下面是我在终端上运行的命令curl -s --head http://localhost:8080/ApplicationStatus

我一直在

curl:(52)每当我运行没有-s选项时,从服务器清空回复 .

所以我试着看到我的vespa容器内的监听端口,并没有看到8080的任何东西,但可以看到19071年(在步骤3中使用)

➜  ~ docker exec vespa bash -c 'netstat -vatn| grep 8080'  

➜  ~ docker exec vespa bash -c 'netstat -vatn| grep 19071'

tcp        0      0 0.0.0.0:19071           0.0.0.0:*               LISTEN

doc下面有与vespa端口相关的信息

https://docs.vespa.ai/documentation/reference/files-processes-and-ports.html

我假设在docker run(快速启动链接的第2步)之后端口8080应该是活动的,并且可以在端口映射完成时在容器外部访问 . 但我首先看不到内部容器中的8080端口活动 . 我错过了什么 . 我是否需要执行快速启动中提到的任何其他步骤?仅供参考我将Jenkins安装在我的docker中,并能够通过端口映射访问外部容器 . 但不确定为什么它不与vespa合作 . 我一直在尝试安静,但没有进展 . 如果我在这里遗漏了什么,请告诉我 .

3 回答

  • 0

    您的docker容器的内存太低,"Minimum 6GB memory dedicated to Docker (the default is 2GB on Macs)." . 见https://docs.vespa.ai/documentation/vespa-quick-start.html

    死锁检测器警告和从配置服务器获取配置失败(可能已被杀死)表示您的内存太低 .

  • 2

    @Frode Lundgren:非常感谢您的回复 . 以下是日志搜索返回的内容:

    ➜  ~ docker exec vespa bash -c '/opt/vespa/bin/vespa-logfmt /opt/vespa/logs/vespa/vespa.log | grep -C4 "Container.com.yahoo.container.jdisc.ConfiguredApplication" ' 
    
      [2018-12-10 05:30:16.064] INFO    : container        Container.org.eclipse.jetty.server.handler.ContextHandler    Started o.e.j.s.ServletContextHandler@624b523{8080,/,null,AVAILABLE}
    [2018-12-10 05:30:16.065] INFO    : container        Container.com.yahoo.jdisc.http.server.jetty.JDiscServerConnector   No channel set by activator, opening channel ourselves.
    [2018-12-10 05:30:16.080] INFO    : container        Container.org.eclipse.jetty.server.AbstractConnector   Started SearchServer@58eac00e{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
    [2018-12-10 05:30:16.081] INFO    : container        Container.org.eclipse.jetty.server.Server  Started @42381ms
    [2018-12-10 05:30:16.081] INFO    : container        Container.com.yahoo.container.jdisc.ConfiguredApplication  Switching to the latest deployed set of configurations and components. Application switch number: 0
    [2018-12-10 05:30:16.748] INFO    : container        stdout [GC (CMS Initial Mark)  381103K(1494272K), 0.0339953 secs]
    [2018-12-10 05:30:21.943] INFO    : container        stdout [GC (CMS Final Remark)  398099K(1494272K), 0.0470648 secs]
    [2018-12-10 05:30:34.461] INFO    : container-clustercontroller stdout  [GC (Allocation Failure)  223396K->13586K(498112K), 0.0710058 secs]
    [2018-12-10 05:31:43.172] WARNING : distributor      vds.framework.thread.impl  Thread is registering tick at time 1544419499454, but last time it registered a tick, the time was 1544419499488. Assuming clock has been adjusted backwards (Repeated 1 times since 1544419499.454323) 
    
    --
    [2018-12-10 05:53:49.539] INFO    : docprocservice   Container.org.eclipse.jetty.server.handler.ContextHandler  Started o.e.j.s.ServletContextHandler@10643593{19122,/,null,AVAILABLE}
    [2018-12-10 05:53:49.539] INFO    : docprocservice   Container.com.yahoo.jdisc.http.server.jetty.JDiscServerConnector   No channel set by activator, opening channel ourselves.
    [2018-12-10 05:53:49.574] INFO    : docprocservice   Container.org.eclipse.jetty.server.AbstractConnector   Started SearchServer@4ee6291f{HTTP/1.1,[http/1.1]}{0.0.0.0:19122}
    [2018-12-10 05:53:49.574] INFO    : docprocservice   Container.org.eclipse.jetty.server.Server  Started @395521ms
    [2018-12-10 05:53:49.575] INFO    : docprocservice   Container.com.yahoo.container.jdisc.ConfiguredApplication  Switching to the latest deployed set of configurations and components. Application switch number: 0
    [2018-12-10 05:55:58.131] WARNING : distributor      vds.framework.thread.impl  Thread is registering tick at time 1544421358128, but last time it registered a tick, the time was 1544421358163. Assuming clock has been adjusted backwards
    [2018-12-10 05:56:43.055] WARNING : searchnode       proton.deadlock.detector   Thread statemanager has gone 90621 milliseconds without registering a tick. Global slack not expended yet. Warning for now. (Repeated 85 times since 1544421010.017173)
    [2018-12-10 06:01:10.812] WARNING : configproxy      configproxy.com.yahoo.config.subscription.impl.JRTConfigRequester  Request callback failed. Req: request='name=slobroks,namespace=cloud.config,configId=container/searchchains/chain/vespavisit/component/com.yahoo.storage.searcher.VisitSearcher,vespa-container,e29c2ea2572972589ec1cc514c6a8bf7,2,490399,Optional[6.319.4]'\nresponse=',-1,false'\n\nSpec: tcp/vespa-container:19070 . Req error message: Request timed out after 495.399 seconds.
    [2018-12-10 06:01:10.816] INFO    : configproxy      configproxy.com.yahoo.config.subscription.impl.JRTConfigRequester  Failure of config subscription, clients will keep existing config until resolved: name=slobroks,namespace=cloud.config,configId=container/searchchains/chain/vespavisit/component/com.yahoo.storage.searcher.VisitSearcher, Current generation: 2, Generation changed: false, Config changed: false
    

    此外,当我搜索 Initializing new set of configurations and components 时,它在日志中返回0结果

    ➜  ~ docker exec vespa bash -c '/opt/vespa/bin/vespa-logfmt /opt/vespa/logs/vespa/vespa.log | grep -C4 "Initializing new set of configurations and components"'   
    
    ➜  ~
    

    从上面的空输出我得出结论,初始化步骤没有发生 . 知道为什么初始化没有发生?我正在从我的本地机器上运行docker .

  • 4

    我的猜测是你的jdisc容器没有完成初始化或没有正确初始化?你试过检查日志了吗?

    docker exec vespa bash -c '/opt/vespa/bin/vespa-logfmt /opt/vespa/logs/vespa/vespa.log'
    

    这应该告诉你是否有什么问题 . 当它准备好接收请求时,您会看到如下内容:

    [2018-12-10 06:30:37.854] INFO    : container        Container.org.eclipse.jetty.server.AbstractConnector   Started SearchServer@79afa369{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
    [2018-12-10 06:30:37.857] INFO    : container        Container.org.eclipse.jetty.server.Server  Started @10280ms
    [2018-12-10 06:30:37.857] INFO    : container        Container.com.yahoo.container.jdisc.ConfiguredApplication  Switching to the latest deployed set of configurations and components. Application switch number: 0
    [2018-12-10 06:30:37.859] INFO    : container        Container.com.yahoo.container.jdisc.ConfiguredApplication  Initializing new set of configurations and components. Application switch number: 1
    

相关问题