FastDFS JAVA socket Address already in use:connect 10C

引用可happyfish100的官方fastdfs-java-client-master的包,用线程去进行压力测试;通过不了,有谁解决过类似的问题?
主类:

 public class FastDFSTestPool {

    public static void main(String[] args) throws IOException, MyException{

        String local_filename = "D:\\smallData.xml";
        FastDFSBean fb = new FastDFSBean();
        fb.setFileName("TestFile");
        fb.setFileExt("xml");
        File file = new File(local_filename);
        fb.setFile(file);

        Resource resource = new FileSystemResource("d:\\fdfs_client.conf");
        File file2 =  resource.getFile();
        String configFile = file2.getAbsolutePath();
        ClientGlobal.init(configFile);

        ExecutorService fixedThreadPool = Executors.newFixedThreadPool(100);
        for (int i = 0; i < 50; i++) {
            fixedThreadPool.execute(new FastdfsThread(fb));
        }

    }

}

线程类:

 public class FastdfsThread implements Runnable {

    private FastDFSBean bean ;

    public FastdfsThread(){
        super();
    }

    public FastdfsThread(FastDFSBean bean1){
        super();
        this.bean = bean1;
    }


    @Override
    public void run() {
        try {
            TrackerServer trackerServer = null;
            StorageServer storageServer = null;

            for (int i = 0; i < 100000; i++) {

                TrackerClient tracker = new TrackerClient();
                trackerServer = tracker.getConnection();

                StorageClient storageClient = new StorageClient(trackerServer, storageServer);
                NameValuePair nvp[] = new NameValuePair[] {
                         new NameValuePair("age", i+""), 
                         new NameValuePair("sex", Thread.currentThread().getName()+i) 
                        };

                byte[] filebtyes = fileToBytes(this.bean.getFile());//bean为file的实体类
                String fileIds[] = storageClient.upload_file(filebtyes, this.bean.getFileExt(), nvp);
                System.out.println("文件数:"+i+"  组名:" + fileIds[0]+"  路径: " + fileIds[1]);

                trackerServer.close();
            }
        } catch (IOException e) {
            e.printStackTrace();
        } catch (MyException e) {
            e.printStackTrace();
        }

    }


        public byte[] fileToBytes(File file) {
        byte[] buffer = null;
        FileInputStream fis = null;
        ByteArrayOutputStream bos = null;
        try {
            fis = new FileInputStream(file);
            bos = new ByteArrayOutputStream();
            byte[] b = new byte[1024];
            int n;
            while ((n = fis.read(b)) != -1) {
                bos.write(b, 0, n);
            }
            buffer = bos.toByteArray();
        } catch (FileNotFoundException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            try {
                if (null != bos) {
                    bos.close();
                }
            } catch (IOException ex) {
                ex.printStackTrace();
            } finally{
                try {
                    if(null!=fis){
                        fis.close();
                    }
                } catch (IOException ex) {
                    ex.printStackTrace();
                }
            }
        }
        return buffer;
    }
}
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Jmeter做压力测试,报错:java.net.BindException: Address already in use: connect

Jmeter做压力测试,报错:java.net.BindException: Address already in use: connect 先是各种搜,修改了注册表的MaxUserPort,修改之后,请求次数可以达到63000左右了,但是依然还是有限制。 有没有什么办法可以突破这个限制,可以不限制这个请求数。 求各位大神指教

Redis出现socket *:6379: bind: Address already in use

虚拟机是Centos,昨天执行 src/redis-server的时候,有出现同样的情况,上网查也不知道为什么,然后我重启了电脑之后居然能用了。今天想用java连接到 redis 服务,但是失败了,上网查,把redis.conf文件的bind 127.0.0.1给注释掉了, 然后就出现了Address already in use。把注释给去掉也不行了。 ![图片说明](https://img-ask.csdn.net/upload/201608/10/1470808672_45931.png)

fastdfs java.net.SocketTimeoutException: connect timed out

在k8s上面部署了fastdfs集群,在本地测试时报错java.net.SocketTimeoutException: connect timed out,因为是在k8s 上面部署的,所以很多解决办法没有用,想问一下大家有没有类似的问题或有没有人知道怎么解决的。 能够成功获取到TrackerServer ,StorageClient,并且配置文件中tracker_server为外网地址 ``` # 报错位置 storageClient.upload_file(byteFile, ext_file, null); ```

关于fastDFS连接不稳定

fastDFS环境已经搭建好了,也能上传图片,但是十分不稳定;当通过postman去模拟上传文件时,虚假机开机时,第一次发送总是失败,报tracker连接失败。之后在次尝试就成功,接着多次发送过后又开始报空指针; 错误代码: connect to server 192.168.2.231:22122 fail java.net.SocketTimeoutException: connect timed out at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) · · . org.csource.common.MyException: getStoreStorage fail, errno code: 0 at org.csource.fastdfs.StorageClient.newWritableStorageConnection(StorageClient.java:1941) at org.csource.fastdfs.StorageClient.do_upload_file(StorageClient.java:703) at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:208)

centos7 Request processing failed; nested exception is com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive

