What is a Service Mesh?

Question
What is a service mesh?

Answer
In the context of Kubernetes, it is something that "provides infrastructure services for traffic management, observability, and security" for container connectivity (as explained on page 230 of Kubernetes Patterns by Bilgin Ibryam and Roland Huß (O'Reilly). Copyright 2019 Bilgin Ibryam and Roland Huß, 978-1-492-05028-5). A service mesh will often use a sidecar. "…most meshes use the sidecar model…" taken from Platform9.com.

"A service mesh refers to the way that software code from cloud hosted applications is woven together at different levels of the webserver in integrated layers." (This quote was taken from VMware.com.)

"The mesh provides critical capabilities including service discovery, load balancing, encryption, observability, traceability, authentication and authorization, and support for the circuit breaker pattern." taken from https://www.nginx.com/blog/what-is-a-service-mesh/

Service meshes have applicability outside the realm of microservices (according to page 1 of Service Mesh for Dummies).

"In short, service mesh tools like Istio can reduce the operational burden of managing microservices-based applications, and in particular traffic between services, which could otherwise involve significant and often unsustainable manual work." taken from https://enterprisersproject.com/article/2019/6/service-mesh-plain-english

Spoiler alert: See #58 in this link to Answers to Kubernetes Quiz for examples.

How Do You Install Erlang on a Linux SUSE Server?

Problem scenario
You want to install Erlang on a Linux SUSE machine. What should you do?

Solution
Run this script with sudo (e.g., sudo bash /tmp/erlang.sh):

# Written by www.continualintegration.com
#/bin/bash

widgetversion=3.0.4

echo "This script can take 20 minutes to complete"

zypper -n install ncurses gcc-c++ autoconf make git python3 bzip2 gtk2 gtk3 gtk2-devel ncurses-utils ncurses-devel
cd /tmp/
curl -Ls https://github.com/wxWidgets/wxWidgets/releases/download/v$widgetversion/wxWidgets-$widgetversion.tar.bz2 > /tmp/wxWidgets-$widgetversion.tar.bz2
cp /tmp/wxWidgets-$widgetversion.tar.bz2 /bin/
cd /bin/
bzip2 -d wxWidgets-$widgetversion.tar.bz2
tar -xf wxWidgets-$widgetversion.tar
#cd wxWidgets-$widgetversion

cd /bin/
git clone https://github.com/erlang/otp.git
cd otp
./otp_build autoconf
./configure
echo "This next portion may take 15 minutes"
date > /tmp/datetime.txt
make
make install
ln -s /usr/local/lib/erlang/bin/erl /usr/bin/erl
ln -s /usr/local/bin/erlc /usr/bin/erlc
ln -s /etc/alternatives/python3 /usr/bin/python
echo "Script run completed."
echo " "
echo "Many errors above (if there are any) may be ignorable"
echo "try the 'erl' command with no quotes to see if Erlang was installed"
echo 'If you get to a carrot prompt, use Ctrl-c, then type the "a" key and then press Enter.'

How Do You Troubleshoot the Terraform Error “Unable to evaluate directory symlink: lstat”?

Updated on 6/4/22 to include possible solutions 2 through 4.

Problem scenario
You are running a terraform command, but you receive this error:

Initializing modules…
- website_contint_bucket in
Error: Unreadable module directory
Unable to evaluate directory symlink: lstat foobar: no such file or directory
Error: Failed to read module directory
Module directory does not exist or cannot be read.
Error: Unreadable module directory
Unable to evaluate directory symlink: lstat foobar: no such file or directory
Error: Failed to read module directory
Module directory does not exist or cannot be read.

What should you do?

Possible Solution #1
1. Run this Linux command from the directory you ran the terraform command: grep -iR source *

2. Look at the source value in the file that you find. There should be a stanza like the one below.

source = "./foobar/submod"

Is the source a valid path relative to where the file is that has this stanza?

3. Verify that above path exists by running ls -lh ./foobar/submod

(Substitute "./foobar/submod" with the value you found.) In a .tf or .tf.json file your source path is probably wrong if you are getting the error above.

Possible Solution #2
Are you using variables files? You may need to check those. Are you using different environments (such as Dev, QA, production)? Perhaps your .tf files are configured properly for one environment but not another.

Possible Solution #3
The "terraform apply" command will update a tfstate file (terraform.tfstate). You may need to check those. Are you using terraform remote state? You may need to verify the remote state is accessible.

Possible Solution #4
Are you using different projects (directories where you run the "init" command)? You may need to check your configuration or verify the directory that you are in when you ran the offending command.


Special thanks to Don Gillies for bringing up improvements for this article.

How Do You Install the docker.service File on RHEL 8.x?

One of the following problems occurs:

Problem scenario #1
You run some systemctl commands to start the Docker service, but you get this error: "Failed to enable unit: Unit file docker.service does not exist."
Or you run some other command and see this:
"Unit docker.service not found."
What should you do to get the docker.service file on a RHEL 8.x server?

Problem scenario #2
You are running a kubeadm command on RHEL 8, but you get this error:

[preflight] Running pre-flight checks
[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
[WARNING IsDockerSystemdCheck]: detected "" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING FileExisting-ebtables]: ebtables not found in system path
[WARNING FileExisting-socat]: socat not found in system path
[WARNING FileExisting-tc]: tc not found in system path

You cannot find a docker.service file either. What should you do?
How do you troubleshoot "docker service is not enabled" when you run a kubeadm command?

Possible Solution #1
Run these commands (but replace "rhel" with "centos" if you are using CentOS):

sudo dnf config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo
sudo dnf install docker-ce
sudo systemctl enable docker.service

Possible Solution #2
Run these commands (but replace "rhel" with "centos" if you are using CentOS):

sudo dnf config-manager --add-repo=https://download.docker.com/linux/rhel/docker-ce.repo
sed -i -e 's/baseurl=https:\/\/download\.docker\.com\/linux\/\(fedora\|rhel\)\/$releasever/baseurl\=https:\/\/download.docker.com\/linux\/centos\/$releasever/g' /etc/yum.repos.d/docker-ce.repo
sudo dnf install docker-ce
sudo systemctl enable docker.service

The second line above (with "sed") was taken from this posting.

Possible Solution #3
Here is another example (that was influenced by a StackOverflow.com posting) that was in /usr/lib/systemd/system/docker.service on a CentOS Stream release 8 server:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket containerd.service

[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always

# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3

# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s

# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity

# Comment TasksMax if your systemd version does not support it.
# Only systemd 226 and above support this option.
TasksMax=infinity

# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes

# kill only the docker process, not all processes in the cgroup
KillMode=process
OOMScoreAdjust=-500

[Install]
WantedBy=multi-user.target

After the file above is created, you should try running this command:

sudo systemctl enable docker.service

Possible Solution #4
Here is another example of a docker.service file. The file often "lives" in /usr/lib/systemd/system/. You should then try running this command:

sudo systemctl enable docker.service

How Do You Get Python to Parse Web Pages to Find a String?

Problem scenario
You know a string is buried in a series of web pages. How do you get Python to read the web pages and find the string?

Solution
Change the URLs as you desire. Change the "searchterm" variable assignment to the word of your choice. Then run this Python 3 program:

import re
import requests
listofurls = ['https://www.continualintegration.com/', 'https://www.continualintegration.com/miscellaneous-articles/page/1/', 'https://www.continualintegration.com/miscellaneous-articles/page/2/', 'https://www.continualintegration.com/miscellaneous-articles/page/3/', 'https://www.continualintegration.com/miscellaneous-articles/page/4/']

searchterm = "learned"

def finder(yoururl, searchterm):
    r = requests.get(yoururl)
    found = re.search(searchterm, r.text)
    if found:
      print("The string/pattern '" + searchterm + "' was found when searching " + yoururl)
    else:
      print("The string/pattern '" + searchterm + "' was not found when searching " + yoururl)


for x in listofurls:
  finder(x, searchterm)

What is Envoy in Kubernetes?

Question
What is Envoy in Kubernetes?

Answer
"Originally built at Lyft, Envoy is a high performance C++ distributed proxy designed for single services and applications, as well as a communication bus and “universal data plane” designed for large microservice “service mesh” architectures. Built on the learnings of solutions such as NGINX, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner. When all service traffic in an infrastructure flows via an Envoy mesh, it becomes easy to visualize problem areas via consistent observability, tune overall performance, and add substrate features in a single place." The above paragraph was taken from https://www.envoyproxy.io/

"Envoy Proxy is a modern, high performance, small footprint edge and service proxy. Envoy is most comparable to software load balancers such as NGINX and HAProxy." The previous sentence was taken from Getambassador.io.

How Do You Know the Entrenchments in the U.S. Constitution Exist?

Problem scenario
You read that there were two entrenchments in the U.S. Constitution. How do you know that they exist?

Answer
An entrenchment is the placement of something in a trench (according to Merriam-Webster's Dictionary). This connotes a defensible and protected area (e.g., for warfare). For a document constituting a government, an entrenchment is theoretically unmodifiable whereas the rest of the document is subject to being changed. For such a document, in practice, an entrenchment (an unamendable statement) is probably difficult to amend if the people or government want to amend it.

Article V of the Constitution explains the entrenchments. Article V describes amending the Constitution, and it specifies rules to bind three aspects of the Constitution from changes regardless of who may want to modify them in the future. Two of them, no longer apply because the year 1807 has passed; upon January 1, 1808, they ceased to have effect. One of these two was for the importation of slaves; the second of these two was for direct taxes on individuals. The third entrenchment is the guarantee of states having equal representation in the Senate (unless the state consents to waive it).

There were actually three entrenchments in the U.S. Constitution, but only one has applicability today. Both of the temporal (and now inactive) entrenchments pertained to the Legislative branch of government in the Constitution, and both were amended after the 1807 (via the 13th and 16th amendments respectively).

Here is Article V in its entirety:

The Congress, whenever two thirds of both Houses shall deem it necessary, shall propose Amendments to this Constitution, or, on the Application of the Legislatures of two thirds of the several States, shall call a Convention for proposing Amendments, which, in either Case, shall be valid to all Intents and Purposes, as Part of this Constitution, when ratified by the Legislatures of three fourths of the several States, or by Conventions in three fourths thereof, as the one or the other Mode of Ratification may be proposed by the Congress; Provided that no Amendment which may be made prior to the Year One thousand eight hundred and eight shall in any Manner affect the first and fourth Clauses in the Ninth Section of the first Article; and that no State, without its Consent, shall be deprived of its equal Suffrage in the Senate.

Taken from the U.S. Constitution

To read about Article I's section 9 clauses (the first and fourth thereof), see Congress' website. The 13th amendment (ratified on December 6, 1865) prohibited slavery in the U.S.A. (and thus modified the temporarily entrenched Article I's section 9's first clause). The 16th amendment (ratified on February 2, 1913) changed the Constitution's language for direct taxes on individuals (and thus modified the temporarily entrenched Article I's section 9's fourth clause).

How Do You Troubleshoot the Error “java.lang.IllegalArgumentException: query.max-memory-per-node set to 1GB, but only 80530637B of useable heap available”?

Problem scenario
You try to start Apache Presto. But you get an error like this:

2020-09-29T19:28:25.866Z WARN main io.airlift.jmx.JmxAgent Cannot determine if JMX agent is already running (not an Oracle JVM?). Will try to start it manually.
2020-09-29T19:28:25.916Z INFO main io.airlift.jmx.JmxAgent JMX agent started and listening on ip-172-31-103-99.us-east-2.compute.internal:44377
2020-09-29T19:28:26.030Z ERROR Discovery-0 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (collector/general): Lookup of collector failed for http://localhost:8080/v1/service/collector/general
2020-09-29T19:28:26.066Z ERROR Discovery-2 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (presto/general): Lookup of presto failed for http://localhost:8080/v1/service/presto/general
2020-09-29T19:28:27.161Z WARN http-client-shared-29 com.facebook.presto.metadata.RemoteNodeState Error fetching node state from http://172.31.103.99:8080/v1/info/state: Server refused connection: http://172.31.103.99:8080/v1/info/state
2020-09-29T19:28:28.227Z ERROR main com.facebook.presto.server.PrestoServer Unable to create injector, see the following errors:

1) Error injecting constructor, java.lang.IllegalArgumentException: query.max-memory-per-node set to 1GB, but only 80530637B of useable heap available
at com.facebook.presto.memory.LocalMemoryManager.(LocalMemoryManager.java:42)
at com.facebook.presto.server.ServerMainModule.setup(ServerMainModule.java:245)
while locating com.facebook.presto.memory.LocalMemoryManager
for parameter 5 at com.facebook.presto.execution.SqlTaskManager.(SqlTaskManager.java:106)
while locating com.facebook.presto.execution.SqlTaskManager
at com.facebook.presto.server.ServerMainModule.setup(ServerMainModule.java:236)
while locating com.facebook.presto.execution.TaskManager
for parameter 0 at com.facebook.presto.server.TaskResource.(TaskResource.java:97)
at com.facebook.presto.server.ServerMainModule.setup(ServerMainModule.java:234)
while locating com.facebook.presto.server.TaskResource
at io.airlift.jaxrs.JaxrsBinder.bind(JaxrsBinder.java:33)
while locating java.lang.Object annotated with @com.google.inject.multibindings.Element(setName=@io.airlift.jaxrs.JaxrsResource,uniqueId=460, type=MULTIBINDER, keyType=)

What should you do?

Possible Solution #1
Look at the jvm.config file for Presto.

Can you modify this setting to have more memory? Here would be one setting:
-Xmx1G

1G is often enough. If you set the value too low, you'll get the error above.

Possible Solution #2
Add more memory via swap space. See this posting for more information.

Possible Solution #3
Add more memory to the server (e.g., resize the VM or buy memory for the physical server). See this posting for more information.

How Do You Troubleshoot Presto Errors Like “java.lang.RuntimeException: java.net.BindException: Address already in use”?

Problem scenario
You are getting errors when you run Apache Presto like these:

2020-09-29T19:54:59.630Z ERROR Discovery-0 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (collector/general): Lookup of collector failed for http://localhost:8888/v1/service/collector/general
2020-09-29T19:54:59.828Z ERROR Discovery-0 io.airlift.discovery.client.CachingServiceSelector Cannot connect to discovery server for refresh (presto/general): Lookup of presto failed for http://localhost:8888/v1/service/presto/general
2020-09-29T19:55:02.734Z INFO Discovery-0 io.airlift.discovery.client.CachingServiceSelector Discovery server connect succeeded for refresh (collector/general)
2020-09-29T19:55:02.756Z INFO Discovery-1 io.airlift.discovery.client.CachingServiceSelector Discovery server connect succeeded for refresh (presto/general)
2020-09-29T19:55:05.303Z INFO main org.eclipse.jetty.server.Server jetty-9.3.9.M1
2020-09-29T19:55:05.359Z WARN main org.eclipse.jetty.server.handler.AbstractHandler No Server set for org.eclipse.jetty.server.handler.ErrorHandler@68b366e2
2020-09-29T19:55:07.050Z INFO main org.eclipse.jetty.server.handler.ContextHandler Started o.e.j.s.ServletContextHandler@3513c84c{/,null,AVAILABLE,@http}
2020-09-29T19:55:07.303Z INFO main org.eclipse.jetty.server.Server jetty-9.3.9.M1
2020-09-29T19:55:07.330Z WARN main org.eclipse.jetty.server.handler.AbstractHandler No Server set for org.eclipse.jetty.server.handler.ErrorHandler@61da0413
2020-09-29T19:55:07.688Z INFO main org.eclipse.jetty.server.handler.ContextHandler Started o.e.j.s.ServletContextHandler@336f49a1{/,null,AVAILABLE,@http}
2020-09-29T19:55:07.975Z ERROR main com.facebook.presto.server.PrestoServer Unable to create injector, see the following errors:

1) Error in custom provider, java.lang.RuntimeException: java.net.BindException: Address already in use
while locating io.airlift.http.server.HttpServerProvider
at io.airlift.http.server.HttpServerModule.configure(HttpServerModule.java:64)
while locating io.airlift.http.server.HttpServer
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:151)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:42)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:242)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:111)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:63)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:384)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at io.airlift.http.server.HttpServer.start(HttpServer.java:381)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:147)
… 20 more

