Welcome Guest. Sign in or Signup

12 Answers

Errors During Server Migration

Asked by: JasonB 1045 views Installation

We’re going through a server migration and are running into some issues. In the setup_log I’m receiving the following error:

message from server: “Host ‘xxx.xxx.xxx’ is not allowed to connect to this MySQL server”

We have version 1.0.9018 of advertpro and are moving from MySQL 4 to MySQL 5 in addition to moving to a new server. I have backed up and restored the advertpro db using the MySQL Administrator tool. ANy help would be appreciated.

-Jason

12 Answers



  1. renegade_mike on Dec 06, 2007

    The version of AdvertPRO you have is not compatible with MySQL 5. You need to upgrade your current installation to convert the database to be MySQL 5 compatible before migrating it. The latest version can be downloaded from here:

    https://services.renegadeinternet.com/download

    You also need to upgrade to MySQL Connector/J 5.0, which can be downloaded here:

    http://dev.mysql.com/downloads/connector/j/5.0.html

    To install it, delete the mysql.jar file from ~/tomcat/common/lib and replace it with the new mysql-connector-java--bin.jar file.

    As for the access error, it sounds like you aren’t granting the MySQL user permission from the correct host.

    GRANT ALL PRIVILIGES TO advertpro.* to advertpro@"localhost.localdomain" IDENTIFIED BY 'password';<br />GRANT ALL PRIVILIGES TO advertpro.* to advertpro@localhost IDENTIFIED BY 'password';<br />FLUSH PRIVILIGES;

    Try that and if needed substitute the IP address for the hostname.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  2. JasonB on Dec 08, 2007

    I’ve upgraded and replaced the connector now I’m receiving this error in my locahost Tomcat log:

    Dec 7, 2007 4:17:50 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet com.renegade.advertpro.servlet.view.banner.javascript.ViewBannerJavaScriptZoneServlet threw exception
    java.lang.IllegalArgumentException: name cannot be null or zero-length
    at com.renegade.servlet.http.CookieUtility.getCookie(CookieUtility.java:55)
    at com.renegade.advertpro.servlet.filter.HistoryFilterUtility.bind(HistoryFilterUtility.java:49)
    at com.renegade.advertpro.servlet.filter.HistoryFilter.doFilter(HistoryFilter.java:93)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.renegade.advertpro.servlet.filter.P3PFilter.doFilter(P3PFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.renegade.advertpro.servlet.filter.NoCacheFilter.doFilter(NoCacheFilter.java:72)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at com.renegade.advertpro.servlet.filter.CharsetFilter.doFilter(CharsetFilter.java:78)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Unknown Source)

    Any ideas?

    Thanks,

    -Jason

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  3. renegade_mike on Dec 08, 2007

    Are there any records in the ‘configuration’ table in the AdvertPRO database?

    What do you get back if you run this SQL query:

    <br />SELECT * FROM configuration WHERE name='COOKIE_UUID_NAME';<br />

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  4. JasonB on Dec 10, 2007

    The row returned is below.

    COOKIE_UUID_NAME AVPUID

    Thanks,

    -Jason

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  5. renegade_mike on Dec 10, 2007

    Ok, that confirms the data is in the table. What about if you go to Settings > Expert > Cookies. Does it show AVPUID for the name of the User Identity Cookie there?

    Also, I would go to Maintenance > Diagnostics > Connection Pool. Verify that it shows you have version 5.0 of the Connector/J driver installed. Could be you have another version of the driver in the classpath because I have seen similar problems like this when using an older driver with MySQL 5.0.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  6. JasonB on Dec 10, 2007

    I can’t get into the settings screen I keep getting the attached error during setup.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  7. renegade_mike on Dec 10, 2007

    Ok, you’ve got me confused now. The error message from the locahost Tomcat log is an error from the ad server, so I assumed you were past the setup utility. Is the issue you are having now a problem with your production server or the the new server?

    If it’s on the production server, you should NOT be running the setup utility. Our upgrade instructions can be found here: http://www.advertpro.com/docs/1.0/html/upgrade/windows.html and: http://www.advertpro.com/docs/1.0/html/upgrade/linux.html

    In either case, this should clear and reset the MySQL permissions if AdvertPRO and MySQL run on the same server:

    USE mysql;<br />DELETE FROM db WHERE username='<em>advertpro</em>';<br />DELETE FROM user WHERE username='<em>advertpro</em>';<br />GRANT ALL PRIVILIGES TO <em>advertpro</em>.* to <em>advertpro</em>@"localhost.localdomain" IDENTIFIED BY '<strong><em>password</em></strong>';<br />GRANT ALL PRIVILIGES TO <em>advertpro</em>.* to <em>advertpro</em>@localhost IDENTIFIED BY '<strong><em>password</em></strong>';<br />FLUSH PRIVILIGES;<br />

    Or if they run on different servers:

    USE mysql;<br />DELETE FROM db WHERE username='<em>advertpro</em>';<br />DELETE FROM user WHERE username='<em>advertpro</em>';<br />GRANT ALL PRIVILIGES TO <em>advertpro</em>.* to <em>advertpro</em>@"<strong><em>192.168.1.100</em></strong>" IDENTIFIED BY '<strong><em>password</em></strong>';<br />FLUSH PRIVILIGES;<br />

    Try using % instead of the IP address if you still have issues connecting.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  8. JasonB on Dec 12, 2007

    Thanks for all yoru help so far. And jsut to give you a better idea of our configuration we have 2 load balanced web servers that both need to support advertpro ads. I have gotten advertpro configured successfully on the first server but on the second server I was able to make it to the end of the setup but I’m getting this error in setup_log:

    [Tue Dec 11 17:50:31 EST 2007] [EMERGENCY] java.sql.SQLException: General error message from server: “Table ‘advertpro.geo_us_dma’ doesn’t exist”

    I did go back to the previous version of Advertpro(1.0.9108) running against the MYSQL 4.1 Database. I just want to get it running properly first and then worry about upgrading it later.

    Thanks,
    -Jason

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  9. renegade_mike on Dec 12, 2007

    Thanks for all yoru help so far. And jsut to give you a better idea of our configuration we have 2 load balanced web servers that both need to support advertpro ads.

    This is kind of a problem because AdvertPRO can’t run in a load balanced configuration. We’re working on implementing that capability for a future version. What you have to do now is install AdvertPRO on another server that’s not behind the load balancer.

    I was able to make it to the end of the setup but I’m getting this error in setup_log:

    [Tue Dec 11 17:50:31 EST 2007] [EMERGENCY] java.sql.SQLException: General error message from server: “Table ‘advertpro.geo_us_dma’ doesn’t exist”

    I did go back to the previous version of Advertpro(1.0.9108) running against the MYSQL 4.1 Database. I just want to get it running properly first and then worry about upgrading it later.

    The problem here is that the ‘geo_us_dma’ table doesn’t exist in the new version. I believe that’s the only backwards incompatible change. You could re-create the table by running these MySQL queries:

    ALTER TABLE geo_dma RENAME TO geo_us_dma;<br />ALTER TABLE stats_a_dma RENAME TO stats_a_us_dma;<br />ALTER TABLE stats_c_dma RENAME TO stats_c_us_dma;<br />ALTER TABLE stats_m_dma RENAME TO stats_m_us_dma;<br />ALTER TABLE stats_p_dma RENAME TO stats_p_us_dma;<br />ALTER TABLE stats_dma RENAME TO stats_us_dma;<br />ALTER TABLE stats_z_dma RENAME TO stats_z_us_dma;<br />UPDATE configuration SET name='STATISTICS_LOG_ADVERTISER_US_DMA' WHERE name='STATISTICS_LOG_ADVERTISER_DMA';<br />UPDATE configuration SET name='STATISTICS_LOG_CAMPAIGN_US_DMA' WHERE name='STATISTICS_LOG_CAMPAIGN_DMA';<br />UPDATE configuration SET name='STATISTICS_LOG_MEDIA_US_DMA' WHERE name='STATISTICS_LOG_MEDIA_DMA';<br />UPDATE configuration SET name='STATISTICS_LOG_PUBLISHER_US_DMA' WHERE name='STATISTICS_LOG_PUBLISHER_DMA';<br />UPDATE configuration SET name='STATISTICS_LOG_US_DMA' WHERE name='STATISTICS_LOG_DMA';<br />UPDATE configuration SET name='STATISTICS_LOG_ZONE_US_DMA' WHERE name='STATISTICS_LOG_ZONE_DMA';<br />DELETE FROM geo_us_dma WHERE country='gb';<br />ALTER TABLE geo_us_dma DROP COLUMN country;

    When you upgrade to the new version of AdvertPRO, it will convert those tables back to the new formats again.

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  10. JasonB on Dec 12, 2007

    Getting closer now I have this in the error_log:

    [Wed Dec 12 10:36:14 EST 2007] [EMERGENCY] java.sql.SQLException: Column not found message from server: “Unknown column ‘loop’ in ‘field list’”

    Thanks

    -Jason

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  11. renegade_mike on Dec 12, 2007

    This will fix that one…

    ALTER TABLE media_flash CHANGE looping `loop` enum('true','false') NOT NULL default 'true';

    0 Votes Thumb up 0 Votes Thumb down 0 Votes



  12. JasonB on Dec 12, 2007

    That worked!

    Thanks for all your help!

    -Jason

    0 Votes Thumb up 0 Votes Thumb down 0 Votes