How to display gupshup.io bot log? - gupshup

getting error while deploying bot api.
Suppressed: java.lang.RuntimeException: Error scanning entry
com/amazonaws/services/s3/transfer/internal/TransferStateChangeListener.class
from jar
file:///C:/Users/Admin/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.125/aws-java-sdk-s3-1.11.125.jar
at
org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
... 6 more Caused by: java.util.zip.ZipException: invalid LOC
header (bad signature) at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60) at
java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) at
java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
at
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.io.FilterInputStream.read(FilterInputStream.java:133) at
java.io.FilterInputStream.read(FilterInputStream.java:133) at
org.objectweb.asm.ClassReader.a(Unknown Source) at
org.objectweb.asm.ClassReader.(Unknown Source) at
org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
at
org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
at
org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
... 6 more Suppressed: java.lang.RuntimeException: Error scanning
entry com/amazonaws/services/s3/transfer/internal/CopyMonitor.class
from jar
file:///C:/Users/Admin/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.125/aws-java-sdk-s3-1.11.125.jar
at
org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
... 6 more Caused by: java.util.zip.ZipException: invalid LOC
header (bad signature) at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60) at
java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) at
java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
at
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.io.FilterInputStream.read(FilterInputStream.java:133) at
java.io.FilterInputStream.read(FilterInputStream.java:133) at
org.objectweb.asm.ClassReader.a(Unknown Source) at
org.objectweb.asm.ClassReader.(Unknown Source) at
org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
at
org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
at
org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
... 6 more Suppressed: java.lang.RuntimeException: Error scanning
entry
com/amazonaws/services/s3/transfer/internal/MultipleFileTransferMonitor$1.class
from jar
file:///C:/Users/Admin/.m2/repository/com/amazonaws/aws-java-sdk-s3/1.11.125/aws-java-sdk-s3-1.11.125.jar
at
org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
... 6 more Caused by: java.util.zip.ZipException: invalid LOC
header (bad signature) at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60) at
java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717) at
java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
at
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.io.FilterInputStream.read(FilterInputStream.java:133) at
java.io.FilterInputStream.read(FilterInputStream.java:133) at
org.objectweb.asm.ClassReader.a(Unknown Source) at
org.objectweb.asm.ClassReader.(Unknown Source) at
org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
at
org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
at
org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
... 6 more

Here are few clarifications:
These logs are not related to Bot. Bot logs can be seen in the console while running the bot locally (no log file is created, you can ask for the feature here) and in the logs tab for the bot on Gupshup after deployment.
The exception you are seeing in the console is the Runtime Exception. As not mentioned specifically I assume you are running the bot's deploy goal as mvn gsbot:deploy.
The invalid LOC header (bad signature) exception may occur when there are any corrupted jar files in the local maven repository. You can find all the corrupted jars using following:
find ${USER_HOME}/.m2/repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid
Then remove all the corrupted jars and update or forcefully update the maven project.

Related

Jenkins error Unable to produce a script file

I am getting the following error while trying to build an application.
It worked properly from long time, recently it stopped the build process and throws the error. The configuration of the build uses slave node, In google many suggested that the issue may related to the Java version issues in slave node and the selected version in jenkings configuration section.
FATAL: Unable to produce a script file
hudson.util.IOException2: Failed to create a temp file on
/scratch/jenkins/workspace/
at hudson.FilePath.createTextTempFile(FilePath.java:1223)
at hudson.tasks.CommandInterpreter.createScriptFile(CommandInterpreter.java:115)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:75)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:60)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
at hudson.model.Run.execute(Run.java:1593)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Caused by: hudson.util.IOException2: remote file operation failed:
/scratch/jenkins/workspace/ERT_PC_CF7 at
hudson.remoting.Channel#1f9efe8:build- linux-1
at hudson.FilePath.act(FilePath.java:901)
at hudson.FilePath.act(FilePath.java:878)
at hudson.FilePath.createTextTempFile(FilePath.java:1200)
... 12 more
Caused by: hudson.util.IOException2: Failed to create a temporary directory in /tmp
at hudson.FilePath$14.invoke(FilePath.java:1212)
at hudson.FilePath$14.invoke(FilePath.java:1200)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2393)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.io.IOException: Read-only file system
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1717)
at java.io.File.createTempFile0(File.java:1738)
at java.io.File.createTempFile(File.java:1815)
at hudson.FilePath$14.invoke(FilePath.java:1210)
This is not a permission issue. The issue has been resolved by rebooting the slave nodes as the whole file system in slave node went into read mode, even the root user gets exception with touch command on the directory /scratch/jenkins/workspace/ .

