haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.36k stars 1.55k forks source link

[upload]failed open temp file #1850

Closed zhanghqgit closed 7 years ago

zhanghqgit commented 7 years ago

windows 2008 seafile-server-6.0.7

when i upload file through web api and file size bigger than 600kb, it cannot work.

httpclient write some data but not finished ,and then nothing,

i find logs in seafile.log

upload-file.c(1962): [upload] Failed open temp file.

use web ui or desktop client work correctly ,only with web api not work. thanks

zhanghqgit commented 7 years ago
public static String filePost(String url,String token,FilePart fp,StringPart sp) {
        PostMethod method = new PostMethod(url);
        Part[] part = {fp,sp};
        MultipartRequestEntity mre = new MultipartRequestEntity(part,method.getParams());
        method.setRequestEntity(mre);
        method.addRequestHeader("Authorization",token);
        method.addRequestHeader("Accept","application/json; charset=utf-8; indent=4");
         HttpClient client = new HttpClient();

         try {
            client.executeMethod(method);
            if(method.getStatusCode() >= 400){
                 throw new Exception("执行请求报错....<<" + method.getStatusCode() + ">>");
             }
            return method.getResponseBodyAsString();
        } catch (Exception e) {
            e.printStackTrace();
            Email4SelfUtils.errorReport(new Exception("访问url报错: " + url,e),
                    "[貔貅web系统]调用url访问错误报告");
        }

         return null;
    }
