zoukankan      html  css  js  c++  java
  • fastDFS errcode:9 path:Bad file descriptor errcode:22 path:Invalid argument

    fastDFS errcode:9 path:Bad file descriptor errcode:22 path:Invalid argument

    <error>status:4 errcode:9 path:Bad file descriptor</error>

    $storage = fastdfs_tracker_query_storage_store();
    if (!fastdfs_active_test($tracker))
    {
    $result['status'] = 4;
    $result['errcode'] = fastdfs_get_last_error_no();
    $result['path'] = fastdfs_get_last_error_info();
    unlink($tmpFile);
    return $result;
    }
    ---------------------------------------------------
    上传时报错,errno9 Bad File Descriptor问题解决思路:
    要先看看是不是上传文件服务器磁盘满了,文件无法保存到临时文件夹从而出错(本人遇到这种问题)。
    另外查看是不是分布式存储文件服务器分配的磁盘满了(本人同时也遇到这种问题)

    --------------------------------
    Linux查看磁盘使用情况命令
    一、df -lh 命令
    df 是来自于coreutils 软件包,系统安装时,就自带的;我们通过这个命令可以查看磁盘的使用情况以及文件系统被挂载的位置;
    root@IP31:~# df -lh
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 56G 14G 39G 27% /
    udev 2.0G 4.0K 2.0G 1% /dev
    tmpfs 396M 264K 396M 1% /run

    二、fdisk -l 命令
    fdisk 是一款强大的磁盘操作工具,来自util-linux软件包,我们在这里只说他如何查看磁盘分区表及分区结构;通过-l 参数,能获得机器中所有的硬盘的分区情况;
    root@IP31:/usr/tmpfile# fdisk -l

    -------------------------------------
    linux 下查看文件个数及大小
    ls -l |grep "^-"|wc -l

    find ./company -type f | wc -l
    查看某文件夹下文件的个数,包括子文件夹里的。
    ls -lR|grep "^-"|wc -l
    查看某文件夹下文件夹的个数,包括子文件夹里的。
    ls -lR|grep "^d"|wc -l
    -----------------------------
    Linux查看文件夹大小
    du -sh 查看当前文件夹大小
    du -sh * | sort -n 统计当前文件夹(目录)大小,并按文件大小排序
    du -sk filename 查看指定文件大小

    =====================================
    Bad file descriptor什么原因
    你open时产生的句柄之类的DD(对于你的情况就是 fd=socket()),然后不释放或关闭时,当达到操作系统支持的最大值时,就无法再打开了。在Solaris上可以ulimit修改最大值。

    线程已经通过之前的创建文件指令,将文件创建并打开,但是在进行写数据提示errno9 Bad File Descriptor

    -----------------------
    <error>status:3 errcode:22 path:Invalid argument</error>
    这个错误是连接不了fastDFS服务器,可能是服务器挂了或者服务没有开启导致的
    $tracker = fastdfs_tracker_get_connection();
    if (!fastdfs_active_test($tracker))
    {
    $result['status'] = 3;
    $result['errcode'] = fastdfs_get_last_error_no();
    $result['path'] = fastdfs_get_last_error_info();
    unlink($tmpFile);
    return $result;
    }

  • 相关阅读:
    hdu 1199 Color the Ball 离散线段树
    poj 2623 Sequence Median 堆的灵活运用
    hdu 2251 Dungeon Master bfs
    HDU 1166 敌兵布阵 线段树
    UVALive 4426 Blast the Enemy! 计算几何求重心
    UVALive 4425 Another Brick in the Wall 暴力
    UVALive 4423 String LD 暴力
    UVALive 4872 Underground Cables 最小生成树
    UVALive 4870 Roller Coaster 01背包
    UVALive 4869 Profits DP
  • 原文地址:https://www.cnblogs.com/zdz8207/p/fastDFS-errcode-9-22.html
Copyright © 2011-2022 走看看