After installation of github plugin into jenkins, restart not responding and showing errors

Even I remove the github plugin from jenkins not working. which is running under the tomcat7 server.
hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read /usr/share/tomcat7/.jenkins/config.xml
at hudson.WebAppMain$3.run(WebAppMain.java:237)
Caused by: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read /usr/share/tomcat7/.jenkins/config.xml
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:914)
at jenkins.model.Jenkins.<init>(Jenkins.java:813)
at hudson.model.Hudson.<init>(Hudson.java:83)
at hudson.model.Hudson.<init>(Hudson.java:79)
at hudson.WebAppMain$3.run(WebAppMain.java:225)
Caused by: java.io.IOException: Unable to read /usr/share/tomcat7/.jenkins/config.xml
at hudson.XmlFile.unmarshal(XmlFile.java:165)
at jenkins.model.Jenkins$16.run(Jenkins.java:2642)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:903)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
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)
If you see a Java stack trace, you can usually find what the problem is by looking at the "Caused by:" line. Here is yours:
Caused by: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read /usr/share/tomcat7/.jenkins/config.xml
Jenkins is unable to read its configuration file. This could be due to one of:
The file doesn't exist
The file isn't readable by the user that runs the Jenkins process (note that it needs to be writable as well)
The JENKINS_HOME environment variable isn't set correctly for the user that runs the Jenkins process

Unable to close store neostore.nodestore.db

I've got a problem starting my Neo4J 2.0.0-M05 embedded instance with an empty graph.db folder.
If i try to do I get the following exception:
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, D:\workspace_VM\c13shh042\dist\neo4j-M05\data\graph.db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:323)
at org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:100)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:92)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:197)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:69)
at DE.data_experts.profi.util.vwkprotokoll.monitor.ejb.impl.GraphDatabaseManagerImpl.create(GraphDatabaseManagerImpl.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
... 172 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#b29807e' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:504)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:300)
... 187 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#71e7579e' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:504)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
at org.neo4j.kernel.impl.transaction.XaDataSourceManager.start(XaDataSourceManager.java:165)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:498)
... 189 more
Caused by: org.neo4j.kernel.impl.nioneo.store.UnderlyingStorageException: Unable to close store D:\workspace_VM\c13shh042\dist\neo4j-M05\data\graph.db\neostore.nodestore.db
at org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:603)
at org.neo4j.kernel.impl.nioneo.store.StoreFactory.createNodeStore(StoreFactory.java:263)
at org.neo4j.kernel.impl.nioneo.store.StoreFactory.createNeoStore(StoreFactory.java:225)
at org.neo4j.kernel.impl.nioneo.store.StoreFactory.createNeoStore(StoreFactory.java:219)
at org.neo4j.kernel.impl.nioneo.store.StoreFactory.ensureStoreExists(StoreFactory.java:104)
at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.start(NeoStoreXaDataSource.java:282)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:498)
... 192 more
Caused by: java.io.IOException: Der Vorgang ist bei einer Datei mit einem geƶffneten Bereich, der einem Benutzer zugeordnet ist, nicht anwendbar
>> in english: The process is in a file with an open area that is associated with a user, not applicable
at sun.nio.ch.FileDispatcherImpl.truncate0(Native Method)
at sun.nio.ch.FileDispatcherImpl.truncate(FileDispatcherImpl.java:92)
at sun.nio.ch.FileChannelImpl.truncate(FileChannelImpl.java:346)
at org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.close(CommonAbstractStore.java:583)
... 198 more
I'm using Windows 7 as host system and Java 1.7.40. I checked if there is a process locking the graph.db folder or whatever, but like Process Explorer says, everything is fine.
Yesterday i was able to start the embedded database and fill it with my migration script, but i used Neo4J 2.0.0M-04 at this time.
Is this probably a bug in the latest release or what can i do to avoid it?
Best regards;
Marcus