zhanghqgit commented 7 years ago
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "POST /seafhttp/upload-api/0d25d6ad-5cdc-443a-8c8a-393b87e22125 HTTP/1.1[\r][\n]"
22:58:21.021 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Adding Host request header
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "Authorization: Token 6d4656cd60441348159aeb78fbca029cf68fe03d[\r][\n]"
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "Accept: application/json; charset=utf-8; indent=4[\r][\n]"
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "Host: seafile.example.com[\r][\n]"
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "Content-Length: 5163[\r][\n]"
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "Content-Type: multipart/form-data; boundary=u6xWVAmfLkifILsWIz5_tiQj5pNWwkAGnyWb3hv[\r][\n]"
22:58:21.021 [main] DEBUG httpclient.wire.header - >> "[\r][\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "--"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "u6xWVAmfLkifILsWIz5_tiQj5pNWwkAGnyWb3hv"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "Content-Disposition: form-data; name="
22:58:21.022 [main] DEBUG httpclient.wire.content - >> """
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "file"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> """
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "; filename="
22:58:21.022 [main] DEBUG httpclient.wire.content - >> """
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "build.gradle"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> """
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "Content-Type: "
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "application/octet-stream"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "; charset="
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "ISO-8859-1"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "Content-Transfer-Encoding: "
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "binary"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "group = "com.xiaojiuwo"[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "version = "2.0"[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "task wrapper(type: Wrapper) {[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "    gradleVersion = '2.8'[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "}[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "buildscript {[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "    ext {[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "        springBootVersion = '1.3.1.RELEASE'[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "    }[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "    repositories {[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "        maven { url 'http://10.3.22.94:8081/nexus/content/groups/public' }[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "        mavenCentral()[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "//        maven { url 'http://maven.oschina.net/content/groups/public/' }[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "    }[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "    dependencies {[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "        classpath('io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE')[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "    }[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "}[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.022 [main] DEBUG httpclient.wire.content - >> "subprojects {[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    repositories {[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        maven { url 'http://10.3.22.94:8081/nexus/content/groups/public' }[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        mavenCentral()[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "//        maven { url 'http://maven.oschina.net/content/groups/public/' }[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        //maven { url 'http://xxx.xxx/content/groups/public/'}[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    }[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    apply plugin: 'java'[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    apply plugin: 'eclipse'[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    apply plugin: 'idea'[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    apply plugin: 'spring-boot'[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    apply plugin: 'io.spring.dependency-management'[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "//apply plugin: "org.sonarqube"[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    configurations {[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        providedRuntime[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        driver[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile.exclude module: "spring-boot-starter-tomcat"[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    }[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    eclipse {[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        classpath {[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "            containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "            containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        }[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    }[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    sourceCompatibility = 1.8[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    targetCompatibility = 1.8[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "    dependencies {[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "//        compile('com.dexcoder:dexcoder-assistants:1.0.0')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('aopalliance:aopalliance:1.0')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('redis.clients:jedis:2.7.3')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-starter')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-starter-aop')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-starter-jdbc')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.mybatis:mybatis:3.2.8')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.mybatis:mybatis-spring:1.2.2')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('com.github.pagehelper:pagehelper:4.2.1')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('com.github.jsqlparser:jsqlparser:0.9.1')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('com.alibaba:druid:1.0.14')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-starter-web')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-starter-jetty')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-starter-actuator')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework:spring-context:4.2.4.RELEASE')[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        compile("org.springframework.boot:spring-boot-starter-amqp") {[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "            exclude module: "commons-logging"[\n]"
22:58:21.023 [main] DEBUG httpclient.wire.content - >> "        }[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-starter-thymeleaf')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile fileTree(dir: 'lib', include: '*.jar')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        //compile('javax.validation:validation-api:1.1.0.Final')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.hibernate:hibernate-validator:5.1.3.Final')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('com.alibaba:fastjson:1.1.41')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.apache.commons:commons-lang3:3.3.2')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('commons-fileupload:commons-fileupload:1.3.1')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.apache.commons:commons-collections4:4.0')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('commons-httpclient:commons-httpclient:3.1')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('com.google.guava:guava:17.0')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        //This jar for the schedule job.[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework:spring-context-support:3.1.3.RELEASE')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.quartz-scheduler:quartz:2.2.1')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.jeecg:easypoi-base:2.1.5')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.jeecg:easypoi-web:2.1.5')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.jeecg:easypoi-annotation:2.1.5')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('xerces:xercesImpl:2.9.1')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.apache.poi:poi-scratchpad:3.9')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('javax.mail:mail:1.5.0-b01')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('javax.mail:javax.mail-api:1.5.4')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        testCompile('org.springframework.boot:spring-boot-starter-test')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        testCompile("junit:junit")[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('junit:junit')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('cglib:cglib:2.2.2')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        [\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "      [\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.zeroturnaround:zt-zip:1.9')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        //Jedis[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.data:spring-data-redis')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframework.boot:spring-boot-autoconfigure')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        //MonogoDB[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile('org.springframe"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "work.boot:spring-boot-starter-data-mongodb')[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        [\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile 'com.qiniu:qiniu-java-sdk:7.2.+'[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        [\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.8'[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile group: 'ch.qos.logback', name: 'logback-access', version: '1.1.8'[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        [\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile group: 'com.github.danielwegener', name: 'logback-kafka-appender', version: '0.1.0'[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '4.8'[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        [\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        compile group: 'jcifs', name: 'jcifs', version: '1.2.6'[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "        [\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "    }[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "}[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\n]"
22:58:21.024 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "--"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "u6xWVAmfLkifILsWIz5_tiQj5pNWwkAGnyWb3hv"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "Content-Disposition: form-data; name="
22:58:21.025 [main] DEBUG httpclient.wire.content - >> """
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "parent_dir"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> """
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "Content-Type: "
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "text/plain"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "; charset="
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "US-ASCII"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "Content-Transfer-Encoding: "
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "8bit"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "%E4%B8%8B%E6%B8%B8%E8%B4%A7%E6%AC%BE%2F2017%E5%B9%B42%E6%9C%88"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "--"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "u6xWVAmfLkifILsWIz5_tiQj5pNWwkAGnyWb3hv"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "--"
22:58:21.025 [main] DEBUG httpclient.wire.content - >> "[\r][\n]"
22:58:21.025 [main] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - Request body sent
22:58:21.026 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 400 Bad Request[\r][\n]"
22:58:21.026 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 400 Bad Request[\r][\n]"
22:58:21.026 [main] DEBUG httpclient.wire.header - << "Server: nginx/1.10.0 (Ubuntu)[\r][\n]"
22:58:21.026 [main] DEBUG httpclient.wire.header - << "Date: Thu, 02 Mar 2017 14:58:21 GMT[\r][\n]"
22:58:21.026 [main] DEBUG httpclient.wire.header - << "Content-Type: application/json; charset=utf-8[\r][\n]"
22:58:21.026 [main] DEBUG httpclient.wire.header - << "Content-Length: 39[\r][\n]"
22:58:21.026 [main] DEBUG httpclient.wire.header - << "Connection: keep-alive[\r][\n]"
22:58:21.026 [main] DEBUG httpclient.wire.header - << "[\r][\n]"
java.lang.Exception: 执行请求报错....<<400>>
    at com.xiaojiuwo.common.utils.HttpUtils.filePost(HttpUtils.java:156)
    at com.xiaojiuwo.common.utils.seafile.SeafileUtil.uploadFile(SeafileUtil.java:265)
    at common.seafile.SeafileUtilsTest.testUploadFile(SeafileUtilsTest.java:32)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
zhanghqgit commented 7 years ago

and nginx error log

2017/03/02 23:21:41 [error] 19014#19014: *172 readv() failed (104: Connection reset by peer) while reading upstream, client: 192.168.1.8, server: seafile.example.com, request: "POST /seafhttp/upload-api/b08055c9-95a5-4700-b936-2aa4f1cd5dd0 HTTP/1.1", upstream: "http://127.0.0.1:8082/upload-api/b08055c9-95a5-4700-b936-2aa4f1cd5dd0", host: "seafile.example.com"
zhanghqgit commented 7 years ago

can anyone help me ? thanks

zhanghqgit commented 7 years ago

I test many times and every Possibility, at last, it's the parent_dir problem . this param can not be Chinese , even i use URLEncoder.encode(str, "UTF-8") to encode it .

andreiperciun commented 7 years ago

I faced same problem on rapberry pi 3 with Seafile server 6.0.8. Several files were uploaded but some did not. As @zhanghqgit pointed files with bigger size were not uploaded. I don't use any Chinese file name, dir names or system settings so it may not be related to encoding stuff.

Thanks!

andreiperciun commented 7 years ago

@zhanghqgit found what is the problem in my case. RPI console was opened during upload and it was throwing errors related to read/write errors on mounted HDD. So I ran fsck to scan and fix disk errors.

After this procedure upload started to work. In your case try to scan the disk and check windows Event Log for possible disk error messages.

It would be great to have a better error message for such cases, or, at least, add possible solutions/problems in seafile documentation.

Thank you!

killing commented 7 years ago

Please post questions to the forum. Github is for bug or feature requests.