<!doctype html> <html lang="en"> <head> <title>HTTP Status 500 – Internal Server Error</title> <style type="text/css"> h1 { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; font-size: 22px; } h2 { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; font-size: 16px; } h3 { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; font-size: 14px; } body { font-family: Tahoma, Arial, sans-serif; color: black; background-color: white; } b { font-family: Tahoma, Arial, sans-serif; color: white; background-color: #525D76; } p { font-family: Tahoma, Arial, sans-serif; background: white; color: black; font-size: 12px; } a { color: black; } a.name { color: black; } .line { height: 1px; background-color: #525D76; border: none; } </style> </head> <body> <h1>HTTP Status 500 – Internal Server Error</h1> <hr class="line" /> <p><b>Type</b> Exception Report</p> <p><b>Message</b> Request processing failed; nested exception is com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive content</p> <p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request. </p> <p><b>Exception</b></p> <pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive content org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) com.shiwaixiangcun.core.filters.MonkeyCharacterEncodingFilter.doFilterInternal(MonkeyCharacterEncodingFilter.java:29) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) </pre> <p><b>Root Cause</b></p> <pre>com.github.tobato.fastdfs.exception.FdfsIOException: 客户端连接服务端出现了io异常:socket io exception occured while receive content com.github.tobato.fastdfs.proto.AbstractFdfsCommand.execute(AbstractFdfsCommand.java:48) com.github.tobato.fastdfs.conn.ConnectionManager.execute(ConnectionManager.java:71) com.github.tobato.fastdfs.conn.ConnectionManager.executeFdfsCmd(ConnectionManager.java:56) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadThumbImage(DefaultFastFileStorageClient.java:166) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:83) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:65) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.uploadImageAndCrtThumbImage(FastdfsFileServiceImpl.java:69) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.store(FastdfsFileServiceImpl.java:56) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:127) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:139) com.shiwaixiangcun.core.web.controller.UploadFileController.uploadImages(UploadFileController.java:129) com.shiwaixiangcun.core.web.controller.UploadFileController$$FastClassBySpringCGLIB$$752e37e5.invoke(&lt;generated&gt;) org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) com.shiwaixiangcun.core.context.ControllerAspect.around(ControllerAspect.java:99) sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656) com.shiwaixiangcun.core.web.controller.UploadFileController$$EnhancerBySpringCGLIB$$8d35bb21.uploadImages(&lt;generated&gt;) sun.reflect.GeneratedMethodAccessor706.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) com.shiwaixiangcun.core.filters.MonkeyCharacterEncodingFilter.doFilterInternal(MonkeyCharacterEncodingFilter.java:29) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) </pre> <p><b>Root Cause</b></p> <pre>java.net.SocketTimeoutException: Read timed out java.net.SocketInputStream.socketRead0(Native Method) java.net.SocketInputStream.socketRead(SocketInputStream.java:116) java.net.SocketInputStream.read(SocketInputStream.java:171) java.net.SocketInputStream.read(SocketInputStream.java:141) java.net.SocketInputStream.read(SocketInputStream.java:127) com.github.tobato.fastdfs.proto.ProtoHead.createFromInputStream(ProtoHead.java:94) com.github.tobato.fastdfs.proto.AbstractFdfsCommand.receive(AbstractFdfsCommand.java:99) com.github.tobato.fastdfs.proto.AbstractFdfsCommand.execute(AbstractFdfsCommand.java:45) com.github.tobato.fastdfs.conn.ConnectionManager.execute(ConnectionManager.java:71) com.github.tobato.fastdfs.conn.ConnectionManager.executeFdfsCmd(ConnectionManager.java:56) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadThumbImage(DefaultFastFileStorageClient.java:166) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:83) com.github.tobato.fastdfs.service.DefaultFastFileStorageClient.uploadImageAndCrtThumbImage(DefaultFastFileStorageClient.java:65) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.uploadImageAndCrtThumbImage(FastdfsFileServiceImpl.java:69) com.shiwaixiangcun.core.plugin.upload.impl.FastdfsFileServiceImpl.store(FastdfsFileServiceImpl.java:56) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:127) com.shiwaixiangcun.core.plugin.upload.impl.AbstractFileService.tempImageAndCrtThumbImage(AbstractFileService.java:139) com.shiwaixiangcun.core.web.controller.UploadFileController.uploadImages(UploadFileController.java:129) com.shiwaixiangcun.core.web.controller.UploadFileController$$FastClassBySpringCGLIB$$752e37e5.invoke(&lt;generated&gt;) org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) com.shiwaixiangcun.core.context.ControllerAspect.around(ControllerAspect.java:99) sun.reflect.GeneratedMethodAccessor249.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656) com.shiwaixiangcun.core.web.controller.UploadFileController$$EnhancerBySpringCGLIB$$8d35bb21.uploadImages(&lt;generated&gt;) sun.reflect.GeneratedMethodAccessor706.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) javax.servlet.http.HttpServlet.service(HttpServlet.java:661) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) com.shiwaixiangcun.core.filters.MonkeyCharacterEncodingFilter.doFilterInternal(MonkeyCharacterEncodingFilter.java:29) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) </pre> <p><b>Note</b> The full stack trace of the root cause is available in the server logs.</p> <hr class="line" /> <h3>Apache Tomcat/8.5.41</h3> </body> </html> 23000 22122 centos7 端口都开启了一直报错

FastDFS问题,上传连接超时

java代码报错如下: java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at net.mikesu.fastdfs.client.StorageClientImpl.getSocket(StorageClientImpl.java:25) at net.mikesu.fastdfs.client.StorageClientImpl.upload(StorageClientImpl.java:69) at net.mikesu.fastdfs.FastdfsClientImpl.upload(FastdfsClientImpl.java:71) at net.mikesu.fastdfs.FastdfsClientImpl.upload(FastdfsClientImpl.java:274) at net.mikesu.fastdfs.FastdfsClientImpl.upload(FastdfsClientImpl.java:270) at net.mikesu.fastdfs.FastdfsClientTest.testFastdfsClient(FastdfsClientTest.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) FastDFS的storage日志文件报错下如: FastDFS的tracker日志文件和storage的日志文一样的,如下: [2016-02-18 10:52:51] INFO - local_host_ip_count: 2, 127.0.0.1 192.168.254.136 [2016-02-18 10:53:07] INFO - file: tracker_relationship.c, line: 374, selecting leader... [2016-02-18 10:53:08] INFO - file: tracker_relationship.c, line: 392, I am the new tracker leader 192.168.254.136:22122 [2016-02-18 10:54:55] ERROR - file: tracker_nio.c, line: 254, client ip: 192.168.254.1, recv failed, errno: 104, error info: Connection reset by peer [2016-02-18 11:00:01] ERROR - file: tracker_nio.c, line: 254, client ip: 192.168.254.1, recv failed, errno: 104, error info: Connection reset by peer 我想是不是client ip:的问题,因为我的服务器IP为192.168.254.136,但client ip是192.168.254.1,如果是这个问题请大家告诉我一下,在哪里修改。

java发送消息出现java.net.SocketException异常

java.net.SocketException: Software caused connection abort: socket write error这怎么解决????

Linux搭建Fastdfs文件服务器安装nginx问题

/home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:43:2: error: unknown type name ‘FDFSStorePaths’ FDFSStorePaths store_paths; ^ /home/jumper/fastdfs-nginx-module/src//common.c: In function ‘fdfs_load_groups_store_paths’: /home/jumper/fastdfs-nginx-module/src//common.c:123:35: error: request for member ‘paths’ in something not a structure or union group_store_paths[i].store_paths.paths = \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:123:3: error: implicit declaration of function ‘storage_load_paths_from_conf_file_ex’ [-Werror=implicit-function-declaration] group_store_paths[i].store_paths.paths = \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:125:58: error: request for member ‘count’ in something not a structure or union section_name, false, &group_store_paths[i].store_paths.count, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c: In function ‘fdfs_mod_init’: /home/jumper/fastdfs-nginx-module/src//common.c:338:43: error: request for member ‘count’ in something not a structure or union storage_server_port, g_fdfs_store_paths.count); ^ /home/jumper/fastdfs-nginx-module/src//common.c:339:33: error: request for member ‘count’ in something not a structure or union for (i=0; i<g_fdfs_store_paths.count; i++) ^ /home/jumper/fastdfs-nginx-module/src//common.c:343:23: error: request for member ‘paths’ in something not a structure or union g_fdfs_store_paths.paths[i]); ^ /home/jumper/fastdfs-nginx-module/src//common.c:392:48: error: request for member ‘count’ in something not a structure or union for (i=0; i<group_store_paths[k].store_paths.count; i++) ^ /home/jumper/fastdfs-nginx-module/src//common.c:396:38: error: request for member ‘paths’ in something not a structure or union group_store_paths[k].store_paths.paths[i]); ^ /home/jumper/fastdfs-nginx-module/src//common.c:403:16: error: request for member ‘count’ in something not a structure or union store_paths.count, buff); ^ /home/jumper/fastdfs-nginx-module/src//common.c: In function ‘fdfs_http_request_handler’: /home/jumper/fastdfs-nginx-module/src//common.c:556:2: error: unknown type name ‘FDFSStorePaths’ FDFSStorePaths *pStorePaths; ^ /home/jumper/fastdfs-nginx-module/src//common.c:651:15: error: assignment from incompatible pointer type [-Werror] pStorePaths = &g_fdfs_store_paths; ^ /home/jumper/fastdfs-nginx-module/src//common.c:684:15: error: assignment from incompatible pointer type [-Werror] pStorePaths = &g_fdfs_store_paths; ^ /home/jumper/fastdfs-nginx-module/src//common.c:763:35: error: request for member ‘count’ in something not a structure or union store_path_index >= pStorePaths->count) ^ /home/jumper/fastdfs-nginx-module/src//common.c:769:34: error: request for member ‘count’ in something not a structure or union store_path_index, pStorePaths->count); ^ /home/jumper/fastdfs-nginx-module/src//common.c:808:3: error: implicit declaration of function ‘trunk_file_stat_ex1’ [-Werror=implicit-function-declaration] if ((result=trunk_file_stat_ex1(pStorePaths, store_path_index, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:868:17: error: request for member ‘paths’ in something not a structure or union pStorePaths->paths[store_path_index], \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:973:2: error: implicit declaration of function ‘fdfs_http_get_file_extension’ [-Werror=implicit-function-declaration] ext_name = fdfs_http_get_file_extension(true_filename, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:973:11: error: assignment makes pointer from integer without a cast [-Werror] ext_name = fdfs_http_get_file_extension(true_filename, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:977:2: error: passing argument 3 of ‘fdfs_http_get_content_type_by_extname’ makes pointer from integer without a cast [-Werror] if (fdfs_http_get_content_type_by_extname(&g_http_params, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//common.c:27:0, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/fdfs_http_shared.h:103:5: note: expected ‘char *’ but argument is of type ‘int’ int fdfs_http_get_content_type_by_extname(FDFSHTTPParams *pParams, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:977:2: error: passing argument 4 of ‘fdfs_http_get_content_type_by_extname’ makes integer from pointer without a cast [-Werror] if (fdfs_http_get_content_type_by_extname(&g_http_params, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//common.c:27:0, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/fdfs_http_shared.h:103:5: note: expected ‘int’ but argument is of type ‘char *’ int fdfs_http_get_content_type_by_extname(FDFSHTTPParams *pParams, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:977:2: error: too many arguments to function ‘fdfs_http_get_content_type_by_extname’ if (fdfs_http_get_content_type_by_extname(&g_http_params, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//common.c:27:0, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/fdfs_http_shared.h:103:5: note: declared here int fdfs_http_get_content_type_by_extname(FDFSHTTPParams *pParams, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:1092:3: error: unknown type name ‘ConnectionInfo’ ConnectionInfo storage_server; ^ /home/jumper/fastdfs-nginx-module/src//common.c:1096:24: error: request for member ‘ip_addr’ in something not a structure or union strcpy(storage_server.ip_addr, file_info.source_ip_addr); ^ /home/jumper/fastdfs-nginx-module/src//common.c:1097:17: error: request for member ‘port’ in something not a structure or union storage_server.port = the_storage_port; ^ /home/jumper/fastdfs-nginx-module/src//common.c:1098:17: error: request for member ‘sock’ in something not a structure or union storage_server.sock = -1; ^ /home/jumper/fastdfs-nginx-module/src//common.c:1104:3: error: passing argument 2 of ‘storage_download_file_ex1’ from incompatible pointer type [-Werror] result = storage_download_file_ex1(NULL, \ ^ In file included from /usr/local/include/fastdfs/fdfs_client.h:17:0, from /home/jumper/fastdfs-nginx-module/src//common.c:28, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/storage_client1.h:274:5: note: expected ‘struct TrackerServerInfo *’ but argument is of type ‘int *’ int storage_download_file_ex1(TrackerServerInfo *pTrackerServer, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:1133:3: error: implicit declaration of function ‘trunk_get_full_filename_ex’ [-Werror=implicit-function-declaration] trunk_get_full_filename_ex(pStorePaths, &trunkInfo, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:1143:16: error: request for member ‘paths’ in something not a structure or union pStorePaths->paths[store_path_index], \ ^ cc1: all warnings being treated as errors make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Leaving directory `/home/jumper/nginx-1.0.11' make: *** [build] Error 2

Socket编程报这个异常 Connection reset:

![图片说明](https://img-ask.csdn.net/upload/201608/16/1471357157_874740.jpg) 上面是客户端代码 下面是服务器端代码,当服务器端执行Readline();就抛出Connection reset try { ServerSocket ss = new ServerSocket(6000); System.out.println("服务器已经对端口号为12002的端口进行监听"); while (true) { Socket socket = ss.accept(); System.out.println(socket.getRemoteSocketAddress() + "连接上服务器"); if (socket.isClosed()) { System.out.println("连接被关闭"); } System.out.println("OK"); InputStream is = socket.getInputStream(); BufferedReader br = new BufferedReader( new InputStreamReader(is)); // 获得输出流 OutputStream os = socket.getOutputStream(); PrintWriter pw = new PrintWriter(os); // 4.读取用户输入信息 String info = null; info = br.readLine(); while (!((info = br.readLine()) == null)) { System.out.println("我是服务器,用户信息为:" + info); } // 给客户一个响应 String reply = "welcome"; pw.write(reply); pw.flush(); // 5.关闭资源 pw.close(); os.close(); br.close(); is.close(); socket.close();

Linux系统引起java.net.SocketException: Broken pipe的原因?

有两台linux服务器A、B 系统版本都是 Red Hat Enterprise Linux Server release 6.0 (Santiago) JDK版本都是 1.6.0_29 在A端发布一个RMI服务,配置如下 <bean id="rmiServerHost" factory-method="setProperty" class="java.lang.System" lazy-init="false"> <constructor-arg value="java.rmi.server.hostname"/> <constructor-arg value="${rmiServerHost}"/> </bean> <bean factory-method="setProperty" class="java.lang.System" lazy-init="false"> <constructor-arg value="java.rmi.dgc.leaseValue"/> <constructor-arg value="300000"/> </bean> <bean factory-method="setProperty" class="java.lang.System" lazy-init="false"> <constructor-arg value="java.rmi.dgc.gcInterval"/> <constructor-arg value="900000"/> </bean> <!--接收数据服务(下层模块提交的数据)--> <bean id="eventProcessor" class="com.dataservice.EventProcessorImpl"/> <bean id="rmiEventProcess" class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="serviceName" value="dataservice/eventProcessor" /> <property name="service" ref="eventProcessor" /> <property name="serviceInterface" value="com.dataservice.EventProcessor" /> <property name="registryPort" value="${registryPort}"/> <property name="servicePort" value="${registryPort}"/> </bean> B端为客户端,配置如下 <!--目标模块数据处理配置--> <bean id="rmiEventProcessorClient" class="org.springframework.remoting.rmi.RmiProxyFactoryBean"> <property name="serviceUrl" value="${targetAddr}" /> <property name="serviceInterface" value="com.dataservice.EventProcessor" /> <property name="refreshStubOnConnectFailure" value="true"></property> </bean> 情况是这样的,B端在调用A端发布的服务时,间歇性的出现如下异常。 异常信息:error marshalling arguments; nested exception is: java.net.SocketException: Broken pipe java.rmi.MarshalException: error marshalling arguments; nested exception is: java.net.SocketException: Broken pipe at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138) at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178) at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132) at $Proxy0.invoke(Unknown Source) at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:398) at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:344) at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:259) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy1.handleEvent(Unknown Source) at com.dataservice.EventSenderImpl.handleEvent(EventSenderImpl.java:220) at com.dataservice.EventSenderImpl.sendEventTask(EventSenderImpl.java:191) at com.dataservice.EventSenderImpl.access$0(EventSenderImpl.java:173) at com.dataservice.EventSenderImpl$ResSendTask.run(EventSenderImpl.java:166) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1847) at java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(ObjectOutputStream.java:1885) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1546) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:333) at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) ... 22 more 补充:相同的程序,放在linux版本相同,JDK版本相同的服务器C去调用A不会出现以上问题,B、和C的防火墙策略是相同的,防火墙关了也会有这个问题,就算把服务端部署在B,B内部调用也会间歇性出现该问题。 奔溃了,搞不定啊,求解。。。。

