{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/otter/issues/151","repository_url":"https://api.github.com/repos/alibaba/otter","labels_url":"https://api.github.com/repos/alibaba/otter/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/otter/issues/151/comments","events_url":"https://api.github.com/repos/alibaba/otter/issues/151/events","html_url":"https://github.com/alibaba/otter/issues/151","id":159818624,"number":151,"title":"otter能正常同步，但是过一会channel就会挂起，日志报错表已经存在","user":{"login":"KaimingWan","id":4374015,"avatar_url":"https://avatars.githubusercontent.com/u/4374015?v=3","gravatar_id":"","url":"https://api.github.com/users/KaimingWan","html_url":"https://github.com/KaimingWan","followers_url":"https://api.github.com/users/KaimingWan/followers","following_url":"https://api.github.com/users/KaimingWan/following{/other_user}","gists_url":"https://api.github.com/users/KaimingWan/gists{/gist_id}","starred_url":"https://api.github.com/users/KaimingWan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaimingWan/subscriptions","organizations_url":"https://api.github.com/users/KaimingWan/orgs","repos_url":"https://api.github.com/users/KaimingWan/repos","events_url":"https://api.github.com/users/KaimingWan/events{/privacy}","received_events_url":"https://api.github.com/users/KaimingWan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-12T09:40:08Z","updated_at":"2016-06-17T03:49:24Z","closed_at":null,"body":"web管理界面上能看到如下日志信息：\r\n\r\n\r\n日志异常信息一：\r\n```java\r\npid:1 nid:1 exception:setl:com.alibaba.otter.node.etl.load.exception.LoadException: java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student' already exists\r\nCaused by: java.util.concurrent.ExecutionException: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student' already exists\r\n    at java.util.concurrent.FutureTask.report(FutureTask.java:122)\r\n    at java.util.concurrent.FutureTask.get(FutureTask.java:192)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader.load(DataBatchLoader.java:107)\r\n    at com.alibaba.otter.node.etl.load.loader.OtterLoaderFactory.load(OtterLoaderFactory.java:50)\r\n    at com.alibaba.otter.node.etl.load.LoadTask$1.run(LoadTask.java:85)\r\n    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n    at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n    at java.lang.Thread.run(Thread.java:745)\r\nCaused by: com.alibaba.otter.node.etl.load.exception.LoadException: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student' already exists\r\nCaused by: com.alibaba.otter.node.etl.load.exception.LoadException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student' already exists\r\nCaused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student' already exists\r\n    at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:98)\r\n    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)\r\n    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.doDdl(DbLoadAction.java:357)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction.load(DbLoadAction.java:135)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$FastClassByCGLIB$$d932a4cb.invoke()\r\n    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)\r\n    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:618)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$$EnhancerByCGLIB$$80fd23c2.load()\r\n    at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:198)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DataBatchLoader$2.call(DataBatchLoader.java:189)\r\n    at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n    at java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n    at java.lang.Thread.run(Thread.java:745)\r\nCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'student' already exists\r\n    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)\r\n    at com.mysql.jdbc.Util.handleNewInstance(Util.java:389)\r\n    at com.mysql.jdbc.Util.getInstance(Util.java:372)\r\n    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980)\r\n    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835)\r\n    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771)\r\n    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)\r\n    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)\r\n    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2531)\r\n    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2489)\r\n    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:848)\r\n    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:742)\r\n    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)\r\n    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$1.doInStatement(DbLoadAction.java:365)\r\n    at com.alibaba.otter.node.etl.load.loader.db.DbLoadAction$1.doInStatement(DbLoadAction.java:357)\r\n    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)\r\n    ... 14 more\r\n\r\n```\r\n\r\n日志异常信息二：\r\n```java\r\npid:-1 nid:null exception:cid:1 restart recovery successful for rid:-1\r\n```\r\n\r\n\r\n是什么导致channel会自动挂起？这两个异常是怎么造成的？麻烦看下，谢谢~"},"comment":{"url":"https://api.github.com/repos/alibaba/otter/issues/comments/226674169","html_url":"https://github.com/alibaba/otter/issues/151#issuecomment-226674169","issue_url":"https://api.github.com/repos/alibaba/otter/issues/151","id":226674169,"user":{"login":"KaimingWan","id":4374015,"avatar_url":"https://avatars.githubusercontent.com/u/4374015?v=3","gravatar_id":"","url":"https://api.github.com/users/KaimingWan","html_url":"https://github.com/KaimingWan","followers_url":"https://api.github.com/users/KaimingWan/followers","following_url":"https://api.github.com/users/KaimingWan/following{/other_user}","gists_url":"https://api.github.com/users/KaimingWan/gists{/gist_id}","starred_url":"https://api.github.com/users/KaimingWan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaimingWan/subscriptions","organizations_url":"https://api.github.com/users/KaimingWan/orgs","repos_url":"https://api.github.com/users/KaimingWan/repos","events_url":"https://api.github.com/users/KaimingWan/events{/privacy}","received_events_url":"https://api.github.com/users/KaimingWan/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T03:49:24Z","updated_at":"2016-06-17T03:49:24Z","body":"确实如此，已经解决，十分感谢。看来执行建表的SQL最好做if exists判断"}}
{"actor":{"display_login":"KaimingWan"}}