yona-projects / yona

Project Hosting SW
https://yona.io
Apache License 2.0
490 stars 154 forks source link

처음 실행시 테이블 생성 SQL 오류 #3

Closed ZerglingGo closed 8 years ago

ZerglingGo commented 8 years ago
zerglinggo@Yukino:~/yona$ bin/yobi -v
# Executing command line:
java
-Xms1024m
-Xmx1024m
-XX:ReservedCodeCacheSize=128m
-Duser.dir=/home/zerglinggo/yona
-Dyobi.home=/home/zerglinggo/yona
-Dconfig.file=/home/zerglinggo/yona/conf/application.conf
-Dlogger.file=/home/zerglinggo/yona/conf/application-logger.xml
-DapplyEvolutions.default=true
-cp
/home/zerglinggo/yona/lib/yobi.yobi-0.9.0-SNAPSHOT.jar:/home/zerglinggo/yona/lib/org.scala-lang.scala-library-2.10.4.jar:/home/zerglinggo/yona/lib/com.typesafe.play.twirl-api_2.10-1.0.3.jar:/home/zerglinggo/yona/lib/org.apache.commons.commons-lang3-3.1.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/com.typesafe.play.build-link-2.3.6.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-exceptions-2.3.6.jar:/home/zerglinggo/yona/lib/org.javassist.javassist-3.18.2-GA.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-iteratees_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/org.scala-stm.scala-stm_2.10-0.7.jar:/home/zerglinggo/yona/lib/com.typesafe.config-1.2.1.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-json_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-functional_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-datacommons_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/joda-time.joda-time-2.3.jar:/home/zerglinggo/yona/lib/org.joda.joda-convert-1.6.jar:/home/zerglinggo/yona/lib/com.fasterxml.jackson.core.jackson-annotations-2.3.2.jar:/home/zerglinggo/yona/lib/com.fasterxml.jackson.core.jackson-core-2.3.2.jar:/home/zerglinggo/yona/lib/com.fasterxml.jackson.core.jackson-databind-2.3.2.jar:/home/zerglinggo/yona/lib/org.scala-lang.scala-reflect-2.10.4.jar:/home/zerglinggo/yona/lib/io.netty.netty-3.9.3.Final.jar:/home/zerglinggo/yona/lib/com.typesafe.netty.netty-http-pipelining-1.1.2.jar:/home/zerglinggo/yona/lib/org.slf4j.slf4j-api-1.7.6.jar:/home/zerglinggo/yona/lib/org.slf4j.jul-to-slf4j-1.7.6.jar:/home/zerglinggo/yona/lib/org.slf4j.jcl-over-slf4j-1.7.6.jar:/home/zerglinggo/yona/lib/ch.qos.logback.logback-core-1.1.1.jar:/home/zerglinggo/yona/lib/ch.qos.logback.logback-classic-1.1.1.jar:/home/zerglinggo/yona/lib/com.typesafe.akka.akka-actor_2.10-2.3.4.jar:/home/zerglinggo/yona/lib/com.typesafe.akka.akka-slf4j_2.10-2.3.4.jar:/home/zerglinggo/yona/lib/commons-codec.commons-codec-1.9.jar:/home/zerglinggo/yona/lib/xerces.xercesImpl-2.11.0.jar:/home/zerglinggo/yona/lib/xml-apis.xml-apis-1.4.01.jar:/home/zerglinggo/yona/lib/javax.transaction.jta-1.1.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-java_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/org.yaml.snakeyaml-1.13.jar:/home/zerglinggo/yona/lib/org.hibernate.hibernate-validator-5.0.3.Final.jar:/home/zerglinggo/yona/lib/javax.validation.validation-api-1.1.0.Final.jar:/home/zerglinggo/yona/lib/org.jboss.logging.jboss-logging-3.1.1.GA.jar:/home/zerglinggo/yona/lib/com.fasterxml.classmate-1.0.0.jar:/home/zerglinggo/yona/lib/org.springframework.spring-context-4.0.3.RELEASE.jar:/home/zerglinggo/yona/lib/org.springframework.spring-core-4.0.3.RELEASE.jar:/home/zerglinggo/yona/lib/org.springframework.spring-beans-4.0.3.RELEASE.jar:/home/zerglinggo/yona/lib/org.reflections.reflections-0.9.8.jar:/home/zerglinggo/yona/lib/com.google.guava.guava-18.0.jar:/home/zerglinggo/yona/lib/dom4j.dom4j-1.6.1.jar:/home/zerglinggo/yona/lib/com.google.code.findbugs.jsr305-2.0.3.jar:/home/zerglinggo/yona/lib/org.apache.tomcat.tomcat-servlet-api-8.0.5.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-java-jdbc_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-jdbc_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/com.jolbox.bonecp-0.8.0.RELEASE.jar:/home/zerglinggo/yona/lib/com.h2database.h2-1.3.176.jar:/home/zerglinggo/yona/lib/tyrex.tyrex-1.0.1.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-java-ebean_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/org.avaje.ebeanorm.avaje-ebeanorm-3.3.4.jar:/home/zerglinggo/yona/lib/org.avaje.ebeanorm.avaje-ebeanorm-agent-3.2.2.jar:/home/zerglinggo/yona/lib/org.hibernate.javax.persistence.hibernate-jpa-2.0-api-1.0.1.Final.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-java-ws_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-ws_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/com.ning.async-http-client-1.8.14.jar:/home/zerglinggo/yona/lib/oauth.signpost.signpost-core-1.2.1.2.jar:/home/zerglinggo/yona/lib/oauth.signpost.signpost-commonshttp4-1.2.1.2.jar:/home/zerglinggo/yona/lib/commons-logging.commons-logging-1.1.1.jar:/home/zerglinggo/yona/lib/com.typesafe.play.play-cache_2.10-2.3.6.jar:/home/zerglinggo/yona/lib/net.sf.ehcache.ehcache-core-2.6.8.jar:/home/zerglinggo/yona/lib/org.eclipse.jgit.org.eclipse.jgit-3.5.3.201412180710-r.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch-0.1.50.jar:/home/zerglinggo/yona/lib/com.googlecode.javaewah.JavaEWAH-0.7.9.jar:/home/zerglinggo/yona/lib/org.apache.httpcomponents.httpclient-4.1.3.jar:/home/zerglinggo/yona/lib/org.apache.httpcomponents.httpcore-4.1.4.jar:/home/zerglinggo/yona/lib/org.eclipse.jgit.org.eclipse.jgit.http.server-3.5.3.201412180710-r.jar:/home/zerglinggo/yona/lib/org.eclipse.jgit.org.eclipse.jgit.java7-3.5.3.201412180710-r.jar:/home/zerglinggo/yona/lib/sonia.svnkit.svnkit-1.8.5-scm2.jar:/home/zerglinggo/yona/lib/net.java.dev.jna.jna-3.5.2.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch.agentproxy.svnkit-trilead-ssh2-0.0.7.jar:/home/zerglinggo/yona/lib/com.trilead.trilead-ssh2-1.0.0-build217.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch.agentproxy.core-0.0.7.jar:/home/zerglinggo/yona/lib/de.regnis.q.sequence.sequence-library-1.0.2.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch.agentproxy.connector-factory-0.0.7.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch.agentproxy.usocket-jna-0.0.7.jar:/home/zerglinggo/yona/lib/net.java.dev.jna.platform-3.5.2.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch.agentproxy.usocket-nc-0.0.7.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch.agentproxy.sshagent-0.0.7.jar:/home/zerglinggo/yona/lib/com.jcraft.jsch.agentproxy.pageant-0.0.7.jar:/home/zerglinggo/yona/lib/org.tmatesoft.sqljet.sqljet-1.1.10.jar:/home/zerglinggo/yona/lib/org.antlr.antlr-runtime-3.4.jar:/home/zerglinggo/yona/lib/sonia.svnkit.svnkit-dav-1.8.5-scm2.jar:/home/zerglinggo/yona/lib/sonia.svnkit.svnkit-javahl16-1.8.5-scm2.jar:/home/zerglinggo/yona/lib/org.apache.subversion.svn-javahl-api-1.8.1.jar:/home/zerglinggo/yona/lib/net.sourceforge.jexcelapi.jxl-2.6.10.jar:/home/zerglinggo/yona/lib/log4j.log4j-1.2.14.jar:/home/zerglinggo/yona/lib/org.apache.shiro.shiro-core-1.2.1.jar:/home/zerglinggo/yona/lib/commons-beanutils.commons-beanutils-1.8.3.jar:/home/zerglinggo/yona/lib/info.schleichardt.play-2-mailplugin_2.10-0.9.1.jar:/home/zerglinggo/yona/lib/org.apache.commons.commons-email-1.3.1.jar:/home/zerglinggo/yona/lib/javax.mail.mail-1.4.5.jar:/home/zerglinggo/yona/lib/javax.activation.activation-1.1.1.jar:/home/zerglinggo/yona/lib/commons-lang.commons-lang-2.6.jar:/home/zerglinggo/yona/lib/org.apache.tika.tika-core-1.2.jar:/home/zerglinggo/yona/lib/commons-io.commons-io-2.4.jar:/home/zerglinggo/yona/lib/org.julienrf.play-jsmessages_2.10-1.6.2.jar:/home/zerglinggo/yona/lib/commons-collections.commons-collections-3.2.1.jar:/home/zerglinggo/yona/lib/org.jsoup.jsoup-1.8.2.jar:/home/zerglinggo/yona/lib/com.googlecode.juniversalchardet.juniversalchardet-1.0.3.jar:/home/zerglinggo/yona/lib/com.github.zafarkhaja.java-semver-0.7.2.jar:/home/zerglinggo/yona/lib/com.googlecode.htmlcompressor.htmlcompressor-1.4.jar:/home/zerglinggo/yona/lib/yobi.yobi-0.9.0-SNAPSHOT-assets.jar:/home/zerglinggo/yona/lib/mariadb-java-client-1.3.4.jar
play.core.server.NettyServer

