Search code examples
amazon-web-servicesprestotrino

Presto server on AWS - Cannot connect to discovery server


Trying to run Presto coordinator server with discovery server embedded on AWS CDH4 cluster

config.properties:

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://ip-10-0-0-11:8000

When server starts it can't register itself with discovery (relevant logs):

2013-11-08T19:38:38.193+0000     WARN   main    Bootstrap   Warning: Configuration property 'discovery.uri' is deprecated and should not be used
2013-11-08T19:38:38.968+0000     INFO   main    Bootstrap   discovery-server.enabled                                  false                             true
2013-11-08T19:38:38.975+0000     INFO   main    Bootstrap   discovery.uri                                             null                              http://ip-10-0-0-11:8000          Discovery service base URI
2013-11-08T19:38:40.916+0000    ERROR   Discovery-0 io.airlift.discovery.client.CachingServiceSelector  Cannot connect to discovery server for refresh (collector/general): Lookup of collector failed for http://ip-10-0-0-11:8000/v1/service/collector/general
2013-11-08T19:38:42.556+0000    ERROR   Discovery-1 io.airlift.discovery.client.CachingServiceSelector  Cannot connect to discovery server for refresh (presto/general): Lookup of presto failed for http://ip-10-0-0-11:8000/v1/service/presto/general
2013-11-08T19:38:43.854+0000     INFO   main    org.eclipse.jetty.server.AbstractConnector  Started SelectChannelConnector@0.0.0.0:8000

Tried to also run standalone Discovery server, same effect. Looks that listener is started after registration attempt is made.


Solution

  • I was wondering if someone would notice this in the logs :) It's actually not a problem. The error appears because the discovery client starts before the discovery server is ready. You'll see "succeeded for refresh" shortly after in the logs which shows that it's working. We will fix the log message eventually but it's purely a cosmetic issue.