While looking for timeouts in splunk for an unrelated reason… I noticed the Amazon IP’s above. We normally don’t know the service they represent. I connected to the IP in my browser on port 443, and noticed that of course…
Category: Development
NodeJS, MySQL beacon app
A future post will detail the Android app we built for testing this POC. As always, our goal is to use kinetic learning to drive conversation. In other words, none of this is production ready, it’s simply tools to allow…
DNS server address cached in java?
We found that an old DNS address was used until we restarted the JVM. I need to review the class used to perform this activity.. Test this with a simple class. import java.net.*; public class test { static { java.security.Security.setProperty…
Splunk query to group URI request by first three IP address octets
We needed this to understand the source of a large influx of requests for a given URI pattern. import splunklib.client as client import splunklib.results as results service = client.connect(host=”*******”,port=”8089″,username=”showard”,password=”************”) job = “”” search host=\”cmhlpecomweb*\” sourcetype=access_combined karlie-kloss | eval temp=split(_raw,\”\t\”) |…
Pushing a file to Oracle database to write to database filesystem
import java.sql.*; import java.io.*; public class sendFile { public static void main (String args[]) throws Exception { File file = new File(“a.txt”); FileInputStream fis = new FileInputStream(file); byte[] data = new byte[(int)file.length()]; fis.read(data); fis.close(); String s = new String(data, “UTF-8”);…
Does NodeJS have a socket per connection, even though it is single threaded?
Yes. We start with our express module running our server at port 8080. We show there are no connections… [esb@cmhlcarchapp01 fuse]$ netstat -anp | grep 8080 tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN – [esb@cmhlcarchapp01 fuse]$ …and then run from our…
Using Spring AMQP to post messages to RabbitMQ
The ActiveMQ jar’s come with the AMQP 1.0 protocol, which doesn’t work against a RabbitMQ AMQP version 0.9.1 broker. As such, we use a spring jar to get this to work, thanks to this link. Very simple example of this.…
Simulating SocketTimeoutException
A SocketTimeoutException occurs when a socket object instance has been configured to throw the exception if it receives no data in the prescribed number of milliseconds. The default is 0, which disables the timeout. Reasons you may want to use…
React JS example with web service call
This is a simple example of using React JS to call a web service (simple web page in our example). Of course, a true web service would normally be the source of the data, this is just a simple example…
SQL elapsed time over a small specific time window
This is a great quick script to identify those statements taking the most time over a small time window. It’s a good “911” type script. This will print those statements that have a total elapsed execution time of the percentage…