Play server process ID is 1882
[info] play - database [default] connected at jdbc:mysql://127.0.0.1:3306/zerglinggo
[error] play - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'clob,
date                      timestamp,
num_of_comments           integer,
mi' at line 4
Query is:
create table issue (
id                        bigint not null,
title                     varchar(255),
body                      clob,
date                      timestamp,
num_of_comments           integer,
milestone_id              bigint,
author_id                 bigint,
author_login_id           varchar(255),
author_name               varchar(255),
state                     integer,
project_id                bigint,
assignee_id               bigint,
constraint ck_issue_state check (state in (0,1,2)),
constraint pk_issue primary key (id)) [ERROR:1064, SQLSTATE:42000]
Oops, cannot start the server.
@6p4076af1: Database 'default' is in an inconsistent state!
        at play.api.db.evolutions.Evolutions$.checkEvolutionsState(Evolutions.scala:196)
        at play.api.db.evolutions.Evolutions$.databaseEvolutions(Evolutions.scala:367)
        at play.api.db.evolutions.Evolutions$$anonfun$evolutionScript$2.apply(Evolutions.scala:332)
        at play.api.db.evolutions.Evolutions$$anonfun$evolutionScript$2.apply(Evolutions.scala:330)
        at scala.Option.map(Option.scala:145)
        at play.api.db.evolutions.Evolutions$.evolutionScript(Evolutions.scala:330)
        at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:486)
        at play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:531)
        at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:485)
        at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:483)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at play.api.db.evolutions.EvolutionsPlugin.onStart(Evolutions.scala:483)
        at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
        at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
        at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
        at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
        at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
        at play.api.Play$.start(Play.scala:90)
        at play.core.StaticApplication.<init>(ApplicationProvider.scala:55)
        at play.core.server.NettyServer$.createServer(NettyServer.scala:244)
        at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
        at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
        at scala.Option.map(Option.scala:145)
        at play.core.server.NettyServer$.main(NettyServer.scala:275)
        at play.core.server.NettyServer.main(NettyServer.scala)