fastdfs文件上传的问题

我用fastdfs上传了一张图片文件,但是fastdfs会给我产生两个文件(一个带有big,一个没带有big的文件),怎么解决这个问题,我只需要产生一张图片 ![图片说明](https://img-ask.csdn.net/upload/201901/11/1547137078_108005.png)

java.io.IOException:UniJIS-UCS2-HW-H

用的包是itext和PDFReadererpdf转图片时总是报错 java.io.IOException: Unknown CMap: UniJIS-UCS2-HW-H at com.sun.pdfview.font.PDFCMap.getCMap(PDFCMap.java:67) at com.sun.pdfview.font.PDFFontEncoding.<init>(PDFFontEncoding.java:73) at com.sun.pdfview.font.PDFFont.getFont(PDFFont.java:146) at com.sun.pdfview.PDFParser.getFontFrom(PDFParser.java:1166) at com.sun.pdfview.PDFParser.iterate(PDFParser.java:719) at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101) at java.lang.Thread.run(Thread.java:745)

fastdfs启动失败并没有日志生成

centos7 + Fastdfs 5,安装成功后,使用systemctl启动storage和tracker,查看status显示active(exited),没有报错,netstat命令看到没有22122和23000端口被启动,status记录: fdfs_storaged.service - LSB: FastDFS storage server Loaded: loaded (/etc/rc.d/init.d/fdfs_storaged) Active: active (exited) since Fri 2016-07-08 15:53:03 CST; 18min ago Docs: man:systemd-sysv-generator(8) Process: 26569 ExecStart=/etc/rc.d/init.d/fdfs_storaged start (code=exited, status=0/SUCCESS) Jul 08 15:53:03 iZ238slz3o8Z systemd[1]: Starting LSB: FastDFS storage server... Jul 08 15:53:03 iZ238slz3o8Z fdfs_storaged[26569]: Starting FastDFS storage server: Jul 08 15:53:03 iZ238slz3o8Z systemd[1]: Started LSB: FastDFS storage server. Jul 08 15:53:03 iZ238slz3o8Z fdfs_storaged[26569]: Usage: /usr/local/bin/fdfs_storaged {start|stop|status|restart|condrestart} Jul 08 15:53:26 iZ238slz3o8Z systemd[1]: Started LSB: FastDFS storage server. storage与tracker的指定目录下没有生成log,请问会是什么原因引起的?谢谢

