buildbarn / bb-deployments

Example deployments of Buildbarn on various platforms
Apache License 2.0
102 stars 70 forks source link

Cannot connect worker to scheduler #68

Closed QuantSuv closed 2 years ago

QuantSuv commented 2 years ago

I am trying to run the abseil-hello program using docker-compose. With the code as it was, I was getting the repeating error message:

worker-ubuntu16-04_1 | 2022/07/18 10:45:02 Worker {"datacenter":"paris","hostname":"ubuntu-worker.example.com","rack":"4","slot":"15","thread":"5"}: rpc error: code = Unavailable desc = Failed to synchronize with scheduler: connection error: desc = "transport: Error while dialing failed to do connect handshake, response: \"HTTP/1.1 403 Forbidden\\r\\nContent-Length: 3380\\r\\nConnection: keep-alive\\r\\nContent-Language: en\\r\\nContent-Type: text/html;charset=utf-8\\r\\nDate: Mon, 18 Jul 2022 10:37:57 GMT\\r\\nMime-Version: 1.0\\r\\nServer: squid\\r\\nVary: Accept-Language\\r\\nX-Cache: MISS from localhost\\r\\nX-Cache-Lookup: NONE from localhost:8080\\r\\nX-Squid-Error: ERR_ACCESS_DENIED 0\\r\\n\\r\\n\\n<html><head>\\n<meta type=\\\"copyright\\\" content=\\\"Copyright (C) 1996-2017 The Squid Software Foundation and contributors\\\">\\n<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\\n<title>ERROR: The requested URL could not be retrieved</title>\\n<style type=\\\"text/css\\\"><!--\\n /*\\n * Copyright (C) 1996-2017 The Squid Software Foundation and contributors\\n *\\n * Squid software is distributed under GPLv2+ license and includes\\n * contributions from numerous individuals and organizations.\\n * Please see the COPYING and CONTRIBUTORS files for details.\\n */\\n\\n/*\\n Stylesheet for Squid Error pages\\n Adapted from design by Free CSS Templates\\n http://www.freecsstemplates.org\\n Released for free under a Creative Commons Attribution 2.5 License\\n*/\\n\\n/* Page basics */\\n* {\\n\\tfont-family: verdana, sans-serif;\\n}\\n\\nhtml body {\\n\\tmargin: 0;\\n\\tpadding: 0;\\n\\tbackground: #efefef;\\n\\tfont-size: 12px;\\n\\tcolor: #1e1e1e;\\n}\\n\\n/* Page displayed title area */\\n#titles {\\n\\tmargin-left: 15px;\\n\\tpadding: 10px;\\n\\tpadding-left: 100px;\\n\\tbackground: url('/squid-internal-static/icons/SN.png') no-repeat left;\\n}\\n\\n/* initial title */\\n#titles h1 {\\n\\tcolor: #000000;\\n}\\n#titles h2 {\\n\\tcolor: #000000;\\n}\\n\\n/* special event: FTP success page titles */\\n#titles ftpsuccess {\\n\\tbackground-color:#00ff00;\\n\\twidth:100%;\\n}\\n\\n/* Page displayed body content area */\\n#content {\\n\\tpadding: 10px;\\n\\tbackground: #ffffff;\\n}\\n\\n/* General text */\\np {\\n}\\n\\n/* error brief description */\\n#error p {\\n}\\n\\n/* some data which may have caused the problem */\\n#data {\\n}\\n\\n/* the error message received from the system or other software */\\n#sysmsg {\\n}\\n\\npre {\\n font-family:sans-serif;\\n}\\n\\n/* special event: FTP / Gopher directory listing */\\n#dirmsg {\\n font-family: courier;\\n color: black;\\n font-size: 10pt;\\n}\\n#dirlisting {\\n margin-left: 2%;\\n margin-right: 2%;\\n}\\n#dirlisting tr.entry td.icon,td.filename,td.size,td.date {\\n border-bottom: groove;\\n}\\n#dirlisting td.size {\\n width: 50px;\\n text-align: right;\\n padding-right: 5px;\\n}\\n\\n/* horizontal lines */\\nhr {\\n\\tmargin: 0;\\n}\\n\\n/* page displayed footer area */\\n#footer {\\n\\tfont-size: 9px;\\n\\tpadding-left: 10px;\\n}\\n\\n\\nbody\\n:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }\\n:lang(he) { direction: rtl; }\\n --></style>\\n</head><body id=\\\"ERR_ACCESS_DENIED\\\">\\n<div id=\\\"titles\\\">\\n<h1>ERROR</h1>\\n<h2>The requested URL could not be retrieved</h2>\\n</div>\\n<hr>\\n\\n<div id=\\\"content\\\">\\n<p>The following error was encountered while trying to retrieve the URL: <a href=\\\"scheduler:8983\\\">scheduler:8983</a></p>\\n\\n<blockquote id=\\\"error\\\">\\n<p><b>Access Denied.</b></p>\\n</blockquote>\\n\\n<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>\\n\\n<p>Your cache administrator is <a href=\\\"mailto:admin@localhost?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%20localhost%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Mon,%2018%20Jul%202022%2010%3A37%3A57%20GMT%0D%0A%0D%0AClientIP%3A%2010.212.185.2%0D%0A%0D%0AHTTP%20Request%3A%0D%0ACONNECT%20%2F%20HTTP%2F1.1%0AUser-Agent%3A%20grpc-go%2F1.45.0%0D%0AHost%3A%20scheduler%3A8983%0D%0A%0D%0A%0D%0A\\\">admin@localhost</a>.</p>\\n<br>\\n</div>\\n\\n<hr>\\n<div id=\\\"footer\\\">\\n<p>Generated Mon, 18 Jul 2022 10:37:57 GMT by localhost (squid)</p>\\n<!-- ERR_ACCESS_DENIED -->\\n</div>\\n</body></html>\\n\""

So I deleted the url 'ubuntu-worker.example.com' and replaced it with 'localhost'. I received the following error instead:

worker-ubuntu16-04_1 | 2022/07/18 11:19:42 Worker {"datacenter":"paris","hostname":"localhost","rack":"4","slot":"15","thread":"4"}: rpc error: code = Unavailable desc = Failed to synchronize with scheduler: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:8983: connect: connection refused" Both errors were repeating continuously. Any suggestions?

moroten commented 2 years ago

What ports are your Squid listening on? That is not part of the Buildbarn docker at all. Host: scheduler:8983 looks correct.