- 浏览: 2542014 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Trouble Shooting on Grails
Last week, I am trying to trouble shooting a grails problem.
When I use the JMETER to put pressure on my local tomcat instance of grails war package.
1. No Signature of method issue
I got this kind of error, Error Message
2013-03-05 16:52:07,017 [http-bio-8080-exec-3] ERROR com.sillycat.xxx.ErrorController - No signature of method: static com.sillycat.xxx.events.GeoFenceExitEvent.save() is applicable for argument types: (java.util.LinkedHashMap) values: [[flush:true]]
Possible solutions: save(), save(java.util.Map), save(java.lang.Boolean), wait(), any(), wait(long)
org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException: No signature of method: static com.sillycat.xxx.events.GeoFenceExitEvent.save() is applicable for argument types: (java.util.LinkedHashMap) values: [[flush:true]]
Possible solutions: save(), save(java.util.Map), save(java.lang.Boolean), wait(), any(), wait(long)
at Skipped non-sillycat elements.(:86)
Caused by: groovy.lang.MissingMethodException: No signature of method: static com.sillycat.xxx.events.GeoFenceExitEvent.save() is applicable for argument types: (java.util.LinkedHashMap) values: [[flush:true]]
Possible solutions: save(), save(java.util.Map), save(java.lang.Boolean), wait(), any(), wait(long)
Solution:
In the groovy class which belongs to the grails framework
grails-app/conf/BootStrap.groovy
Add these statements to the class
// Eager initialize GORM Domain Mixin Methods.
grailsApplication.domainClasses.each { dc ->
//dc.clazz.count() initial the GORM
//dc.clazz.metaClass.mapping = null get rid of all the GROM method mapping
dc.clazz.count()
}
2. Stale Object State Exception
Error Message
2013-03-05 16:26:06,140 [http-bio-8080-exec-35] ERROR com.sillycat.xxx.ErrorController - Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.sillycat.xxx.Device#3015]
org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.sillycat.xxx.Device#3015]
at Skipped non-Sillycat elements.(:86)
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.sillycat.xxx.Device#3015]
at Skipped non-sillycat elements.(:1)
at com.sillycat.xxx.events.EventService.saveEvent(EventService.groovy:93)
at com.sillycat.xxx.events.GeoFenceEntryEventService.super$2$saveEvent(GeoFenceEntryEventService.groovy)
at Skipped non-sillycat elements.(:1)
Solution:
I found the Object which is managed by GROM. I close the version, it is working then.
class Student{
…snip…
static mapping = {
table 'students'
version false
}
}
3. Change the HTTP and HTTPS Configuration
I can change the http server port and https server port easily, but I got errors.
grails.server.port.http/server.port - default 8080
grails.server.port.https - default 8443
https - start an HTTPS Server
I can change the server port as I like
>-Dserver.port.https=443 run-app -https
>-Dserver.port=80 run-app -https
>-Dserver.port=80 -Dserver.port.https=443 run-app -https
Error Messages:
java.net.BindException: Permission denied<null>:443
java.net.BindException: Permission denied<null>:80
Solution:
One option- make tomcat running on the 1-1024 port
https://github.com/Castaglia/MacOSX-authbind
http://java-notes.com/index.php/installing-tomcat-with-http-port-80-on-linux
When I start the run-app, I got these application information:
>ps -ef | grep grails
503 12216 11278 0 11:15AM ?? 1:03.72 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -server -Xmx768M -XX:MaxPermSize=256m -Djline.terminal=jline.UnsupportedTerminal -Dbase.dir=/Users/carl/company/code/localpoint/Localpoint -Dgrails.home=/Users/carl/tool/grails-1.3.7/ -Dfile.encoding=MacRoman -classpath /Users/carl/tool/grails-1.3.7/lib/groovy-all-1.7.8.jar:/Users/carl/tool/grails-1.3.7/dist/grails-bootstrap-1.3.7.jar org.codehaus.groovy.grails.cli.support.GrailsStarter --conf /Users/carl/tool/grails-1.3.7/conf/groovy-starter.conf --main org.codehaus.groovy.grails.cli.GrailsScriptRunner run-app -https
Download the zip file from https://github.com/Castaglia/MacOSX-authbind
I got the file MacOSX-authbind-master.zip and unzip it.
>cd /Users/carl/Downloads/MacOSX-authbind-master
Move this tool to the working directory
>mv MacOSX-authbind-master /Users/carl/tool/authbind
Build that on my MAC
>make
>sudo make install
That is done for the tool authbind.
And then open the monitor 'Activity Monitor', check the User 'carl' is running the Process Name 'Groovy/Grails Tool Suite'.
Authbind is configured with some special files, for which we can assign our arbitrary permissions for the users we want to give access to.
>sudo touch /etc/authbind/byport/80
>sudo chmod 500 /etc/authbind/byport/80
>sudo chown carl /etc/authbind/byport/80
>sudo touch /etc/authbind/byport/443
>sudo chmod 500 /etc/authbind/byport/443
>sudo chown carl /etc/authbind/byport/443
Stop my apache which already take the port 80.
>sudo apachectl stop
>authbind --deep grails -Dserver.port.https=443 -Dserver.port=80 run-app -https
It seems not working. Or a easy way
>su root
>grails -Dserver.port=80 -Dserver.port.https=443 run-app -https
Or maybe download the software named 'LauchAsRoot' and use it.
http://www.macupdate.com/app/mac/38617/launchasroot
References:
http://sillycat.iteye.com/blog/772289
http://sillycat.iteye.com/blog/736723
http://markmail.org/message/o5i3o4f7v3dizhq6
http://grails.org/doc/1.3.7/guide/single.html#5.5.2.7%20Optimistic%20Locking%20and%20Versioning
http://grails.org/doc/2.2.0/ref/Command%20Line/run-app.html
Last week, I am trying to trouble shooting a grails problem.
When I use the JMETER to put pressure on my local tomcat instance of grails war package.
1. No Signature of method issue
I got this kind of error, Error Message
2013-03-05 16:52:07,017 [http-bio-8080-exec-3] ERROR com.sillycat.xxx.ErrorController - No signature of method: static com.sillycat.xxx.events.GeoFenceExitEvent.save() is applicable for argument types: (java.util.LinkedHashMap) values: [[flush:true]]
Possible solutions: save(), save(java.util.Map), save(java.lang.Boolean), wait(), any(), wait(long)
org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException: No signature of method: static com.sillycat.xxx.events.GeoFenceExitEvent.save() is applicable for argument types: (java.util.LinkedHashMap) values: [[flush:true]]
Possible solutions: save(), save(java.util.Map), save(java.lang.Boolean), wait(), any(), wait(long)
at Skipped non-sillycat elements.(:86)
Caused by: groovy.lang.MissingMethodException: No signature of method: static com.sillycat.xxx.events.GeoFenceExitEvent.save() is applicable for argument types: (java.util.LinkedHashMap) values: [[flush:true]]
Possible solutions: save(), save(java.util.Map), save(java.lang.Boolean), wait(), any(), wait(long)
Solution:
In the groovy class which belongs to the grails framework
grails-app/conf/BootStrap.groovy
Add these statements to the class
// Eager initialize GORM Domain Mixin Methods.
grailsApplication.domainClasses.each { dc ->
//dc.clazz.count() initial the GORM
//dc.clazz.metaClass.mapping = null get rid of all the GROM method mapping
dc.clazz.count()
}
2. Stale Object State Exception
Error Message
2013-03-05 16:26:06,140 [http-bio-8080-exec-35] ERROR com.sillycat.xxx.ErrorController - Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.sillycat.xxx.Device#3015]
org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.sillycat.xxx.Device#3015]
at Skipped non-Sillycat elements.(:86)
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.sillycat.xxx.Device#3015]
at Skipped non-sillycat elements.(:1)
at com.sillycat.xxx.events.EventService.saveEvent(EventService.groovy:93)
at com.sillycat.xxx.events.GeoFenceEntryEventService.super$2$saveEvent(GeoFenceEntryEventService.groovy)
at Skipped non-sillycat elements.(:1)
Solution:
I found the Object which is managed by GROM. I close the version, it is working then.
class Student{
…snip…
static mapping = {
table 'students'
version false
}
}
3. Change the HTTP and HTTPS Configuration
I can change the http server port and https server port easily, but I got errors.
grails.server.port.http/server.port - default 8080
grails.server.port.https - default 8443
https - start an HTTPS Server
I can change the server port as I like
>-Dserver.port.https=443 run-app -https
>-Dserver.port=80 run-app -https
>-Dserver.port=80 -Dserver.port.https=443 run-app -https
Error Messages:
java.net.BindException: Permission denied<null>:443
java.net.BindException: Permission denied<null>:80
Solution:
One option- make tomcat running on the 1-1024 port
https://github.com/Castaglia/MacOSX-authbind
http://java-notes.com/index.php/installing-tomcat-with-http-port-80-on-linux
When I start the run-app, I got these application information:
>ps -ef | grep grails
503 12216 11278 0 11:15AM ?? 1:03.72 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -server -Xmx768M -XX:MaxPermSize=256m -Djline.terminal=jline.UnsupportedTerminal -Dbase.dir=/Users/carl/company/code/localpoint/Localpoint -Dgrails.home=/Users/carl/tool/grails-1.3.7/ -Dfile.encoding=MacRoman -classpath /Users/carl/tool/grails-1.3.7/lib/groovy-all-1.7.8.jar:/Users/carl/tool/grails-1.3.7/dist/grails-bootstrap-1.3.7.jar org.codehaus.groovy.grails.cli.support.GrailsStarter --conf /Users/carl/tool/grails-1.3.7/conf/groovy-starter.conf --main org.codehaus.groovy.grails.cli.GrailsScriptRunner run-app -https
Download the zip file from https://github.com/Castaglia/MacOSX-authbind
I got the file MacOSX-authbind-master.zip and unzip it.
>cd /Users/carl/Downloads/MacOSX-authbind-master
Move this tool to the working directory
>mv MacOSX-authbind-master /Users/carl/tool/authbind
Build that on my MAC
>make
>sudo make install
That is done for the tool authbind.
And then open the monitor 'Activity Monitor', check the User 'carl' is running the Process Name 'Groovy/Grails Tool Suite'.
Authbind is configured with some special files, for which we can assign our arbitrary permissions for the users we want to give access to.
>sudo touch /etc/authbind/byport/80
>sudo chmod 500 /etc/authbind/byport/80
>sudo chown carl /etc/authbind/byport/80
>sudo touch /etc/authbind/byport/443
>sudo chmod 500 /etc/authbind/byport/443
>sudo chown carl /etc/authbind/byport/443
Stop my apache which already take the port 80.
>sudo apachectl stop
>authbind --deep grails -Dserver.port.https=443 -Dserver.port=80 run-app -https
It seems not working. Or a easy way
>su root
>grails -Dserver.port=80 -Dserver.port.https=443 run-app -https
Or maybe download the software named 'LauchAsRoot' and use it.
http://www.macupdate.com/app/mac/38617/launchasroot
References:
http://sillycat.iteye.com/blog/772289
http://sillycat.iteye.com/blog/736723
http://markmail.org/message/o5i3o4f7v3dizhq6
http://grails.org/doc/1.3.7/guide/single.html#5.5.2.7%20Optimistic%20Locking%20and%20Versioning
http://grails.org/doc/2.2.0/ref/Command%20Line/run-app.html
发表评论
-
NodeJS12 and Zlib
2020-04-01 07:44 468NodeJS12 and Zlib It works as ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 328Traefik 2020(1)Introduction and ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 376Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 466NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 413Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 330Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 242GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 443GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 320GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 285Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 302Serverless with NodeJS and Tenc ... -
NodeJS MySQL Library and npmjs
2020-02-07 06:21 278NodeJS MySQL Library and npmjs ... -
Python Library 2019(1)requests and aiohttp
2019-12-18 01:12 256Python Library 2019(1)requests ... -
NodeJS Installation 2019
2019-10-20 02:57 565NodeJS Installation 2019 Insta ... -
Monitor Tool 2019(2)Monit on Multiple Instances and Email Alerts
2019-10-18 10:57 256Monitor Tool 2019(2)Monit on Mu ... -
Sqlite Database 2019(1)Sqlite3 Installation and Docker phpsqliteadmin
2019-09-05 11:24 361Sqlite Database 2019(1)Sqlite3 ... -
Supervisor 2019(2)Ubuntu and Multiple Services
2019-08-19 10:53 364Supervisor 2019(2)Ubuntu and Mu ...
相关推荐
HP-UX Trouble shooting 课程的PPT.各版本通用
"7702-010 trouble shooting guide" 指南旨在为技术人员提供一个详尽的框架,帮助他们有效地识别和解决与7702-010相关的各种问题。这个指南可能是针对某个特定的硬件组件、软件系统、网络设备或者是一个特定的技术...
DB Issue Trouble Shooting Guideline 很经典的数据结构资料
Mailrouting Trouble shooting lotus domino 8
### ITM Trouble Shooting #### 简介与问题确定 在IT管理领域,尤其是对于复杂的监控系统如IBM Tivoli Monitoring (ITM),问题诊断是一项关键能力。本文将基于提供的文档概览,深入探讨其中涉及的关键知识点,包括...
西门子双源CT维修手册是西门子公司为其SOMATOM Definition双源CT扫描仪所提供的官方技术文档,用于指导技术人员对CT设备的机架部分进行故障排查。这份手册是专为授权人员使用,涵盖了安全信息、操作指南、故障排除...
try this doc,. it has great detail of MPLS trouble shotting techniques
标题“trouble shooting java performance”直接指出了本书的主题——解决Java性能问题的故障排除方法。作者Erik Ostermueller通过使用开源工具来检测Java应用程序中的反模式,提出了一种可重复的方法来处理基于Java...
当遇到"JBoss JTA configuration trouble shooting"的问题时,开发者通常需要深入理解JTA的工作原理以及如何在JBoss应用服务器中正确配置它。以下是对这个主题的详细讲解: 首先,JTA是一个Java标准,定义了API来...
在进行HANA问题的诊断和性能分析时,需要关注一系列潜在的性能瓶颈和故障原因。本文档将详细介绍HANA 2.0的问题排查方法,同时涉及调优建议,以帮助数据库管理员和开发人员快速定位并解决HANA系统中遇到的各种问题。...
TAS5805M故障排查 TAS5805M是一款音频Codec芯片,由德州仪器(TI)公司生产。该芯片广泛应用于音频设备中,例如音箱、耳机、音频处理器等。然而,在实际应用中,TAS5805M芯片可能会出现一些故障,影响音频设备的...
通过对微软内部文档《AD 活动目录trouble shooting》的学习与分析,我们了解到了关于AD活动目录故障排查的多种方法和技术。这不仅有助于提高IT人员的工作效率,也能帮助企业更好地管理和维护复杂的网络环境。希望...
### Akamai技术故障排查详解 #### 一、引言 Akamai Technologies是一家全球领先的云服务提供商,致力于提供高效、可靠且安全的内容分发网络(CDN)服务。Akamai的技术支持工程师们经常面临各种各样的技术问题,本...
"Trouble-Shooting_Guide"显然是一份详细记录了各种问题解决步骤的文档,旨在帮助用户诊断并修复他们可能遇到的技术问题。这份指南可能是以一种结构化的格式编写的,包括了问题识别、原因分析、解决方案以及预防措施...
【WebLogic Server常见问题TROUBLE_SHOOTING】 WebLogic Server是BEA Systems(现在已被Oracle公司收购)开发的一款企业级Java应用服务器,用于部署和管理Java EE应用程序。本资料主要针对WebLogic Server的常见...
标题中的“RS485_Trouble_Shooting.zip”表明这是一个关于RS485通信协议故障排查的压缩文件,而“RS485 modbus_Trouble_modbus rs485”进一步指出了主题涉及RS485接口下的Modbus通信问题。描述中的“Modbus ...
文档标题提及的是"MAMMOMAT Novation"的故障排查指南,这是一款由Siemens AG生产的数字钼靶机,主要用于乳腺X线摄影检查。该设备在医疗领域中用于早期检测和诊断乳腺疾病,特别是乳腺癌。 维修手册标签表明这份资料...
Brocade Partner ADX Training _Trouble Shooting