Presto 服务器 - 无法连接到发现服务器进行公告 [英] Presto server - Cannot connect to discovery server for announce

查看:175
本文介绍了Presto 服务器 - 无法连接到发现服务器进行公告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用独立的协调器/多个工作节点运行 Presto.协调器节点启动,但不能向发现服务(在同一节点上运行)宣布自己.在另一个节点上启动 presto worker 也无法向 Discovery 服务宣布,因此在 qyerying 时出现此问题:failed: No nodes available to run query.

协调器/发现节点配置:

coordinator=true数据源=jmxhttp-server.http.port=8000presto-metastore.db.type=h2presto-metastore.db.filename=var/db/MetaStoretask.max-memory=1GB发现-server.enabled=truediscovery.uri=http://10.0.0.11:8000

启动日志:

2013-11-11T16:54:57.999+0000 INFO main com.facebook.presto.server.PrestoServer ======== 服务器启动 ========2013-11-11T16:54:58.002+0000 错误公告员-0 io.airlift.discovery.client.Announcer 无法连接到发现服务器进行公告:公告失败,状态码为 404:<头><meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/><title>错误 404 未找到</title><身体><h2>HTTP 错误:404</h2><p>访问/v1/announcement/presto-coordinator 时出现问题.原因:<预>未找到</pre></p><hr/><i><small>Powered by Jetty://</small></i>

服务器似乎在端口 8000 上运行:

[root@ip-10-0-0-11 ~]# curl http://10.0.0.11:8000<!DOCTYPE html><头><meta charset="utf-8">...<身体><div class="容器"><div class="page-header"><h1>Presto</h1>

...

附言在 Azure 集群上看到同样的问题,看起来不是亚马逊或网络问题.

这是对this问题的跟进Presto 可以在同一节点上与 Coordinator/Worker 一起正常工作(但仍然存在上述问题).

解决方案

看了你的问题和评论几次后,我终于意识到这是发现服务器(嵌入式和独立)中的一个错误导致动态公告不当 node.id(在 node.properties 文件中)不是 UUID 时工作.我们从来没有注意到这个错误,因为我们总是使用 UUID.

这里的线索是问题访问 /v1/announcement/presto-coordinator"消息.这意味着 node.id 设置为 presto-coordinator,这应该是完全有效的,但是动态公告资源尝试将其解析为 UUID 并失败,导致 404响应 PUT 请求.

我们很快就会解决这个问题,但现在的解决方法是将 node.id 设置为 UUID.您可以运行 uuiduuidgen 命令行实用程序来生成它们.确保每个 worker 的 node.id 都有不同的值.

Trying to run Presto with standalone Coordinator/several worker nodes. Coordinator node starts, but can not announce itself to the Discovery service (running on the same node). Starting presto worker on another node also fails to announce to the Discovery service and thus this problem when qyerying: failed: No nodes available to run query.

Coordinator/Discovery node config:

coordinator=true
datasources=jmx
http-server.http.port=8000
presto-metastore.db.type=h2
presto-metastore.db.filename=var/db/MetaStore
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://10.0.0.11:8000

Startup log:

2013-11-11T16:54:57.999+0000     INFO   main    com.facebook.presto.server.PrestoServer     ======== SERVER STARTED ========
2013-11-11T16:54:58.002+0000    ERROR   Announcer-0 io.airlift.discovery.client.Announcer   Cannot connect to discovery server for announce: Announcement failed with status code 404:         <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /v1/announcement/presto-coordinator. Reason:
<pre>    Not Found</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

Server seems be running on port 8000:

[root@ip-10-0-0-11 ~]# curl http://10.0.0.11:8000
<!DOCTYPE html>
<head>
    <meta charset="utf-8">
...
<body>
<div class="container">
    <div class="page-header">
        <h1>Presto</h1>
    </div>
...

P.S. Seeing the same problem on Azure cluster, doesn't look to be Amazon or networking issue.

This is follow up to this question where Presto would work fine with Coordinator/Worker on the same node (but still having the problem above).

解决方案

After reading your question and comment several times, I finally realized that this is a bug in the discovery server (both embedded and standalone) that causes dynamic announcements not to work when node.id (in the node.properties file) is not a UUID. We have never noticed this bug because we always use UUIDs.

The clue here is the "Problem accessing /v1/announcement/presto-coordinator" message. This means node.id is set to presto-coordinator, which should be perfectly valid, but the dynamic announcement resource tries to parse it as a UUID and fails, causing the 404 response to the PUT request.

We will fix this soon, but for now the workaround is to set node.id to a UUID. You can run the uuid or uuidgen command line utility to generate them. Make sure each worker has a different value for node.id.

这篇关于Presto 服务器 - 无法连接到发现服务器进行公告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