celery配合redis出现redis.exceptions.InvalidResponse Protocol Error
2020年6月21日 09:29
一受多攻双根
一受多攻双根
Tags:RedisCelery一受多攻双根
一受多攻双根
Tags:RedisCeleryTraceback (most recent call last):File "/app/defect-client/defect_client/cmd/wafer-worker.py", line 14, in <module>import eventletFile "/usr/local/lib/python3.6/dist-packages/eventlet/__init__.py", line 10, in <module>from eventlet import convenienceFile "/usr/local/lib/python3.6/dist-packages/eventlet/convenience.py", line 7, in <module>from eventlet.green import socketFile "/usr/local/lib/python3.6/dist-packages/eventlet/green/socket.py", line 21, in <module>from eventlet.support import greendnsFile "/usr/local/lib/python3.6/dist-packages/eventlet/support/greendns.py", line 69, in <module>setattr(dns.rdtypes.IN, pkg, import_patched('dns.rdtypes.IN.' + pkg))File "/usr/local/lib/python3.6/dist-packages/eventlet/support/greendns.py", line 59, in import_patchedreturn patcher.import_patched(module_name, **modules)File "/usr/local/lib/python3.6/dist-packages/eventlet/patcher.py", line 126, in import_patched*additional_modules + tuple(kw_additional_modules.items()))File "/usr/local/lib/python3.6/dist-packages/eventlet/patcher.py", line 100, in injectmodule = __import__(module_name, {}, {}, module_name.split('.')[:-1])File "/usr/local/lib/python3.6/dist-packages/dns/rdtypes/IN/WKS.py", line 25, in <module>_proto_tcp = socket.getprotobyname('tcp')OSError: protocol not found
apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall netbase
ab -n 1000 -c 100 -p ./post.txt -T application/json http://xxxx:5000/xxx
import numpy as npfrom io import BytesIOA = np.array([ 1, 2, 3, 4, 4,2, 3, 4, 5, 3,4, 5, 6, 7, 2,5, 6, 7, 8, 9,6, 7, 8, 9, 0 ]).reshape(5,5) # numpy 转bytesnda_bytes = BytesIO()np.save(nda_bytes, A, allow_pickle=False)# bytes转numpynda_bytes = BytesIO(nda_bytes.getvalue())B = np.load(nda_bytes, allow_pickle=False)print(np.array_equal(A, B))
syntax = "proto3";message NDArray {bytes ndarray = 1;}
from io import BytesIOimport numpy as npimport ndarray_pb2 #上面ndarray.proto编译成pythondef ndarray_to_proto(nda: np.ndarray) -> NDArray:"""numpy转proto"""nda_bytes = BytesIO()np.save(nda_bytes, nda, allow_pickle=False)return NDArray(ndarray=nda_bytes.getvalue())def proto_to_ndarray(nda_proto: NDArray) -> np.ndarray:nda_bytes = BytesIO(nda_proto.ndarray)return np.load(nda_bytes, allow_pickle=False)A = np.array([ 1, 2, 3, 4, 4,2, 3, 4, 5, 3,4, 5, 6, 7, 2,5, 6, 7, 8, 9,6, 7, 8, 9, 0 ]).reshape(5,5)serialized_A = ndarray_to_proto(A)deserialized_A = proto_to_ndarray(serialized_A)assert np.array_equal(A, deserialized_A)
docker pull ceph/daemon:latest-luminous
# 格式化mkfs.xfs /dev/sdb -fmkfs.xfs /dev/sdc -fmkfs.xfs /dev/sdd -f# 如果已经是xfs格式, 上面命令并不能清除已有数据, 需要用zap_device清理docker run -d --net=host --name=osd0--rm \--privileged=true \-v /dev/:/dev/ \-e OSD_DEVICE=/dev/sde\ ceph/daemon:latest-luminous zap_device
/root/ceph/root/ceph/etc/root/ceph/lib
docker run -d --net=host--name=mon \-v /root/ceph/etc:/etc/ceph \-v /root/ceph/lib/:/var/lib/ceph/ \-e MON_IP=192.168.10.125 \-e CEPH_PUBLIC_NETWORK=192.168.10.0/24 \ ceph/daemon:latest-luminous mon
docker run -d --net=host --name=mgr \-v /root/ceph/etc:/etc/ceph\-v /root/ceph/lib/:/var/lib/ceph\ceph/daemon:latest-luminousmgr
# 修改-name和OSD_DEVICE启动三个osddocker run -d --net=host --name=osd0 \--privileged=true \-v /root/ceph/etc:/etc/ceph\-v /root/ceph/lib/:/var/lib/ceph\-v /dev/:/dev/ \-e OSD_DEVICE=/dev/sdb\-e OSD_TYPE=disk \ ceph/daemon:latest-luminous osd
#一定要在osd之后创建启动, 因为CEPHFS_CREATE=1会创建cephfs文件系统,受osd数量影响docker run -d --net=host --name=mds \-v /root/ceph/etc:/etc/ceph \-v /root/ceph/lib/:/var/lib/ceph/ \-e CEPHFS_CREATE=1 \# 默认创建cephfs文件系统ceph/daemon:latest-luminous mds
# 进入容器docker exec -it mon bash# 查看状态[root@localhost /]# ceph -scluster:id: 4d74fd53-84e0-47e6-a06c-5418e4b3b653health: HEALTH_WARN1 MDSs report slow metadata IOs2 osds down34/51 objects misplaced (66.667%)Reduced data availability: 4 pgs inactive, 16 pgs staleDegraded data redundancy: 16 pgs undersizedtoo few PGs per OSD (4 < min 30)services:mon: 1 daemons, quorum localhostmgr: localhost(active)mds: cephfs-1/1/1 up{0=localhost=up:creating}osd: 5 osds: 2 up, 4 indata:pools: 2 pools, 16 pgsobjects: 17 objects, 2.19KiBusage: 4.01GiB used, 75.6GiB / 79.6GiB availpgs: 25.000% pgs not active 34/51 objects misplaced (66.667%) 12 stale+active+undersized+remapped 4stale+undersized+peered
ceph osd pool set cephfs_data pg_num 64ceph osd pool set cephfs_data pgp_num 64ceph osd pool setcephfs_metadata pg_num 32ceph osd pool setcephfs_metadata pgp_num 32
ceph osd pool set cephfs_metadata min_size 1ceph osd pool set cephfs_data min_size 1
mds: cephfs-1/1/1 up{0=localhost=up:active}
# 获取keycat /root/ceph/etc/ceph.client.admin.keyring# 直接挂载mount -t ceph 192.168.10.125:6789:/ /root/abc -o name=admin,secret=AQAvoctebqeuBRAAp+FoatmQ5CUlSlo8dmvGAg==# 取消挂载umount /root/abc
# 安装ceph-fuseyum install ceph-fuse# 挂载(-k指定key -c表示配置文件)ceph-fuse -m 192.168.10.125:6789 /root/abc1 -k /root/ceph/etc/ceph.client.admin.keyring-c /root/ceph/etc/ceph.conf#取消挂载umount /root/abc1
df -h192.168.10.125:6789:/ 18G 0 18G0% /root/abcceph-fuse 18G 0 18G0% /root/abc1
tensorflow.python.framework.errors_impl.ResourceExhaustedError: 2 root error(s) found.(0) Resource exhausted: OOM when allocating tensor with shape[64,33,33,2048] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc[[node SecondStageBoxPredictor_1/ResizeBilinear (defined at /app/models/research/object_detection/predictors/heads/mask_head.py:149) ]]Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.[[total_loss/_7771]]Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.(1) Resource exhausted: OOM when allocating tensor with shape[64,33,33,2048] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc[[node SecondStageBoxPredictor_1/ResizeBilinear (defined at /app/models/research/object_detection/predictors/heads/mask_head.py:149) ]]Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.0 successful operations.0 derived errors ignored.Errors may have originated from an input operation.Input Source operations connected to node SecondStageBoxPredictor_1/ResizeBilinear: SecondStageFeatureExtractor/resnet_v1_101/block4/unit_3/bottleneck_v1/Relu (defined at /app/models/research/slim/nets/resnet_v1.py:136)Input Source operations connected to node SecondStageBoxPredictor_1/ResizeBilinear: SecondStageFeatureExtractor/resnet_v1_101/block4/unit_3/bottleneck_v1/Relu (defined at /app/models/research/slim/nets/resnet_v1.py:136)
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-142-generic'-> done.-> Kernel module compilation complete.ERROR: Unable to load the kernel module 'nvidia.ko'.This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if another driver, such as nouveau, is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA GPU(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.(0) Invalid argument: Key: image/object/mask.Data types don't match. Expected type: float, Actual type: string [[{{node ParseSingleExample/ParseSingleExample}}]] [[IteratorGetNext]] [[BatchMultiClassNonMaxSuppression/map/while/TensorArrayReadV3_5/_7587]](1) Invalid argument: Key: image/object/mask.Data types don't match. Expected type: float, Actual type: string [[{{node ParseSingleExample/ParseSingleExample}}]] [[IteratorGetNext]]0 successful operations.0 derived errors ignored.
pipeline配置文件缺少参数mask_type去指定mask类型
train_input_reader: {mask_type: PNG_MASKS}eval_input_reader: {mask_type: PNG_MASKS}
gunicorn --worker-class eventlet -w 1 zhima_chat:app -b 0.0.0.0:5000 --access-logfile -
jekyll 3.8.5 | Error:Permission denied @ dir_s_mkdir - /srv/jekyll/_site