CentOS安装FastDfs错误

最近在CentOS上安装FastDFS在 编译时出现 /usr/local/lib/libfastcommon.so: undefined reference to `sqrt' /usr/local/lib/libfastcommon.so: undefined reference to `cos' 错误,请哪位大神帮忙解决一下。 详细错误如下: ``` cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_trackerd fdfs_trackerd.c ../common/fdfs_global.o tracker_proto.o tracker_mem.o tracker_service.o tracker_status.o tracker_global.o tracker_func.o fdfs_shared_func.o tracker_nio.o tracker_relationship.o tracker_dump.o ../common/linux_stack_trace.o -L/usr/local/lib -lpthread -lrt -ldl -rdynamic -lfastcommon -I../common -I/usr/include/fastcommon /usr/local/lib/libfastcommon.so: undefined reference to `sqrt' /usr/local/lib/libfastcommon.so: undefined reference to `cos' collect2: ld 返回 1 make: *** [fdfs_trackerd] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_storaged fdfs_storaged.c ../common/fdfs_global.o ../tracker/fdfs_shared_func.o ../tracker/tracker_proto.o tracker_client_thread.o storage_global.o storage_func.o storage_service.o storage_sync.o storage_nio.o storage_dio.o storage_ip_changed_dealer.o storage_param_getter.o storage_disk_recovery.o trunk_mgr/trunk_mem.o trunk_mgr/trunk_shared.o trunk_mgr/trunk_sync.o trunk_mgr/trunk_client.o trunk_mgr/trunk_free_block_checker.o ../client/client_global.o ../client/tracker_client.o ../client/storage_client.o ../client/client_func.o fdht_client/fdht_proto.o fdht_client/fdht_client.o fdht_client/fdht_func.o fdht_client/fdht_global.o storage_dump.o ../common/linux_stack_trace.o -L/usr/local/lib -lpthread -lrt -ldl -rdynamic -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon /usr/local/lib/libfastcommon.so: undefined reference to `sqrt' /usr/local/lib/libfastcommon.so: undefined reference to `cos' collect2: ld 返回 1 make: *** [fdfs_storaged] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -DOS_LINUX -DIOEVENT_USE_EPOLL -o fdfs_monitor fdfs_monitor.c ../common/fdfs_global.o ../common/fdfs_http_shared.o ../common/mime_file_parser.o ../tracker/tracker_proto.o ../tracker/fdfs_shared_func.o ../storage/trunk_mgr/trunk_shared.o tracker_client.o client_func.o client_global.o storage_client.o -lpthread -lrt -ldl -rdynamic -lfastcommon -I../common -I../tracker -I/usr/include/fastcommon /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../libfastcommon.so: undefined reference to `sqrt' /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../libfastcommon.so: undefined reference to `cos' ``` 环境:CentOS6.x, FastDFS-5.05 此问题已解决: 此问题是由于 libfastcommon-master 版本问题,改为libfastcommon-1.0.7后,再进行编译就OK了。

