Re-Installation - New System but old Database

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Re-Installation - New System but old Database

Post by TConnect »

Dear,

in the last days my computer crashed by a CPU or mainboard error but all data stored on HDD were correct. So I got a new copmuter, installed Apache, MySQL on a WinXP system. The install of OpenEMM was successful, I renamed the old database (openemm -> openemm_backup) and installed OpenEMM as a new system. After that I had two databases:

1. openemm (the new one, empty)
2. openemm_backup (the backup, with data)

Both databases where from version 5.5.1

Now I tried to rename the databases, so openemm_backup now named "openemm". Minding it is the same database-struckture but with data inside.

But now I have no login-page. Following the link in "If you want to log into the OpenEMM application on this server right away, please use this link." from the startpage I got HTTP 500 Internal Server Error.

Is there any posibility to transfer the old data into the new database or replace it correctly?

Best regards
Tim
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

The error message 500 of Apache Httpd or Resin does not indicate a database problem, but a problem with the configuration of Apache/Resin. You should check the Apache/Resin log for more information. BTW, did you open port 8080 in your firewall?
Last edited by maschoff on Wed Nov 05, 2008 1:30 pm, edited 1 time in total.
OpenEMM Maintainer
TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Post by TConnect »

My firewall is open, I can see the startpage. Isn't it a problem with OpenEMM? Because Apache runs on port 80, OpenEMM runs on port 8080. For testing I switched off my firewall. Same problems. And: bevore I changed the database-names it worked without any problems... Only changing the database-names indicates this problem.
Regards
TConnect
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Anyway, if OpenEMM can not connect to the database you should see a error page from Resin with a message like

Code: Select all

An error occurred

Cause:	javax.servlet.ServletException: org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0];
A 500 error does not indicate a problem with your database. You should really check your logs for further hints.
OpenEMM Maintainer
TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Post by TConnect »

Yes, I know. But I think, that it should be possible to rename an exactly strucktured database from backup to the real name without an HTTP 500 internal error! Port 8080 will be used by D:\openemm\bin\httpd.exe and not by apache webserver. So the internal error only can be a result of openemm, that gets some problems after renaming the database.

It is a fact that OpenEMM runs correctly after a completly new install. Without errors. After renaming the backup-database to the name "openemm" it does not work. So where gets OpenEMM the problem?

There are some other things:
1. The startpage will be displayed correctly on http://www.mydomain.com:8080
2. I opened an old sent EMail with a redirect-link via OpenEMM displayed like this: http://www.mydomain.com:8080/r.html?uid ... k5xl486bbr
And it works!

Only the link to the login-page does not work:
http://www.mydomain.com:8080/logon.do?action=0

Where are the logfiles of OpenEMM?

Regards
TConnect
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

/home/openemm/var/log
OpenEMM Maintainer
TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Post by TConnect »

Dear ma,

this seems to be a interesting exeption:



[05.11.2008 10:00:00] DEBUG/dbase: DB-Exec failed: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: recv failed

STACKTRACE:

java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1902)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:824)
at org.agnitas.backend.DBase.execQuery(DBase.java:265)
at org.agnitas.backend.DBase.execQuery(DBase.java:282)
at org.agnitas.backend.DBase.simpleQuery(DBase.java:294)
at org.agnitas.backend.RulerImpl.checkDatabaseConnection(RulerImpl.java:130)
at org.agnitas.backend.RulerImpl.kickOff(RulerImpl.java:195)
at org.agnitas.backend.RulerImpl.kickOffSimple(RulerImpl.java:152)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:248)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:90)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)


** END NESTED EXCEPTION **


Is this helpful?

Regards
TConnect
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

To me it looks like the JDBC driver has a problem with MySQL. Do you use the JDBC driver provided with OpenEMM? What version of MySQL do you use?
OpenEMM Maintainer
TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Post by TConnect »

Dear,

I use MySQL 5. Bevore my computer was crashed ist worked fine, a re-install of MySQL was not nessesary, because it was on an other partition. So I installed OpenEMM 5.5.1 and only if I rename the database this error occures. If I use the new (empty) database, OpenEMM works fine!


--------------------------------------

This seems to be another exeption found in core_stdout (interesting: "Cannot find bean: emm.layout"):

[14:35:32.961]OpenrateServlet: init
Hibernate: select company0_.company_id as company1_1_, company0_.creator_company_id as creator2_1_, company0_.shortname as shortname1_, company0_.description as descript4_1_, company0_.xor_key as xor5_1_, company0_.rdir_domain as rdir6_1_, company0_.mailloop_domain as mailloop7_1_, company0_.status as status1_, company0_.mailtracking as mailtrac9_1_ from company_tbl company0_ where company0_.company_id=?
Hibernate: select emmlayout0_.layout_id as layout1_6_, emmlayout0_.company_id as company2_6_, emmlayout0_.header_url as header3_6_, emmlayout0_.footer_url as footer4_6_, emmlayout0_.base_url as base5_6_, emmlayout0_.normal_color as normal6_6_, emmlayout0_.highlight_color as highlight7_6_ from emm_layout_tbl emmlayout0_ where emmlayout0_.company_id=0 and emmlayout0_.layout_id=?
javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "emm.layout" in scope: "request"
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at org.agnitas.web.filter.SerializeRequestFilter.doFilter(SerializeRequestFilter.java:29)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at org.agnitas.web.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:51)
at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:268)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:389)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:507)
at com.caucho.util.ThreadPool.run(ThreadPool.java:433)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "emm.layout" in scope: "request"
at com.caucho.jsp.PageContextImpl.handlePageException(PageContextImpl.java:1114)
at _jsp._logon__jsp._jspService(_logon__jsp.java:289)
at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
at com.caucho.jsp.Page.pageservice(Page.java:570)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:175)
at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:115)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:277)
at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:106)
at org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:113)
at org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
at org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
... 21 more
Caused by: javax.servlet.jsp.JspException: Cannot find bean: "emm.layout" in scope: "request"
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:866)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:233)
at _jsp._logon__jsp._jspService(_logon__jsp.java:91)
... 36 more



----------------------------------------

Regards
TConnect
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

The later error message is just an aftereffect. Right now I am at a loss. Maybe one of our developers has an idea.
OpenEMM Maintainer
TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Post by TConnect »

And? Do your developer have any Idea?
Regards TConnect
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Our suggestion:

1. Rename your database back to the original name

2. Dump it with mysqldump

3. Create a new database openemm

4. Read the dump into database openemm

Make sure that the jdbc.url entry in emm.properties is correct (default: jdbc.url=jdbc:mysql://localhost/openemm)

BTW, how do you rename a MySQL database?
OpenEMM Maintainer
TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Post by TConnect »

Dear Sirs,

the same problem. Executing "setup.bat" correctly and the system works fine. But when I import the openemm_dump.sql via "mysq openemm < mysql_dump.sql" ths login-page breaks down. The current error is:

An error occurred
Cause: javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "emm.layout" in scope: "request"


Any Ideas? I need the working Database today! There is no more time for try and error. If we cannot solve the problems today I have to set the data as "lost" and work with an empty, new database.


Regards
TConnect
TConnect
Posts: 8
Joined: Tue Nov 04, 2008 3:38 pm

Post by TConnect »

Hey,

openEMM seems to rename the row

jdbc.url=jdbc:mysql://localhost/openemm

to

jdbc.url=jdbc:mysql://127.0.0.1/openemm

by itself.

Regards
TConnect
Post Reply