Skip to content

Instantly share code, notes, and snippets.

View markuman's full-sized avatar
🐧
Linux Only - fail fast, move on

Markus Bergholz markuman

🐧
Linux Only - fail fast, move on
  • Lekker Energie GmbH
  • Berlin
View GitHub Profile
ok: [localhost] => (item=ec2_out.instance_ids) => {
"ec2_out.instance_ids": [
"i-04388d57318fe2479"
],
"item": "ec2_out.instance_ids"
}
ok: [localhost] => { "<class 'list'>": "VARIABLE IS NOT DEFINED!"}
# funktioniert
- debug: var={{ item }}
with_items:
- ec2_out
TASK [debug] *********************************************************************************************
ok: [localhost] => (item=ec2_out) => {
"ec2_out": {
"changed": true,
# https://developer.scaleway.com/#snapshots-snapshots-post
import requests
import json
token = '...'
header = {'x-auth-token': token,'Content-type': 'application/json'}
serverurl = "https://cp-ams1.scaleway.com/servers"
r = requests.get(serverurl, headers=header)
volume_id = r.json()['servers'][0]['volumes']['0']['id']
stmt = """
set @bla = (select 1);
select @bla;
"""
db.query(stmt)
Traceback (most recent call last):
File "<stdin>", line 1, in <module> File "/Users/markus/git/gitea-user-heatmap/mariasql/__init__.py", line 35, in query cursor.execute(sql) File "/Users/markus/git/gitea-user-heatmap/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/Users/markus/git/gitea-user-heatmap/pymysql/cursors.py", line 328, in _query
conn.query(q)
# java -jar amazon-kinesis-agent-1.1-jar-with-dependencies.jar -L DEBUG -l /tmp/kinesis.log
Exception in thread "main" java.lang.IllegalArgumentException: InputStream cannot be null
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:117)
at com.amazon.kinesis.streaming.agent.Logging.getLog4JConfigurationDocument(Logging.java:160)
at com.amazon.kinesis.streaming.agent.Logging.initialize(Logging.java:122)
at com.amazon.kinesis.streaming.agent.Logging.initialize(Logging.java:115)
at com.amazon.kinesis.streaming.agent.Logging.initialize(Logging.java:109)
at com.amazon.kinesis.streaming.agent.Agent.main(Agent.java:62)
root@b1d7c75522af:/amazon-kinesis-agent/target# git diff
diff --git a/pom.xml b/pom.xml
diff --git a/pom.xml b/pom.xml
index 6a858c2..90e7d36 100644
--- a/pom.xml
+++ b/pom.xml
@@ -192,6 +192,11 @@
<build>
<directory>target</directory>
+ <resources>
+ <resource>
root@cac0346394cc:/mnt/ant_build# CLASSPATH=$(pwd)/lib/
root@cac0346394cc:/mnt/ant_build# echo $CLASSPATH
/mnt/ant_build/lib/
root@cac0346394cc:/mnt/ant_build# java -cp CLASSPATH "com.amazon.kinesis.streaming.agent.Agent"
Error: Could not find or load main class com.amazon.kinesis.streaming.agent.Agent
root@cac0346394cc:/mnt/ant_build# ls
lib private
root@cac0346394cc:/mnt/ant_build# ls private/com/amazon/kinesis/streaming/agent/Agent
Agent$1.class Agent.class
Agent$2.class AgentAWSCredentialsProvider.class
root@cac0346394cc:/mnt/ant_build# find . -name .jar
root@cac0346394cc:/mnt/ant_build# find . -name .jar
root@cac0346394cc:/mnt/ant_build# find . -name *.jar
./lib/AWSKinesisStreamingDataAgent-1.1.jar
root@cac0346394cc:/mnt/ant_build# ls private/com/amazon/kinesis/streaming/agent/
Agent$1.class ByteBufferInputStream.class Logging.class
Agent$2.class ByteBuffers.class config
Agent$3.class Constants.class custom.log4j.xml
Agent$4.class CustomLog4jFallbackErrorHandler.class metrics
Agent.class CustomLog4jFallbackPatterLayout.class package-info.class
[markus@dell addressinfo]$ curl -f "http://127.0.0.1:8000"
curl: (22) The requested URL returned error: 404 Not Found
[markus@dell addressinfo]$ curl -s "http://127.0.0.1:8000" > /dev/null
[markus@dell addressinfo]$ echo $?
0