fdfs图片服务器上传报错recv package size -1 != 10

java.io.IOException: recv package size -1 != 10 at org.csource.fastdfs.ProtoCommon.recvHeader(ProtoCommon.java:214) at org.csource.fastdfs.ProtoCommon.recvPackage(ProtoCommon.java:250) at org.csource.fastdfs.TrackerClient.getStoreStorage(TrackerClient.java:143) at org.csource.fastdfs.StorageClient.newWritableStorageConnection(StorageClient.java:1938) at org.csource.fastdfs.StorageClient.do_upload_file(StorageClient.java:703) at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:208) at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:226) at org.csource.fastdfs.StorageClient1.upload_file1(StorageClient1.java:112) at com.taotao.service.util.FastDFSClient.uploadFile(FastDFSClient.java:63) at com.taotao.service.util.FastDFSClient.uploadFile(FastDFSClient.java:72) at com.taotao.service.impl.PictureServiceImpl.upload(PictureServiceImpl.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:267) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy37.upload(Unknown Source) at com.taotao.controller.PictureController.upload(PictureController.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)

java.net.NoRouteToHostException: 没有到主机的路由

虚拟机环境:nginx+fastDFS+fastDFS-nginx-module 可以在虚拟机中上传文件,在浏览器上也可以查看上传的文件。 @Test public void testUpload() throws Exception { ClientGlobal.init("/home/yazhou/Document/java/taotao/clint.conf"); TrackerClient trackerClient =new TrackerClient(); TrackerServer trackerServer =trackerClient.getConnection(); StorageServer storageServer =null; StorageClient storageClient =new StorageClient(trackerServer,storageServer); String[] strings= storageClient.upload_file("/home/yazhou/Pictures/BG/1352113505895.jpg","jpg",null); for (String string:strings){ System.out.println(string); } } java.net.NoRouteToHostException: 没有到主机的路由 at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.csource.fastdfs.ClientGlobal.getSocket(ClientGlobal.java:107) at org.csource.fastdfs.StorageServer.<init>(StorageServer.java:45) at org.csource.fastdfs.TrackerClient.getStoreStorage(TrackerClient.java:158) at org.csource.fastdfs.StorageClient.newWritableStorageConnection(StorageClient.java:1938) at org.csource.fastdfs.StorageClient.do_upload_file(StorageClient.java:703) at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:164) at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:132) at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:114) at com.taotao.fastcast.FastTest.testUpload(FastTest.java:19) 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:498) 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.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84) 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:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

