来自未使用端口的jetty的BindException

时间:2015-07-20 14:47:41

标签: java gradle jetty gretty

tl; dr:BindException,检查netstat并且没有任何正在运行gretty被告知要抓取的任何端口。我在FreeBSD上,如果这有任何区别,并且stock插件绑定好,但不能做websockets。

我有一个由gradle构建的Spring应用程序(唯一的原因是我使用Gretty是因为我需要websockets,默认插件中的Jetty版本看起来很古老),我的appserver gradle文件看起来像来自gretty config docs的通用

apply plugin: 'war'
apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin'

gretty{
    port = 8080
    contextPath = '/app'
    servletContainer = 'jetty8'
}

主build.gradle文件非常标准,几乎只是声明我的依赖

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'scala'

group = 'com.app'
version = '1.0-SNAPSHOT'

description = """app"""

sourceCompatibility = '1.7'
targetCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'org.liquibase:liquibase-gradle-plugin:1.+'
        classpath 'mysql:mysql-connector-java:5.1.+'
    }
}


repositories {
    maven{
        url "http://repo.spring.io/release"
    }
    maven{
        url "http://repo.spring.io/milestone"
    }
    mavenLocal()
    mavenCentral()
}
dependencies {
    compile group: 'org.springframework', name: 'spring-webmvc', version:'4.1.+'
    compile group: 'org.thymeleaf', name: 'thymeleaf-spring4', version:'2.1.+'
    compile group: 'org.springframework.security', name: 'spring-security-web', version:'4.0.+'
    compile group: 'org.springframework.security', name: 'spring-security-messaging', version:'4.0.+'
    compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity4', version:'2.1.+'
    compile group: 'org.springframework.security', name: 'spring-security-config', version:'4.0.+'
    compile group: 'org.hibernate', name: 'hibernate-entitymanager', version:'4.3.+'
    compile group: 'org.springframework.data', name: 'spring-data-commons', version:'1.10.+'
    compile group: 'org.springframework.data', name: 'spring-data-jpa', version:'1.8.+'
    compile group: 'org.springframework', name: 'spring-messaging', version: '4.1.+'
    compile group: 'org.springframework', name: 'spring-websocket', version: '4.1.+'
    compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.+'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.5.+'
    compile 'org.scala-lang:scala-library:2.11.+'
    testCompile group: 'junit', name: 'junit', version:'4.10'
    testCompile group: 'org.mockito', name: 'mockito-core', version:'2.0.+'
    testCompile group: 'org.springframework', name: 'spring-test', version:'4.1.+'
    providedCompile group: 'javax', name: 'javaee-web-api', version:'7.0'
}

apply from: 'appserver.gradle'
apply from: 'database.gradle'

数据库gradle文件包含我的Liquibase配置。有什么建议?我检查了一切,对我来说似乎是一个独特的问题。甚至尝试重启没有运气

0 个答案:

没有答案