Mounting the DEV#cloud Private WebDav Repository fails

I'm using the private repository to store my own custom settings.xml. When i try to use it i get the following log message:
$ /usr/bin/tenant-isolate sudo /opt/jenkins/sbin/mount-webdav https://repository-laures.forge.cloudbees.com/private laures alert
mountpoint: /private/laures: No such file or directory
when my buildjob later wants to access my custom settings.xml i get an exception:
Executing Maven: -B -f /scratch/jenkins/workspace/JacksonLegacyIntrospector/pom.xml -gs /private/laures/settings.xml clean verify site emma:emma
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
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:724)
Caused by: org.apache.maven.cli.MavenExecutionRequestsBuilderException: The specified global settings file does not exist: /private/laures/settings.xml
at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.getMavenExecutionRequest(DefaultMavenExecutionRequestBuilder.java:148)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.getMavenExecutionRequest(Maven3Launcher.java:94)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:77)
... 18 more
Caused by: java.io.FileNotFoundException: The specified global settings file does not exist: /private/laures/settings.xml
at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.settings(DefaultMavenExecutionRequestBuilder.java:414)
at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.getMavenExecutionRequest(DefaultMavenExecutionRequestBuilder.java:126)
... 20 more
I was following the cloudbees guide: https://developer.cloudbees.com/bin/view/DEV/Sharing+Files+with+Build+Executors
Did i do something wrong?
This job is validating pull-requests. A malicious user could hack your build script in a pull request and extract confidential informations from your account.
To prevent this, CloudBees run such a build using tenant-isolate script. This prevent /private to get mounted, this is intentional - but not nicely reported on the web UI.

Proper way to add `test/resources` directory to classpath on test phase

Using Grails 2.2.3
I'm going to keep my test resources in test/resources directory. Want to expand test classpath with it. In BuildConfig.groovy I've added this line:
grailsSettings.testDependencies.add new File("${basedir}/test/resources")
After that grails test-app unit: fails with:
_GrailsClasspath_groovy: 17: unable to resolve class org.codehaus.groovy.grails.compiler.GrailsProjectCompiler
# line 17, column 1.
Exception gone if I'm commenting out this line.
For sure this code worked in Grails 1.3.2
UPDATE 1
Tried to upgrade to Grails 2.2.4. Same problem
UPDATE 2
Here's full stacktrace
| Error Error executing script TestApp: org/codehaus/groovy/grails/compiler/GrailsProjectCompiler (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NoClassDefFoundError: org/codehaus/groovy/grails/compiler/GrailsProjectCompiler
at _GrailsClasspath_groovy.run(_GrailsClasspath_groovy:36)
at _GrailsClasspath_groovy$run.call(Unknown Source)
at _GrailsEvents_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at _GrailsEvents_groovy.run(_GrailsEvents_groovy:32)
at _GrailsEvents_groovy$run.call(Unknown Source)
at _GrailsClean_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at _GrailsClean_groovy.run(_GrailsClean_groovy:29)
at _GrailsClean_groovy$run.call(Unknown Source)
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
at TestApp.run(TestApp.groovy:24)
at TestApp$run.call(Unknown Source)
at gant.Gant.prepareTargets(Gant.groovy:607)
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.grails.compiler.GrailsProjectCompiler
... 17 more
| Error Error executing script TestApp: org/codehaus/groovy/grails/compiler/GrailsProjectCompiler
You can find all build path options in grails.util.BuildSettings class.
I don't found any special folder for test resources.
Try to create /test/resources folder. It should be the same.

Resources