FastDFS 在Linux系统上安装失败

<font color='red'>在FastDFS目录下执行 ./make.sh 出现一大堆错误。这是什么问题??</font> * 目录 ``` [root@localhost fastdfs-5.10]# ll 总用量 136 drwxrwxr-x. 3 root root 4096 4月 15 20:38 client drwxrwxr-x. 2 root root 4096 4月 6 09:38 common drwxrwxr-x. 2 root root 4096 4月 6 09:38 conf -rw-rw-r--. 1 root root 35067 4月 6 09:38 COPYING-3_0.txt -rw-rw-r--. 1 root root 3171 4月 6 09:38 fastdfs.spec -rw-rw-r--. 1 root root 32930 4月 6 09:38 HISTORY drwxrwxr-x. 2 root root 4096 4月 6 09:38 init.d -rw-rw-r--. 1 root root 7755 4月 6 09:38 INSTALL -rwxrwxr-x. 1 root root 5548 4月 6 09:38 make.sh drwxrwxr-x. 2 root root 4096 4月 6 09:38 php_client -rw-rw-r--. 1 root root 2380 4月 6 09:38 README.md -rwxrwxr-x. 1 root root 1768 4月 6 09:38 restart.sh -rwxrwxr-x. 1 root root 1680 4月 6 09:38 stop.sh drwxrwxr-x. 4 root root 4096 4月 15 20:38 storage drwxrwxr-x. 2 root root 4096 4月 6 09:38 test drwxrwxr-x. 2 root root 4096 4月 15 20:38 tracker ``` * 执行结果 ``` [root@localhost fastdfs-5.10]# ./make.sh cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I../common -I/usr/include/fastcommon ../common/fdfs_global.c:20:20: 错误:logger.h:没有那个文件或目录 在包含自 ../common/fdfs_global.c:21 的文件中: ../common/fdfs_global.h:14:27: 错误:common_define.h:没有那个文件或目录 ../common/fdfs_global.h:16:29: 错误:connection_pool.h:没有那个文件或目录 In file included from ../common/fdfs_global.c:21: ../common/fdfs_global.h:26: 错误:‘MAX_PATH_SIZE’未声明(不在函数内) ../common/fdfs_global.h:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_fdfs_version’ ../common/fdfs_global.h:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_use_connection_pool’ ../common/fdfs_global.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_connection_pool’ ../common/fdfs_global.c:23: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:24: 错误:‘DEFAULT_NETWORK_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:26: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_fdfs_version’ ../common/fdfs_global.c:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_use_connection_pool’ ../common/fdfs_global.c:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_connection_pool’ ../common/fdfs_global.c: 在函数‘fdfs_check_data_filename’中: ../common/fdfs_global.c:39: 警告:隐式声明函数‘logError’ ../common/fdfs_global.c:45: 警告:隐式声明函数‘IS_UPPER_HEX’ make: *** [../common/fdfs_global.o] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon ../common/fdfs_global.c:20:20: 错误:logger.h:没有那个文件或目录 在包含自 ../common/fdfs_global.c:21 的文件中: ../common/fdfs_global.h:14:27: 错误:common_define.h:没有那个文件或目录 ../common/fdfs_global.h:16:29: 错误:connection_pool.h:没有那个文件或目录 In file included from ../common/fdfs_global.c:21: ../common/fdfs_global.h:26: 错误:‘MAX_PATH_SIZE’未声明(不在函数内) ../common/fdfs_global.h:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_fdfs_version’ ../common/fdfs_global.h:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_use_connection_pool’ ../common/fdfs_global.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_connection_pool’ ../common/fdfs_global.c:23: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:24: 错误:‘DEFAULT_NETWORK_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:26: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_fdfs_version’ ../common/fdfs_global.c:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_use_connection_pool’ ../common/fdfs_global.c:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_connection_pool’ ../common/fdfs_global.c: 在函数‘fdfs_check_data_filename’中: ../common/fdfs_global.c:39: 警告:隐式声明函数‘logError’ ../common/fdfs_global.c:45: 警告:隐式声明函数‘IS_UPPER_HEX’ make: *** [../common/fdfs_global.o] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_global.o ../common/fdfs_global.c -I../common -I../tracker -I/usr/include/fastcommon ../common/fdfs_global.c:20:20: 错误:logger.h:没有那个文件或目录 在包含自 ../common/fdfs_global.c:21 的文件中: ../common/fdfs_global.h:14:27: 错误:common_define.h:没有那个文件或目录 ../common/fdfs_global.h:16:29: 错误:connection_pool.h:没有那个文件或目录 In file included from ../common/fdfs_global.c:21: ../common/fdfs_global.h:26: 错误:‘MAX_PATH_SIZE’未声明(不在函数内) ../common/fdfs_global.h:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_fdfs_version’ ../common/fdfs_global.h:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_use_connection_pool’ ../common/fdfs_global.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_connection_pool’ ../common/fdfs_global.c:23: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:24: 错误:‘DEFAULT_NETWORK_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:26: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_fdfs_version’ ../common/fdfs_global.c:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_use_connection_pool’ ../common/fdfs_global.c:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_connection_pool’ ../common/fdfs_global.c: 在函数‘fdfs_check_data_filename’中: ../common/fdfs_global.c:39: 警告:隐式声明函数‘logError’ ../common/fdfs_global.c:45: 警告:隐式声明函数‘IS_UPPER_HEX’ make: *** [../common/fdfs_global.o] 错误 1 ```

 java.net.SocketTimeoutException: Read timed out  ???

