I am using JRuby and I have to deploy on Tomcat. My web app is working fine in the dev envirmonment, with Mongel, but when I deploy on Tomcat I get "We''re sorry, but something went wrong on Tomcat". The problem is that production.log only shows: # Logfile created on Mon Oct 12 12:54:36 +0100 2009-bash-3.00 The file permission and directory are 777. Any idea how I can understand what is the problem.
Hassan Schroeder
2009-Oct-12 16:28 UTC
Re: We''re sorry, but something went wrong on Tomcat
On Mon, Oct 12, 2009 at 9:14 AM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am using JRuby and I have to deploy on Tomcat. My web app is working > fine in the dev envirmonment, with Mongel, but when I deploy on Tomcat > I get "We''re sorry, but something went wrong on Tomcat".? literally, it says "went wrong on Tomcat"??? That''s, erm, strange.> Any idea how I can understand what is the problem.Have you tried running in dev mode on Tomcat? Have you looked at the Tomcat log for the app? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
Sorry, not litterally, it is the tipical Rails error, but it happens on Tomcat, we Rails deployed as WAR. There is nothing in Rails logs, nothing in tomcat log too! I have Tomcat on my PC and I get the same error. But Tomcat in my PC is running stand alone not as development server, I have not idea on how to use Tomcat as server. I have create a simple On Oct 12, 5:28 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Oct 12, 2009 at 9:14 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I am using JRuby and I have to deploy onTomcat. My web app is working > > fine in the dev envirmonment, with Mongel, but when I deploy onTomcat > > I get "We''re sorry, but something went wrong onTomcat". > > ? literally, it says "went wrong onTomcat"??? That''s, erm, strange. > > > Any idea how I can understand what is the problem. > > Have you tried running in dev mode onTomcat? > > Have you looked at theTomcatlog for the app? > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan
Hassan Schroeder
2009-Oct-13 14:23 UTC
Re: We''re sorry, but something went wrong on Tomcat
On Tue, Oct 13, 2009 at 6:33 AM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Sorry, not litterally, it is the tipical Rails error, but it happens > on Tomcat, we Rails deployed as WAR. There is nothing in Rails logs, > nothing in tomcat log too! I have Tomcat on my PC and I get the same > error. But Tomcat in my PC is running stand alone not as development > server, I have not idea on how to use Tomcat as server.OK, then how are you creating the WAR? Regardless, once it''s deployed and expanded, find WEB-INF/web.xml, change production mode to development and restart Tomcat. You should at least get a usable error message then. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
Thanks, for your help. I created a super simple Rails app with generate scaffolding, one table with one column. On tomcat on my Win PC the app is working. On Tomcat on Solaris not. My web.xml is this: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <context-param> <param-name>rails.env</param-name> <param-value>production</param-value> </context-param> <context-param> <param-name>public.root</param-name> <param-value>/</param-value> </context-param> <context-param> <param-name>jruby.max.runtimes</param-name> <param-value>1</param-value> </context-param> <filter> <filter-name>RackFilter</filter-name> <filter-class>org.jruby.rack.RackFilter</filter-class> </filter> <filter-mapping> <filter-name>RackFilter</filter-name> As you can see is in production. I used this tutorial to create the war: http://thenice.tumblr.com/post/133345213/deploying-a-rails-application-in-tomcat-with-jruby-a I used: warble config added: config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"] then: warble Copied the WAR in Tomcat on my PC and and it worked, on Solaris not. The database (on MySql) as GRANT ALL *.* for ''root''@''%'' it should not be a problem. The log of Tomcat: -bash-3.00$ tail /opt/tomcat/logs/catalina.2009-10-13.log 13-Oct-2009 16:57:30 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive test.war 13-Oct-2009 16:58:10 org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 13-Oct-2009 16:58:11 org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 13-Oct-2009 16:58:11 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/80 config=null 13-Oct-2009 16:58:11 org.apache.catalina.startup.Catalina start INFO: Server startup in 42982 ms The log of production.log is empty but has 777 permission. I have zero information to figure out what is going on!!! On Oct 13, 3:23 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Oct 13, 2009 at 6:33 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Sorry, not litterally, it is the tipical Rails error, but it happens > > on Tomcat, we Rails deployed as WAR. There is nothing in Rails logs, > > nothing in tomcat log too! I have Tomcat on my PC and I get the same > > error. But Tomcat in my PC is running stand alone not as development > > server, I have not idea on how to use Tomcat as server. > > OK, then how are you creating the WAR? > > Regardless, once it''s deployed and expanded, find WEB-INF/web.xml, > change production mode to development and restart Tomcat. > > You should at least get a usable error message then. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan
Hassan Schroeder
2009-Oct-13 16:34 UTC
Re: We''re sorry, but something went wrong on Tomcat
On Tue, Oct 13, 2009 at 9:08 AM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I created a super simple Rails app with generate scaffolding, one > table with one column. On tomcat on my Win PC the app is working. On > Tomcat on Solaris not. My web.xml is this:> <context-param> > <param-name>rails.env</param-name> > <param-value>production</param-value> > </context-param>> As you can see is in production.Yes, I can see that. As I said, if you *change it* to development mode and restart Tomcat, you''ll get more information about the problem. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
I changed to development but I cannot see any change, except when I call http://10.3.111.79:8080/test/posts, Tomcat hangs, does not reply. On Oct 13, 5:34 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Oct 13, 2009 at 9:08 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I created a super simple Rails app with generate scaffolding, one > > table with one column. On tomcat on my Win PC the app is working. On > > Tomcat on Solaris not. My web.xml is this: > > <context-param> > > <param-name>rails.env</param-name> > > <param-value>production</param-value> > > </context-param> > > As you can see is in production. > > Yes, I can see that. As I said, if you *change it* to development > mode and restart Tomcat, you''ll get more information about the > problem. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan
Wait wait, I have found this: 13-Oct-2009 18:00:12 org.apache.catalina.startup.HostConfig deployDescriptor SEVERE: Error deploying configuration descriptor ROOT.xml org.xml.sax.SAXParseException: The element type "Context" must be terminated by the matching end-tag "</Context>". at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (AbstractSAXParser.java:1269) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1628) at org.apache.catalina.startup.HostConfig.deployDescriptor (HostConfig.java:586) at org.apache.catalina.startup.HostConfig.deployDescriptors (HostConfig.java:556) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java: 491) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) at org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java:314) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java: 1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java: 443) at org.apache.catalina.core.StandardService.start (StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java: 710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 13-Oct-2009 18:00:12 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive test.war 13-Oct-2009 18:00:53 org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 13-Oct-2009 18:00:53 org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 13-Oct-2009 18:00:54 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/87 config=null 13-Oct-2009 18:00:54 org.apache.catalina.startup.Catalina start INFO: Server startup in 43672 ms On Oct 13, 5:58 pm, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I changed to development but I cannot see any change, except when I > callhttp://10.3.111.79:8080/test/posts, Tomcat hangs, does not reply. > > On Oct 13, 5:34 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On Tue, Oct 13, 2009 at 9:08 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I created a super simple Rails app with generate scaffolding, one > > > table with one column. On tomcat on my Win PC the app is working. On > > > Tomcat on Solaris not. My web.xml is this: > > > <context-param> > > > <param-name>rails.env</param-name> > > > <param-value>production</param-value> > > > </context-param> > > > As you can see is in production. > > > Yes, I can see that. As I said, if you *change it* to development > > mode and restart Tomcat, you''ll get more information about the > > problem. > > > -- > > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > twitter: @hassan
Hassan Schroeder
2009-Oct-13 17:08 UTC
Re: We''re sorry, but something went wrong on Tomcat
On Tue, Oct 13, 2009 at 10:05 AM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Wait wait, I have found this: > > 13-Oct-2009 18:00:12 org.apache.catalina.startup.HostConfig > deployDescriptor > SEVERE: Error deploying configuration descriptor ROOT.xml > org.xml.sax.SAXParseException: The element type "Context" must be > terminated by the matching end-tag "</Context>".There you go. Fix that first. Are you deploying your test WAR as ROOT or as ''test'', as it seemed from your previous mail? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
I am deploying a test. I think I have mess up ROOT.xml few days ago. I will try to have a clean Tomcat, then I will deploy test.war again. Thanks. On Oct 13, 6:08 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Oct 13, 2009 at 10:05 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Wait wait, I have found this: > > > 13-Oct-2009 18:00:12 org.apache.catalina.startup.HostConfig > > deployDescriptor > > SEVERE: Error deploying configuration descriptor ROOT.xml > > org.xml.sax.SAXParseException: The element type "Context" must be > > terminated by the matching end-tag "</Context>". > > There you go. Fix that first. > > Are you deploying your test WAR as ROOT or as ''test'', as it seemed > from your previous mail? > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan
Hassan Schroeder
2009-Oct-13 17:38 UTC
Re: We''re sorry, but something went wrong on Tomcat
On Tue, Oct 13, 2009 at 10:30 AM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am deploying a test. I think I have mess up ROOT.xml few days ago. I > will try to have a clean TomcatGeez, NO. Just FIX the stupid ROOT context file. The error message is telling you exactly what''s wrong. No need to reinstall Tomcat, waste of time. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
Well I have wasted my time by reinstalling Tomcat :-) I cannot see any error in catalina.2009-10-13.log, so the ROOT.xml error is gone. But I still have "We''re sorry, but something went wrong." I changed web.xml to development, but I cannot see any log. I must be a severe error. I have the MySql connector in tomcat/lib directory. I might be that the web app is not able to connect to MySql, which is in another server. On Oct 13, 6:38 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Oct 13, 2009 at 10:30 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I am deploying a test. I think I have mess up ROOT.xml few days ago. I > > will try to have a clean Tomcat > > Geez, NO. Just FIX the stupid ROOT context file. The error message > is telling you exactly what''s wrong. > > No need to reinstall Tomcat, waste of time. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan
Hassan Schroeder
2009-Oct-13 18:02 UTC
Re: We''re sorry, but something went wrong on Tomcat
On Tue, Oct 13, 2009 at 10:56 AM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I cannot see any error in catalina.2009-10-13.log, so the ROOT.xml > error is gone. But I still have "We''re sorry, but something went > wrong." I changed web.xml to development, but I cannot see any log.Did you restart Tomcat after changing to development mode?> must be a severe error. I have the MySql connector in tomcat/lib > directory. I might be that the web app is not able to connect to > MySql, which is in another server.So make sure your database.yml entries for both development and production are correct, and you can connect to the DB manually from the command line using that info. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
The problem is that form that server I cannot connect to the MSql server, so the error is, no DB connection. Ii there a way to test the DB connection of a Rails application? On Oct 13, 7:02 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Oct 13, 2009 at 10:56 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I cannot see any error in catalina.2009-10-13.log, so the ROOT.xml > > error is gone. But I still have "We''re sorry, but something went > > wrong." I changed web.xml to development, but I cannot see any log. > > Did you restartTomcatafter changing to development mode? > > > must be a severe error. I have the MySql connector intomcat/lib > > directory. I might be that the web app is not able to connect to > > MySql, which is in another server. > > So make sure your database.yml entries for both development and > production are correct, and you can connect to the DB manually from > the command line using that info. > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan
srinivasan sakthivel
2009-Oct-19 09:11 UTC
Re: We''re sorry, but something went wrong on Tomcat
Hi First check ur database and then give previliage in ur application. Thanks On Mon, Oct 19, 2009 at 2:36 PM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The problem is that form that server I cannot connect to the MSql > server, so the error is, no DB connection. Ii there a way to test the > DB connection of a Rails application? > > On Oct 13, 7:02 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > On Tue, Oct 13, 2009 at 10:56 AM, rtacconi <rtacc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I cannot see any error in catalina.2009-10-13.log, so the ROOT.xml > > > error is gone. But I still have "We''re sorry, but something went > > > wrong." I changed web.xml to development, but I cannot see any log. > > > > Did you restartTomcatafter changing to development mode? > > > > > must be a severe error. I have the MySql connector intomcat/lib > > > directory. I might be that the web app is not able to connect to > > > MySql, which is in another server. > > > > So make sure your database.yml entries for both development and > > production are correct, and you can connect to the DB manually from > > the command line using that info. > > > > -- > > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > twitter: @hassan > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hassan Schroeder
2009-Oct-19 14:27 UTC
Re: We''re sorry, but something went wrong on Tomcat
On Mon, Oct 19, 2009 at 2:06 AM, rtacconi <rtacconi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The problem is that form that server I cannot connect to the MSql > server, so the error is, no DB connection. Ii there a way to test the > DB connection of a Rails application?Are you saying you can''t connect manually from the command line? Then there''s no way Rails is going to be able to :-) And "can''t connect" because? bad password? username? firewall issue? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan