Skip to content

Instantly share code, notes, and snippets.

View baskaran-md's full-sized avatar
🎯
Focusing

Baskaran Deivasigamani baskaran-md

🎯
Focusing
View GitHub Profile
@baskaran-md
baskaran-md / gist:11203963
Last active August 29, 2015 14:00
Python Encoder [Apigee]
from com.apigee.util import Crypto
authHeader = flow.getVariable("request.formparam.user") + ":" + flow.getVariable("request.formparam.password");
encodedValue = Crypto.base64encode(authHeader);
flow.setVariable("request.header.Authorization", "Basic " + encodedValue);
@baskaran-md
baskaran-md / gist:7d77fa6bdc016bd22d8e
Last active August 29, 2015 14:04
Jenkins Console Log File Parser - To find the time taken by each test module
ts_get_sec()
{
read -r h m s <<< $(echo $1 | tr ':' ' ' )
echo $(((h*60*60)+(m*60)+s))
}
## MAIN GOES HERE ##
LOG_FILE=$1
@baskaran-md
baskaran-md / nginx.conf
Created August 5, 2014 18:18
Nginx Config - Create Delayed Response [nginx.conf]
# Ref - http://wiki.nginx.org/HttpEchoModule
# Sample Request:
# http://localhost/delay.xml?wait={delay_in_seconds}
# Place your response file under /{nginx_data_dir}/html/data/1k.xml
location = delay.xml {
echo_sleep $arg_wait;
echo_location /data/1k.xml;
}
@baskaran-md
baskaran-md / nginx.conf
Created September 2, 2014 20:20
NginX allow POST on static pages.
# ...
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
@baskaran-md
baskaran-md / rsyslog.sh
Last active August 17, 2023 11:42
Install/Update Rsyslog - CentOs
yum install -y wget
wget http://rpms.adiscon.com/v8-stable/rsyslog.repo
mv rsyslog.repo /etc/yum.repos.d/rsyslog.repo
yum info rsyslog --skip-broken
yum install -y rsyslog
rsyslogd -version
@baskaran-md
baskaran-md / rsyslog.conf
Last active August 29, 2015 14:08
Rsyslog Conf
# rsyslog configuration file
# note that most of this config file uses old-style format,
# because it is well-known AND quite suitable for simple cases
# like we have with the default config. For more advanced
# things, RainerScript configuration is suggested.
# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html
#### MODULES ####
@baskaran-md
baskaran-md / elasticsearch.log
Created October 29, 2014 20:13
ElasticSearch Error 1
[2014-10-29 14:50:42,417][DEBUG][action.search.type ] [Raymond Sikorsky] [logstash-2014.10.24][4], node[SIJnLIjXQMegSPwFvcgsTg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@17fa56ce] lastShard [true]
org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution (queue capacity 1000) on org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$4@690efe37
at org.elasticsearch.common.util.concurrent.EsAbortPolicy.rejectedExecution(EsAbortPolicy.java:62)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:293)
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:190)
at org.elasticsearch.action.search.type.TransportS
@baskaran-md
baskaran-md / elasticsearch_startup_error.log
Last active August 29, 2015 14:08
ElasticSearch Startup error
[root@ip-10-74-171-50 bin]# pwd
/mnt/elasticsearch-1.3.4/bin
[root@ip-10-74-171-50 bin]#./elasticsearch
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
@baskaran-md
baskaran-md / elasticsearch.log
Created October 29, 2014 21:34
ElasticSearch Error 2
[2014-10-29 15:10:52,518][DEBUG][action.search.type ] [Chance] [226] Failed to execute fetch phase
[Error: Runtime.getRuntime().exec("./tmp/Acsk1").getInputStream(): Cannot run program "./tmp/Acsk1": java.io.IOException: error=2, No such file or directory]
[Near : {... w InputStreamReader(Runtime.getRuntime().exec("./t ....}]
^
[Line: 1, Column: 114]
at org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:412)
at org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:140)
at org.elasticsearch.common.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:67)
at org.elasticsearch.common.mvel2.ast.ASTNode.optimize(ASTNode.java:159)
at org.elasticsearch.common.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
@baskaran-md
baskaran-md / jenkins.log
Created October 31, 2014 23:30
Jenkins Stack trace
java.io.IOException: Failed to write views
at org.kohsuke.stapler.export.Property.writeTo(Property.java:120)
at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:187)
at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:182)
at org.kohsuke.stapler.export.Model.writeTo(Model.java:154)
at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:267)
at hudson.model.Api.doPython(Api.java:215)
at sun.reflect.GeneratedMethodAccessor1134.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)