![图片说明](https://img-ask.csdn.net/upload/201812/08/1544262988_779051.png) 在搞阿里大于发送短信验证码时候。程序一直出现这种错误。有人知道吗?

FastDFS安装时遇到错误

今天在服务器上安装FastDFS,应该是CentOS的。 安装libfastcommon之后,就安装FastDFS的包嘛,在 ./make.sh的命令时出现一堆错误,无法继续下去了! 忘大佬解答!!~~~ ``` [root@localhost ~]# cd .. [root@localhost /]# cd software [root@localhost software]# cd FastDFS [root@localhost FastDFS]# ll 总用量 132 drwxr-xr-x. 3 8980 users 4096 12月 22 00:49 client drwxr-xr-x. 2 8980 users 4096 2月 4 2016 common drwxr-xr-x. 2 8980 users 4096 2月 4 2016 conf -rw-r--r--. 1 8980 users 35067 2月 4 2016 COPYING-3_0.txt -rw-r--r--. 1 8980 users 2857 2月 4 2016 fastdfs.spec -rw-r--r--. 1 8980 users 32218 2月 4 2016 HISTORY drwxr-xr-x. 2 8980 users 4096 2月 4 2016 init.d -rw-r--r--. 1 8980 users 7755 2月 4 2016 INSTALL -rwxr-xr-x. 1 8980 users 5548 2月 4 2016 make.sh drwxr-xr-x. 2 8980 users 4096 2月 4 2016 php_client -rw-r--r--. 1 8980 users 2380 2月 4 2016 README.md -rwxr-xr-x. 1 8980 users 1768 2月 4 2016 restart.sh -rwxr-xr-x. 1 8980 users 1680 2月 4 2016 stop.sh drwxr-xr-x. 4 8980 users 4096 12月 22 00:49 storage drwxr-xr-x. 2 8980 users 4096 2月 4 2016 test drwxr-xr-x. 2 8980 users 4096 12月 22 00:49 tracker [root@localhost FastDFS]# ./make.sh cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_ global.o ../common/fdfs_global.c -I../common -I/usr/include/fastcommon ../common/fdfs_global.c:20:20: 错误:logger.h:没有那个文件或目录 在包含自 ../common/fdfs_global.c:21 的文件中: ../common/fdfs_global.h:14:27: 错误:common_define.h:没有那个文件或目录 ../common/fdfs_global.h:16:29: 错误:connection_pool.h:没有那个文件或目录 In file included from ../common/fdfs_global.c:21: ../common/fdfs_global.h:26: 错误:‘MAX_PATH_SIZE’未声明(不在函数内) ../common/fdfs_global.h:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_fdfs_version’ ../common/fdfs_global.h:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_use_connection_pool’ ../common/fdfs_global.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_connection_pool’ ../common/fdfs_global.c:23: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:24: 错误:‘DEFAULT_NETWORK_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:26: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_fdfs_version’ ../common/fdfs_global.c:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_use_connection_pool’ ../common/fdfs_global.c:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_connection_pool’ ../common/fdfs_global.c: 在函数‘fdfs_check_data_filename’中: ../common/fdfs_global.c:39: 警告:隐式声明函数‘logError’ ../common/fdfs_global.c:45: 警告:隐式声明函数‘IS_UPPER_HEX’ make: *** [../common/fdfs_global.o] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_ global.o ../common/fdfs_global.c -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon ../common/fdfs_global.c:20:20: 错误:logger.h:没有那个文件或目录 在包含自 ../common/fdfs_global.c:21 的文件中: ../common/fdfs_global.h:14:27: 错误:common_define.h:没有那个文件或目录 ../common/fdfs_global.h:16:29: 错误:connection_pool.h:没有那个文件或目录 In file included from ../common/fdfs_global.c:21: ../common/fdfs_global.h:26: 错误:‘MAX_PATH_SIZE’未声明(不在函数内) ../common/fdfs_global.h:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_fdfs_version’ ../common/fdfs_global.h:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_use_connection_pool’ ../common/fdfs_global.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_connection_pool’ ../common/fdfs_global.c:23: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:24: 错误:‘DEFAULT_NETWORK_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:26: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_fdfs_version’ ../common/fdfs_global.c:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_use_connection_pool’ ../common/fdfs_global.c:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_connection_pool’ ../common/fdfs_global.c: 在函数‘fdfs_check_data_filename’中: ../common/fdfs_global.c:39: 警告:隐式声明函数‘logError’ ../common/fdfs_global.c:45: 警告:隐式声明函数‘IS_UPPER_HEX’ make: *** [../common/fdfs_global.o] 错误 1 cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -c -o ../common/fdfs_ global.o ../common/fdfs_global.c -I../common -I../tracker -I/usr/include/fastcommon ../common/fdfs_global.c:20:20: 错误:logger.h:没有那个文件或目录 在包含自 ../common/fdfs_global.c:21 的文件中: ../common/fdfs_global.h:14:27: 错误:common_define.h:没有那个文件或目录 ../common/fdfs_global.h:16:29: 错误:connection_pool.h:没有那个文件或目录 In file included from ../common/fdfs_global.c:21: ../common/fdfs_global.h:26: 错误:‘MAX_PATH_SIZE’未声明(不在函数内) ../common/fdfs_global.h:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_fdfs_version’ ../common/fdfs_global.h:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_use_connection_pool’ ../common/fdfs_global.h:29: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_connection_pool’ ../common/fdfs_global.c:23: 错误:‘DEFAULT_CONNECT_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:24: 错误:‘DEFAULT_NETWORK_TIMEOUT’未声明(不在函数内) ../common/fdfs_global.c:26: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_fdfs_version’ ../common/fdfs_global.c:27: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_use_connection_pool’ ../common/fdfs_global.c:28: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ bef ore ‘g_connection_pool’ ../common/fdfs_global.c: 在函数‘fdfs_check_data_filename’中: ../common/fdfs_global.c:39: 警告:隐式声明函数‘logError’ ../common/fdfs_global.c:45: 警告:隐式声明函数‘IS_UPPER_HEX’ make: *** [../common/fdfs_global.o] 错误 1 [root@localhost FastDFS]# ```

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Intellij IDEA 实用插件安利

1. 前言从2020 年 JVM 生态报告解读 可以看出Intellij IDEA 目前已经稳坐 Java IDE 头把交椅。而且统计得出付费用户已经超过了八成(国外统计)。IDEA 的...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

魂迁光刻,梦绕芯片,中芯国际终获ASML大型光刻机

据羊城晚报报道,近日中芯国际从荷兰进口的一台大型光刻机,顺利通过深圳出口加工区场站两道闸口进入厂区,中芯国际发表公告称该光刻机并非此前盛传的EUV光刻机,主要用于企业复工复产后的生产线扩容。 我们知道EUV主要用于7nm及以下制程的芯片制造,光刻机作为集成电路制造中最关键的设备,对芯片制作工艺有着决定性的影响,被誉为“超精密制造技术皇冠上的明珠”,根据之前中芯国际的公报,目...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

百度工程师,获利10万,判刑3年!

所有一夜暴富的方法都写在刑法中,但总有人心存侥幸。这些年互联网犯罪高发,一些工程师高技术犯罪更是引发关注。这两天,一个百度运维工程师的案例传遍朋友圈。1...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

实时更新:计算机编程语言排行榜—TIOBE世界编程语言排行榜(2020年6月份最新版)

内容导航: 1、TIOBE排行榜 2、总榜(2020年6月份) 3、本月前三名 3.1、C 3.2、Java 3.3、Python 4、学习路线图 5、参考地址 1、TIOBE排行榜 TIOBE排行榜是根据全世界互联网上有经验的程序员、课程和第三方厂商的数量,并使用搜索引擎(如Google、Bing、Yahoo!)以及Wikipedia、Amazon、YouTube统计出排名数据。

立即提问
相关内容推荐