zerglinggo@Yukino:~/yona$
MariaDB [(none)]> status
--------------
mysql  Ver 15.1 Distrib 10.1.11-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Connection id:          189
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server:                 MariaDB
Server version:         10.1.11-MariaDB-1~trusty mariadb.org binary distribution
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 41 min 5 sec

Threads: 2  Questions: 2168  Slow queries: 0  Opens: 43  Flush tables: 1  Open tables: 53  Queries per second avg: 0.879
--------------

위와 같이 SQL syntax error가 발생하며 실행이 되질 않습니다. (실행 파일이 yona가 아닌 yobi..)

doortts commented 8 years ago

다시 yona.zip 파일을 download 받아보시겠어요? https://github.com/yona-projects/yona/releases/tag/v1.0.0-beta 에서 받으신것 맞으시죠?

ZerglingGo commented 8 years ago

아 Yobi에서 올라올때 파일변경이 제대로 안됬던 모양이군요.. 죄송합니다

doortts commented 8 years ago

아니에요. Yona쪽 이슈 맞습니다. : ) pre-release 단계라서 아직 v1.0.0 버전 내용 고정이 조금 덜 되어있어서 그렇습니다. 조금전에 다시 update 해 놓았습니다.

doortts commented 8 years ago

@6p4076af1: Database 'default' is in an inconsistent state!

