Use FastDFS - storage appears as file upload bug:
>>> ret = client.upload_by_filename('/home/python/Desktop/1.jpg') Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/python/.virtualenvs/meiduo/lib/python3.5/site-packages/fdfs_client/client.py", line 90, in upload_by_filename store_serv = tc.tracker_query_storage_stor_without_group() File "/home/python/.virtualenvs/meiduo/lib/python3.5/site-packages/fdfs_client/tracker_client.py", line 381, in tracker_query_storage_stor_without_group raise DataError('[-] Error: %d, %s' % (th.status, os.strerror(th.status))) fdfs_client.exceptions.DataError: [-] Error: 2, No such file or directory
problem causes:
1. storage container or tracker service is not turned on (directly open just fine)
Python and IP port connection or profile settings startup 2. storage: IP address (e.g. client.conf) inconsistencies
Problem 1 Solution:
1. Turning on the storage container and the tracker
2. Error 2: Not enough disk space report, No space on device left.
Solution: expanding the space, or delete old content
3. 错误3:No such file or directory
-
-
Solution: Start tracker, storage
-
4. Error 4: Start storage failed
-
-
Solve: sudo rm /var/fdfs/storage/data/fdfs_storaged.pid
-
5. Error 5: container storage, tracker have been launched, but still reported the error file does not exist
-
-
Solution: Stop two containers, remove the two containers, run two containers
-
Note: View the current machine start-ip and storage of settings
-
# View the running container
sudo Docker LS Container
# View all containers
sudo Docker LS Container -a
# If you do not see all open containers on the first container, the container CONTAINER ID copy
2. Turn on again after uploading
Problem 2 Solution:
1. Check the local IP
ifconfig (linux) or ipconfig (win)
2. Stop the storage container
sudo docker container stop storage
3. Delete the current container
sudo docker container rm storage
4. The storage directory is mapped to the host running the /var/fdfs/storage
directory
Docker RUN -dti --name Storage sudo --network = -e TRACKER_SERVER Host = 192.168.103.158: 22122 -v / var / FDFS / Storage: / var / FDFS Delron / fastdfs Storage
# above IP address just remember to change their view IP address, TRACKER_SERVER = Tracker ip address: 22122 (Tracker can not use the ip address 127.0.0.1) profile should be changed to the IP address: below
5. Re-run the storage vessel
sudo docker container start storage
6. Check the container status
sudo docker container ls
If enabled, as shown below, demonstrate the success of open storage:
7. Re-upload your images, as shown on behalf of success.