Skip to content

Instantly share code, notes, and snippets.

@gehel
gehel / pom.xml
Created March 1, 2017 16:01
upload elasticsearch plugins
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.wikimedia.search</groupId>
<artifactId>upload-plugins</artifactId>
<version>1.0-SNAPSHOT</version>
@gehel
gehel / elasticsearch_unassigne_shards.py
Created September 16, 2016 16:31
Check reason for unassigned shards in elasticsearch
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
import sys
import logging
from tabulate import tabulate
from elasticsearch import Elasticsearch
@gehel
gehel / elasticsearch logs
Created August 9, 2016 09:39
elasticsearch shutdown
[2016-08-05 09:42:23,093][INFO ][node ] [logstash1004] stopping ...
[2016-08-05 09:42:23,253][DEBUG][action.admin.indices.forcemerge] [logstash1004] failed to execute [indices:admin/opti
mize] on node [Y0LDbu-9Qluz9H7z6IapSg]
TransportException[transport stopped, action: indices:admin/optimize[n]]
at org.elasticsearch.transport.TransportService$2.run(TransportService.java:206)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[2016-08-05 09:42:23,253][DEBUG][action.admin.indices.forcemerge] [logstash1004] failed to execute [indices:admin/opti
mize] on node [lYF1WLrRRgmRjTGUViqzZA]
@gehel
gehel / thread dump
Created August 8, 2016 14:14
elasticsearch stuck in shutdown
2016-08-08 09:27:29
Full thread dump OpenJDK 64-Bit Server VM (24.95-b01 mixed mode):
"Attach Listener" daemon prio=10 tid=0x00007f1360003800 nid=0x59f2 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"indices_shutdown[T#5]" daemon prio=10 tid=0x00007f0fec12c000 nid=0x595b waiting on condition [0x00007f13563ab000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00007f13c3581610> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
@gehel
gehel / threaddump elasticsearch
Created August 5, 2016 14:13
elasticsearch refuses to shutdown
2016-08-05 10:29:25
Full thread dump OpenJDK 64-Bit Server VM (24.95-b01 mixed mode):
"elasticsearch[logstash1004][generic][T#583]" daemon prio=10 tid=0x00007fb730086000 nid=0x122f waiting on condition [0x00007f93fbd16000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00007fbb46420588> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
@gehel
gehel / elasticsearch-restart
Created June 29, 2016 10:30
elasticsearch restart
#!/usr/bin/env bash
set -e
es_server_prefix=elastic10
es_server_suffix=.eqiad.wmnet
first_server_index=1
nb_of_servers_in_cluster=47
# used to keep track on which server this script has already been executed
# this enables this script to be mostly idempotent, so that it can be
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<title>pgBadger :: PostgreSQL Log Analyzer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow">
<meta http-equiv="Expires" content="Tue Jun 7 10:41:56 2016">
<meta http-equiv="Generator" content="pgBadger v8.1">
<meta http-equiv="Date" content="Tue Jun 7 10:41:56 2016">
<link rel="shortcut icon" href="data:image/x-icon;base64,
@gehel
gehel / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gehel
gehel / coreos-cloud-config
Last active August 29, 2015 14:18
CoreOS cloud-config
#cloud-config
coreos:
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
ssh_authorized_keys:
- ssh-dss AAAAB3NzaC1kc3MAAACBAO+QrbxbjpslSZujFlOVFB48pLgHhOJ1H/6/n0ZLJLkAXBAR6F4zxwXayCU+tFbgvrW83roGhe8hg8pKIUPO6AF0e7Jn+mbcJiyhCmu0yAWSv4W8yN4oMFU50RlLM3cRi/s66uVGdTV6ltZLs4sECLL97qF7tpLbAS+no6nng0PDAAAAFQDjLUy2qFI7H/FSYbFgnXsIzfohnwAAAIASyDHgoETB/FNQHlFafNuXtBtARwVXdnkBnFLil4OFDRiRxE0L1i7wBrfU/Gj7I3UnNkQVYpRTfDQpOmoLfTb8dFVuNnGLncrHN4kOMHrOA/R99+zWtfmAeActTf6OH4SL3AFf4GYkFwSxW2eGhscjlrhltSCigsdy/SWEKp/+SAAAAIEAw3IRHPhWEe+p6wGFac4SyFZ7a4AgCKdH7cGHPz9eINcgRbzmXB3rcwxajrb6Ygpva6+tW21QamsoAwKC1xMroOnXzZyAbZTiwGmIz05sB9RFR4b4qdHCx6K4GVgHM6Qi9BYhud8BS+OoVpdYjtK2XkBiqUse3zk+bz+Lb8kGatY=
@gehel
gehel / keybase.md
Last active August 29, 2015 14:16
keybase.md

Keybase proof

I hereby claim:

  • I am gehel on github.
  • I am gehel (https://keybase.io/gehel) on keybase.
  • I have a public key whose fingerprint is 5E60 CA01 E2DA 7236 54CA 8650 BA96 E5E3 1510 FD06

To claim this, I am signing this object: