Skip to content

Instantly share code, notes, and snippets.

View kohsuke's full-sized avatar
🏠
WFH

Kohsuke Kawaguchi kohsuke

🏠
WFH
View GitHub Profile
@kohsuke
kohsuke / README.md
Last active August 29, 2015 14:20
Mirrorbrain not serving from fallback

With MirrorBrainDebug On, this is an example of successful redirection:

[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] MirrorBrainEngine On, mirror_base '/srv/releases/jenkins/'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] URI: '/plugins/ldap/1.11/ldap.hpi'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] filename: '/srv/releases/jenkins/plugins/ldap/1.11/ldap.hpi'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] clientip: 85.90.76.97
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] Country 'NL', Continent 'EU'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] AS '--', Prefix '--', lat/lng 0.000000,0.000000 state id (null), state '(null)'
[Mon Apr 27 12:35:55 2015] [warn] [client 127.0.0.1] [mod_mirrorbrain] Canonicalized file on disk: /srv/releases/hudson/plugins/ldap/1.11/ldap.hpi
@kohsuke
kohsuke / gist:5e31e36b4e6f78a3ff64
Last active August 29, 2015 14:20
Confluence outage 2015/05/04
"confluence-diff-7075" prio=10 tid=0x00007f817cf8b000 nid=0x7af0 runnable [0x00007f814fbfa000]
java.lang.Thread.State: RUNNABLE
at org.apache.commons.jrcs.diff.myers.MyersDiff.buildPath(MyersDiff.java:153)
at org.apache.commons.jrcs.diff.myers.MyersDiff.diff(MyersDiff.java:93)
at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:197)
at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:185)
at org.apache.commons.jrcs.diff.Diff.diff(Diff.java:165)
at com.atlassian.confluence.diff.DeltaRanker.getChangeRanking(DeltaRanker.java:27)
at com.atlassian.confluence.diff.LineRanker.getIndexOfSmallestChange(LineRanker.java:30)
at com.atlassian.confluence.diff.LineLevelDiffer.getChunksForChangedLines(LineLevelDiffer.java:215)
@kohsuke
kohsuke / CGit
Created May 21, 2015 23:17
Failure mode
Started by user anonymous
Building in workspace /files/kohsuke/ws/jenkins/git-plugin/work/workspace/error
Fetching changes from the remote Git repository
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.com/cloudbees/jce.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:737)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:985)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1018)
at hudson.scm.SCM.checkout(SCM.java:488)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1253)
java.io.IOException: Error parsing created date '2015-07-09 04:05:32.457763736 +0000 UTC' for object '45684afd47d0e02280322a14945094afb2610de9c41b933168a79700bfdbc30e'.
at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getCreatedDate(DockerClient.java:169)
at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerRecord(DockerClient.java:263)
at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:138)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:136)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:98)
at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:105)
testPerform(org.jvnet.hudson.test.SleepBuilderTest) Time elapsed: 25.455 sec <<< ERROR!
com.gargoylesoftware.htmlunit.ScriptException: ReferenceError: "findAncestorClass" is not defined. (http://localhost:51213/jenkins/adjuncts/a1646fe4/lib/form/radioBlock/radioBlock.js#56)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3652)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3630)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3715)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1759)
at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getNameFunctionAndThis(ScriptRuntime.java:2137)
at script.(http://localhost:51213/jenkins/adjuncts/a1646fe4/lib/form/radioBlock/radioBlock.js:56)
at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:879)
at net.sourceforge.htmlunit.corejs.javascrip
public
-------------------------------------------------------------------------------
Test set: com.cloudbees.groovy.cps.CpsTransformerTest
-------------------------------------------------------------------------------
Tests run: 49, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 3.663 sec <<< FAILURE!
each(com.cloudbees.groovy.cps.CpsTransformerTest) Time elapsed: 0.027 sec <<< FAILURE!
Assertion failed:
assert resultInCps==sh.evaluate(script)
| | | | |
0 | | 55
@kohsuke
kohsuke / x
Created February 8, 2009 00:45
CmdUtils.CreateCommand({
name: "javanet",
icon: "http://example.com/example.png",
homepage: "http://ubiquity.dev.java.net/",
author: { name: "Kohsuke Kawaguchi", email: "kk@kohsuke.org"},
license: "MIT license",
description: "java.net scripts",
help: "how to use your command",
takes: {"input": noun_arb_text},
modifiers: {"in": noun_arb_text},
<%
# TODO: define a class with missing method receiver
class Wrapper
def method_missing(name,*args)
"#{name} #{args.inspect}"
end
end
%>
<%= Wrapper.new().foo(:name=>"name", :bar=>5) %>