생성하신 DB를 지우시고 다시 한 번 만들어 보시겠어요?

drop database 'zerglinggo';

https://repo.yona.io/yona-projects/yona/post/1

참고해 주세요.

ZerglingGo commented 8 years ago

Yona 관련 테이블 전체 삭제 후 나오는 오류입니다.

zerglinggo@Yukino:~/yona$ bin/yona
Play server process ID is 2970
[info] play - database [default] connected at jdbc:mysql://127.0.0.1:3306/zerglinggo
[error] play - Specified key was too long; max key length is 767 bytes [ERROR:1071, SQLSTATE:42000]
Oops, cannot start the server.
@6p40emhm7: Database 'default' is in an inconsistent state!
        at play.api.db.evolutions.Evolutions$.checkEvolutionsState(Evolutions.scala:196)
        at play.api.db.evolutions.Evolutions$.applyScript(Evolutions.scala:296)
        at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1$$anonfun$apply$1.apply$mcV$sp(Evolutions.scala:496)
        at play.api.db.evolutions.EvolutionsPlugin.withLock(Evolutions.scala:531)
        at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:485)
        at play.api.db.evolutions.EvolutionsPlugin$$anonfun$onStart$1.apply(Evolutions.scala:483)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at play.api.db.evolutions.EvolutionsPlugin.onStart(Evolutions.scala:483)
        at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
        at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:91)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:91)
        at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
        at play.api.Play$$anonfun$start$1.apply(Play.scala:91)
        at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
        at play.api.Play$.start(Play.scala:90)
        at play.core.StaticApplication.<init>(ApplicationProvider.scala:55)
        at play.core.server.NettyServer$.createServer(NettyServer.scala:244)
        at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
        at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
        at scala.Option.map(Option.scala:145)
        at play.core.server.NettyServer$.main(NettyServer.scala:275)
        at play.core.server.NettyServer.main(NettyServer.scala)
doortts commented 8 years ago

utf8mb4 확장을 사용해서 발생하는 문제입니다.

mysql -uroot 로 접속하셔서

set global innodb_file_format = BARRACUDA;
set global innodb_large_prefix = ON;

실행 후 다시 한 번 해봐주시겠어요?

update: 파일 포맷도 바라쿠다(BARRACUDA)로 변경해 주셔야 합니다.

참고: http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/

ZerglingGo commented 8 years ago

감사합니다. 드디어 서버가 켜졌습니다 그런데 데이터 import시 오류가 발생하네요. 이건 새로운 이슈를 작성하는게 좋을까요?

doortts commented 8 years ago

네 번거로우시겠지만 새 이슈로 작성해 주시겠어요? 최대한 빠르게 응대해 드릴게요! :D