How To Solve Issues Related to Log – Using default proxy for http input and slack/hipchat/pagerduty/webhook actions :

Get an Elasticsearch Check-Up

Check if your ES issues are caused from misconfigured settings
(Free 2 min process)

Check-Up

Last update: Jan-20

Elasticsearch Error Guide In Page Navigation (click to jump) :

Troubleshooting Background – start here to get the full picture       
Related Issues – selected resources on related issues  
Log Context – usefull for experts
About Opster – offering a diffrent approach to troubleshoot Elasticsearch

Check Your Elasticsearch Settings for Painfull Mistakes 


Troubleshooting background

To troubleshoot Elasticsearch log “Using default proxy for http input and slack/hipchat/pagerduty/webhook actions :” it’s important to know common problems related to Elasticsearch concepts: client, plugin. See below-detailed explanations complete with common problems, examples and useful tips.

Elasticsearch Client

What it is

Any application that interfaces with Elasticsearch to index, update or search data, or to monitor and maintain Elasticsearch using various APIs can be considered a client.
It is very important to configure clients properly in order to ensure optimum use of Elasticsearch resources.

Examples

There are many open-source client applications for monitoring, alerting and visualization, such as ElasticHQ, Elastalerts, and Grafana to name a few. On top of Elastic client applications such as filebeat, metricbeat, logstash and kibana that have all been designed to integrate with Elasticsearch.

However it is frequently necessary to create your own client application to interface with Elasticsearch.  Below is a simple example of the python client (taken from the client documentation):

from datetime import datetime
from elasticsearch import Elasticsearch
es = Elasticsearch()

doc = {
    'author': 'Testing',
    'text': 'Elasticsearch: cool. bonsai cool.',
    'timestamp': datetime.now(),
}
res = es.index(index="test-index", doc_type='tweet', id=1, body=doc)
print(res['result'])

res = es.get(index="test-index", doc_type='tweet', id=1)
print(res['_source'])

es.indices.refresh(index="test-index")

res = es.search(index="test-index", body={"query": {"match_all": {}}})
print("Got %d Hits:" % res['hits']['total']['value'])
for hit in res['hits']['hits']:
    print("%(timestamp)s %(author)s: %(text)s" % hit["_source"])

All of the official Elasticsearch clients follow a similar structure, working as light wrappers around the Elasticsearch rest API, so if you are familiar with Elasticsearch query structure it is usually quite straightforward to implement.

Notes and good things to know:

Use official Elasticsearch libraries.

Although it is possible to connect with Elasticsearch using any HTTP method, such as a curl request, the official Elasticsearch libraries have been designed to properly implement connection pooling and keep-alives.   

Official Elasticsearch clients are available for java, javascript, Perl, PHP, python,ruby and .NET, and many other programming languages are supported by community versions.

Keep your Elasticsearch version and client version in sync.

To avoid surprises, always keep your client version in line with the Elasticsearch version you are using.  Always test client with Elasticsearch since even minor version upgrades can cause issues due to dependencies or a need for code changes. 

Load balance across appropriate nodes.

Make sure that the client properly loads balances across all of the appropriate nodes in the cluster.  In small clusters this will normally mean only data nodes (never master nodes), or in larger clusters, all dedicated coordinating nodes (if implemented) .

Ensure that the Elasticsearch application properly handles exceptions.

In the case of Elasticsearch being unable to cope with the volume of requests,  designing a client application to handle this gracefully (eg. through some sort of queueing mechanism) will be better than simply inundating a struggling cluster with repeated requests.

Plugin in Elasticsearch

What it is

Plugins are used to extend the functionality of Elasticsearch. In addition to the core plugins available to you, it is possible to write custom plugins as well. Plugins are generated in a zip format with the mandatory file structure.

Examples:
  • Core Plugins: Xpack for Security and monitoring, Discovery plugins for EC2
  • Adding S3 plugin for storing snapshots on S3
sudo bin/elasticsearch-plugin install repository-s3
  • Adding HDFS plugin for storing snapshots on HDFS
sudo bin/elasticsearch-plugin install repository-hdfs
  • Removing a plugin
sudo bin/elasticsearch-plugin remove repository-hdfs
Notes:
  • Plugins are installed using the Elasticsearch-plugin script, which enables actions such as  listing, removing and installing plugins.
  • Core plugins can be installed simply by providing the name of the plugin to the Elasticsearch-plugin command.
  • You can also download the plugin manually and then install it using the elasticsearch-plugin install command, providing the file name/path of the plugin’s source file.
  • When a plugin is removed, you will need to restart the elasticsearch node(s) in order to complete the removal process.
Common Problems:
  • You need to install the required plugins in your Elasticsearch deployment before moving it to production machines. (as it’s likely your production machines are behind a proxy and it’s very hard to get plugins installed behind a proxy).
  • The same is true when you are going to deploy elasticsearch using Docker images, you will most likely be rebuilding the standard image and including your required plugins in the custom docker build. Make sure the docker build is run on a build machine that is not behind a proxy, otherwise the plugin installation will fail during docker build.

Click here to get to our list of the Most frequent issues caused by Elasticsearch Plugins


To help troubleshoot related issues we have gathered selected Q&A from the community and issues from Github , please review the following for further information :

1. Can Not Start Elasticsearch 5 5 Ser  

     


Log Context

Log ”Using default proxy for http input and slack/hipchat/pagerduty/webhook actions :” classname is HttpClient.java
We have extracted the following from Elasticsearch source code to get an in-depth context :

         String proxyHost = HttpSettings.PROXY_HOST.get(settings);
        Scheme proxyScheme = HttpSettings.PROXY_SCHEME.exists(settings) ?
                Scheme.parse(HttpSettings.PROXY_SCHEME.get(settings)) : Scheme.HTTP;
        int proxyPort = HttpSettings.PROXY_PORT.get(settings);
        if (proxyPort != 0 && Strings.hasText(proxyHost)) {
            logger.info("Using default proxy for http input and slack/hipchat/pagerduty/webhook actions [{}:{}]"; proxyHost; proxyPort);
        } else if (proxyPort != 0 ^ Strings.hasText(proxyHost)) {
            throw new IllegalArgumentException("HTTP proxy requires both settings: [" + HttpSettings.PROXY_HOST.getKey() + "] and [" +
                    HttpSettings.PROXY_PORT.getKey() + "]");
        }







About Opster

Incorporating deep knowledge and broad history of Elasticsearch issues. Opster’s solution identifies and predicts root causes of Elasticsearch problems, provides recommendations and can automatically perform various actions to manage, troubleshoot and prevent issues

Learn more: Glossary | Blog| Troubleshooting guides | Error Repository

Need help with any Elasticsearch issue ? Contact Opster

Did this page help you?