Skip to content

Instantly share code, notes, and snippets.

View digitician's full-sized avatar

niklas digitician

View GitHub Profile
To enable JMX Monitoring for Kafka broker, please follow below instructions:
Edit kafka-run-class.sh and modify KAFKA_JMX_OPTS variable like below (please replace <> with your Kafka Broker hostname)
KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=<kafka.broker.hostname >-Djava.net.preferIPv4Stack=true"
Add below line in kafka-server-start.sh
export JMX_PORT=${JMX_PORT:-9999}
@digitician
digitician / ab_permissions.sql
Created April 6, 2017 20:49
SQL - Get Flask AppBuilder user permissions
select
u.first_name,
r.name,
vm.name,
p.name
from ab_user u
inner join ab_user_role ur
on
u.id = ur.user_id
inner join ab_role r
@digitician
digitician / gist:29a6317845946c518997
Created August 12, 2015 22:08
fix locales on ubuntu server
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
@digitician
digitician / gist:754e678d86a2790b9fa4
Created July 12, 2015 18:14
Jitsi issue #120 debug log
$ jitsi
java.lang.NoClassDefFoundError: org/xbill/DNS/PacketLogger
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4342)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2147)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2070)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1297)
@digitician
digitician / gist:bae1d5da3b0de64bfdbf
Created July 12, 2015 18:12
Jitsi issue #120 hs_err_pid*.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f565d5114cc, pid=24301, tid=140006708393728
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libgdk-x11-2.0.so.0+0x694cc]
#
@digitician
digitician / gist:4ac788647f65f26d2623
Created July 12, 2015 16:38
Get request count/IP from archived apache logfiles
/var/log/apache2# zcat access.log.*gz|cut -d\ -f1|sort -n|uniq -c|sort -n
1 10.1.0.1
1 10.1.0.2
2 10.1.0.3
2 10.2.0.4
2 10.3.0.5
3 10.3.0.6
4 10.4.0.7
386 127.0.0.1
4394 10.4.0.8