2) Error in custom provider, java.lang.RuntimeException: java.net.BindException: Address already in use
while locating io.airlift.http.server.HttpServerProvider
at io.airlift.http.server.HttpServerModule.configure(HttpServerModule.java:64)
while locating io.airlift.http.server.HttpServer
at org.weakref.jmx.guice.GuiceMBeanExporter.(GuiceMBeanExporter.java:34)
at org.weakref.jmx.guice.MBeanModule.configure(MBeanModule.java:38)
while locating org.weakref.jmx.guice.GuiceMBeanExporter
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:151)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:42)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1047)
at org.weakref.jmx.guice.GuiceMBeanExporter.export(GuiceMBeanExporter.java:73)
at org.weakref.jmx.guice.GuiceMBeanExporter.(GuiceMBeanExporter.java:35)
at org.weakref.jmx.guice.GuiceMBeanExporter$$FastClassByGuice$$6cc63b28.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:242)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:111)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:63)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:384)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at io.airlift.http.server.HttpServer.start(HttpServer.java:381)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:147)
… 37 more

2 errors
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Error in custom provider, java.lang.RuntimeException: java.net.BindException: Address already in use
while locating io.airlift.http.server.HttpServerProvider
at io.airlift.http.server.HttpServerModule.configure(HttpServerModule.java:64)
while locating io.airlift.http.server.HttpServer
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:151)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:42)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:242)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:111)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:63)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:384)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at io.airlift.http.server.HttpServer.start(HttpServer.java:381)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:147)
… 20 more

2) Error in custom provider, java.lang.RuntimeException: java.net.BindException: Address already in use
while locating io.airlift.http.server.HttpServerProvider
at io.airlift.http.server.HttpServerModule.configure(HttpServerModule.java:64)
while locating io.airlift.http.server.HttpServer
at org.weakref.jmx.guice.GuiceMBeanExporter.(GuiceMBeanExporter.java:34)
at org.weakref.jmx.guice.MBeanModule.configure(MBeanModule.java:38)
while locating org.weakref.jmx.guice.GuiceMBeanExporter
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:151)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:42)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1047)
at org.weakref.jmx.guice.GuiceMBeanExporter.export(GuiceMBeanExporter.java:73)
at org.weakref.jmx.guice.GuiceMBeanExporter.(GuiceMBeanExporter.java:35)
at org.weakref.jmx.guice.GuiceMBeanExporter$$FastClassByGuice$$6cc63b28.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:242)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:111)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:63)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:326)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:244)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:384)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at io.airlift.http.server.HttpServer.start(HttpServer.java:381)
at io.airlift.http.server.HttpServerProvider.get(HttpServerProvider.java:147)
… 37 more

2 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:242)
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:111)
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:63)

What should you do?

Solution
You may be able to ignore them. You can proceed to start the Presto CLI. We recommend using the latest version of Presto however; using the latest version may prevent the above error messages.