fastdfs通过tracker_server访问文件问题 5C

使用fastdfs搭建本地文件系统,文件上传后,通过tracker_server可以访问到上传的文件,但是过段时间再通过tracker_server 就无法访问到图片了,但是通过storage可以访问到文件,这是什么原因造成?
1、这是过段时间后通过tracker_server访问的结果,报nginx 404
图片说明
2、同样的文件通过sttorage访问,正常:
图片说明
3、新上传的,通过TRACKER_SERVER访问也是正常的。如图:
图片说明

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
fastdfs的file: tracker_nio.c, line: 306
[2016-09-28 15:57:39] INFO - file: tracker_relationship.c, line: 383, selecting leader... [2016-09-28 15:57:39] INFO - file: tracker_relationship.c, line: 422, the tracker leader 124.163.205.249:22122 [2016-09-29 06:05:04] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 14:46:45] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 14:49:00] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 14:51:04] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 15:06:26] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 15:13:26] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 15:14:18] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 15:45:33] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 15:46:23] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-29 17:16:38] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-09-30 06:05:03] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-01 06:05:11] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-02 06:05:21] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-03 06:05:10] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-04 06:05:09] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-05 06:05:10] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-06 06:05:09] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-07 06:05:09] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-08 06:05:11] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-09 06:05:20] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 [2016-10-10 06:05:05] ERROR - file: tracker_nio.c, line: 306, client ip: 124.163.205.248, pkg length: 790644830 > max pkg size: 8192 能上传,能下载,但是每天时不时报这个错。就在一天的某个点上集中报出来. 帮忙解决下!
fastdfs有关tracker服务器返回storage服务器ip地址的问题。
在storage.conf的配置中,tracker_server的参数配置的是外网,具体参数为183.62.##.##:23000,但是在centos里面做 测试上传的时候,却出现一下错误: tracker_query_storage_store_list_without_group: server 1. group_name=, ip_addr=192.168.1.253, port=23000 group_name=group1, ip_addr=192.168.1.253, port=23000 [2018-03-22 09:27:31] ERROR - file: connection_pool.c, line: 110, connect to 192.168.1.253:23000 fail, errno: 110, error info: Connection timed out。 然后同过命令fdfs_monitor /etc/fdfs/storage.conf查看,参数如下: Storage 1: id = 192.168.1.226 ip_addr = 192.168.1.226 (centos7) OFFLINE http domain = 183.62.**.** version = 5.05 join time = 2018-03-20 14:47:47 up time = total storage = 172651 MB free storage = 172578 MB upload priority = 10 store_path_count = 1 subdir_count_per_path = 256 storage_port = 23000 storage_http_port = 23000 current_write_path = 0 source storage id = if_trunk_server = 0 connection.alloc_count = 0 connection.current_count = 0 connection.max_count = 0 total_upload_count = 42 success_upload_count = 42 total_append_count = 0 success_append_count = 0 total_modify_count = 0 success_modify_count = 0 total_truncate_count = 0 success_truncate_count = 0 total_set_meta_count = 22 success_set_meta_count = 22 total_delete_count = 0 success_delete_count = 0 total_download_count = 0 success_download_count = 0 total_get_meta_count = 0 success_get_meta_count = 0 total_create_link_count = 0 success_create_link_count = 0 total_delete_link_count = 0 success_delete_link_count = 0 total_upload_bytes = 5524950 success_upload_bytes = 5524950 total_append_bytes = 0 success_append_bytes = 0 total_modify_bytes = 0 success_modify_bytes = 0 stotal_download_bytes = 0 success_download_bytes = 0 total_sync_in_bytes = 0 success_sync_in_bytes = 0 total_sync_out_bytes = 0 success_sync_out_bytes = 0 total_file_open_count = 42 success_file_open_count = 42 total_file_read_count = 0 success_file_read_count = 0 total_file_write_count = 42 success_file_write_count = 42 last_heart_beat_time = 2018-03-22 09:25:33 last_source_update = 2018-03-21 18:21:50 last_sync_update = 1970-01-01 08:00:00 last_synced_timestamp = 1970-01-01 08:00:00 (never synced) Storage 2: id = 192.168.1.253 ip_addr = 192.168.1.253 (gateway.lan.localnet) ACTIVE http domain = 183.62.**.** version = 5.05 join time = 2018-03-20 14:47:47 up time = 2018-03-22 09:25:51 total storage = 172651 MB free storage = 172578 MB upload priority = 10 store_path_count = 1 subdir_count_per_path = 256 storage_port = 23000 storage_http_port = 23000 current_write_path = 0 source storage id = if_trunk_server = 0 connection.alloc_count = 256 connection.current_count = 0 connection.max_count = 0 total_upload_count = 42 success_upload_count = 42 total_append_count = 0 success_append_count = 0 total_modify_count = 0 success_modify_count = 0 total_truncate_count = 0 success_truncate_count = 0 total_set_meta_count = 22 success_set_meta_count = 22 total_delete_count = 0 success_delete_count = 0 total_download_count = 0 success_download_count = 0 total_get_meta_count = 0 success_get_meta_count = 0 total_create_link_count = 0 success_create_link_count = 0 total_delete_link_count = 0 success_delete_link_count = 0 total_upload_bytes = 5524950 success_upload_bytes = 5524950 total_append_bytes = 0 success_append_bytes = 0 total_modify_bytes = 0 success_modify_bytes = 0 stotal_download_bytes = 0 success_download_bytes = 0 total_sync_in_bytes = 0 success_sync_in_bytes = 0 total_sync_out_bytes = 0 success_sync_out_bytes = 0 total_file_open_count = 42 success_file_open_count = 42 total_file_read_count = 0 success_file_read_count = 0 total_file_write_count = 42 success_file_write_count = 42 last_heart_beat_time = 2018-03-22 09:25:52 last_source_update = 2018-03-21 18:21:50 last_sync_update = 1970-01-01 08:00:00 last_synced_timestamp = 1970-01-01 08:00:00 (never synced) 请问该如何解决?
FastDFS上传成功之后浏览器无法访问
This is FastDFS client test program v5.05 Copyright (C) 2008, Happy Fish / YuQing FastDFS may be copied only under the terms of the GNU General Public License V3, which may be found in the FastDFS source kit. Please visit the FastDFS Home Page http://www.csource.org/ for more detail. [2016-12-14 01:53:16] DEBUG - base_path=/data/fastdfs, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0 tracker_query_storage_store_list_without_group: server 1. group_name=, ip_addr=192.168.204.128, port=23000 group_name=group1, ip_addr=192.168.204.128, port=23000 storage_upload_by_filename group_name=group1, remote_filename=M00/00/00/wKjMgFhRFoyALNTHAAvqH_kipG8640.jpg source ip address: 192.168.204.128 file timestamp=2016-12-14 01:53:16 file size=780831 file crc32=4179797103 example file url: http://192.168.204.128/group1/M00/00/00/wKjMgFhRFoyALNTHAAvqH_kipG8640.jpg storage_upload_slave_by_filename group_name=group1, remote_filename=M00/00/00/wKjMgFhRFoyALNTHAAvqH_kipG8640_big.jpg source ip address: 192.168.204.128 file timestamp=2016-12-14 01:53:16 file size=780831 file crc32=4179797103 example file url: http://192.168.204.128/group1/M00/00/00/wKjMgFhRFoyALNTHAAvqH_kipG8640_big.jpg 这个代表已经测试上传成功, 但是用浏览器访问地址,无法连接 防火墙也关闭了, 什么原因呢 example file url 两个地址代表什么意思
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); ```
为什么用python3.5调用fdfs_client时报错ImportError: No module named 'mutagen'?
在已经导入fdfs-client-py==1.2.6时,用python3.5调用fdfs_client时报错ImportError: No module named 'mutagen'? ``` from fdfs_client.client import Fdfs_client Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/python/FastDFS/fdfs_client-py-master/fdfs_client/client.py", line 11, in <module> from fdfs_client.tracker_client import * File "/home/python/FastDFS/fdfs_client-py-master/fdfs_client/tracker_client.py", line 17, in <module> from fdfs_client.utils import * File "/home/python/FastDFS/fdfs_client-py-master/fdfs_client/utils.py", line 8, in <module> from mutagen._compat import StringIO ImportError: No module named 'mutagen' >>> ```
文件上传服务器fastDfs的tracker服务器如何映射到外网?
例如文件上传服务器在一台服务器,有另外一台服务器的服务要上传文件,且不是在同一个网段。如何配置才能连接到tracker服务器?(就是外网也能访问到)
fastdfs python客户端fdfs_client_py上传从文件问题
有人用过fdfs的python 客户端fdfs_client_py上传文件吗?我的代码如下: ``` def upload_file(self,filePath=None,slaveFilePath=None): #upload the apk and the apk details html file into fastdfs storage #apk file as master file while html file as slave file if filePath is None: return None ret={} client=Fdfs_client(self.m_clientConf) result=client.upload_by_filename(filePath) #upload master file master_fileId='' if result is not None: #success self.m_logger.info(" save %s into fdfs success"%filePath) print " save %s into fdfs success"%filePath print result ret['storageIp']=result['Storage IP'] ret['groupName']=result['Group name'] ret['masterFileId']=result['Remote file_id'] master_fileId=result['Remote file_id'] print slaveFilePath,master_fileId if(slaveFilePath is not None): #upload slave file slave_res=client.upload_slave_by_filename(slaveFilePath,master_fileId,'-html') if slave_res is not None: #success self.m_logger.info(" save slave %s into fdfs success"%slaveFilePath) ret['slaveFileId']=slave_res['Remote file_id'] return ret #return the storage info ``` 但是老是报下面的错: ![图片说明](https://img-ask.csdn.net/upload/201511/18/1447835320_129196.jpg) 从文件老是上传不成功,但是主文件却上传成功了,当我直接指定主文件id来上传从文件时,从文件却可以上传成功,有人知道怎么解决么?
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了。
nginx fastdfs 配置后 上传成功 访问报404 求大神协助
nginx 配置 location /group1/M00 { root /home/fastdfs/data; ngx_fastdfs_module; } # the group name of the local storage server group_name=group1 # if the url / uri including the group name # set to false when uri like /M00/00/00/xxx # set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx # default value is false url_have_group_name = true # path(disk or mount point) count, default value is 1 # must same as storage.conf store_path_count=1 # store_path#, based 0, if store_path0 not exists, it's value is base_path # the paths must be exist # must same as storage.conf store_path0=/data/fastdfs #store_path1=/home/yuqing/fastdfs1
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
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,如果是这个问题请大家告诉我一下,在哪里修改。
fastdfs报错undefined reference to `g_exe_name'
make: Nothing to be done for `all'. cc -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -g -O -DDEBUG_FLAG -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 -L/usr/lib64 -lpthread -lfastcommon -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon /tmp/ccWmwyMo.o: In function `main': /home/centos/fastdfs-5.10/storage/fdfs_storaged.c:130: undefined reference to `g_exe_name' storage_dump.o: In function `fdfs_dump_global_vars': /home/centos/fastdfs-5.10/storage/storage_dump.c:36: undefined reference to `g_exe_name' collect2: error: ld returned 1 exit status make: *** [fdfs_storaged] Error 1 make: Nothing to be done for `all'.
windows环境下安装docker来搭建fastfds服务连接失败
问题描述: 在windows10的环境下,安装docker,基于docker来搭建fastfds服务,出现连接失败。 root@linuxkit-00155d052103:/# cd /fdfs_conf/ root@linuxkit-00155d052103:/fdfs_conf# fdfs_monitor storage.conf [2019-05-13 08:30:00] DEBUG - base_path=/fastdfs/storage, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0 server_count=1, server_index=0 [2019-05-13 08:30:01] ERROR - file: ../common/connection_pool.c, line: 84, connect to 172.16.5.40:22122 fail, errno: 111, error info: Connection refused storage.conf配置 tracker_server=172.16.5.40:22122 其中172.16.5.40:为windows(宿主机的)IP
fastDFS中的tracker服务器如何返回Storage服务器的外网地址?
就是我的fastDFS服务器和我的调用的服务器不在同一台机器上,且不是在同一网段, 我现在想要通过tracker服务器去查找对应的Storage服务器,且返回一个外网的地址 供服务访问?请问如何实现,需要配置什么参数?
有大佬知道吗,安装FastDFS运行tracker .conf 这种情况,小白求教!
![](https://img-ask.csdn.net/upload/201712/29/1514530296_473542.png)
fastdfs文件上传的问题
我用fastdfs上传了一张图片文件,但是fastdfs会给我产生两个文件(一个带有big,一个没带有big的文件),怎么解决这个问题,我只需要产生一张图片 ![图片说明](https://img-ask.csdn.net/upload/201901/11/1547137078_108005.png)
nginx+fastdfs报错conf file must have item
fastdfs安装配置没问题,使用fastdfs_test测试也能上传,但是安装完nginx及其module后启动nginx时 nginx错误显示:[2015-12-12 18:13:19] ERROR - file: ../storage/trunk_mgr/trunk_shared.c, line: 106, conf file must have item "store_path1"! 而浏览器也不能访问页面,显然是启动失败,敢问大家有经验吗,或是能猜出是什么问题,请指教
fastdfs python客户端下载文件问题
遇到一个很奇怪的问题,从服务端下载压缩文件的的时候,再用zipfile解压时,说格式错误,不是正确的压缩问价,而用Java下载文件又没有问题,什么情况 我的代码: client = Fdfs_client(self.m_clientConf) localFileName = os.path.join(config.apksPath,apkMd5 + '.apk'); down_status = client.download_to_file(localFileName,remoteUrl) 然后用ZipFile解压报错: Traceback (most recent call last): File "D:/Projects/PythonProjects/androguard/pliblyze.py", line 220, in mfMainOperate androguard = Androguard([options.input]) File "D:\Projects\PythonProjects\androguard\androguard\core\androgen.py", line 98, in __init__ self._analyze() File "D:\Projects\PythonProjects\androguard\androguard\core\androgen.py", line 112, in _analyze x = apk.APK( i ) File "D:\Projects\PythonProjects\androguard\androguard\core\bytecodes\apk.py", line 186, in __init__ self.zip = zipfile.ZipFile(StringIO.StringIO(self.__raw), mode=mode) File "D:\Python27\lib\zipfile.py", line 770, in __init__ self._RealGetContents() File "D:\Python27\lib\zipfile.py", line 811, in _RealGetContents raise BadZipfile, "File is not a zip file" BadZipfile: File is not a zip file
fastdfs storage集群访问 麻烦大家了
这两天搭建了一个fastdfs集群 有一个group1 里面有两个storage 192.168.2.101 和 192.168.2.102 上传文件成功 有个疑惑 如果想提供http请求 是不是group1中的两个storage都需要安装nginx呢 上传文件成功 可以http访问 手动删除了192.168.2.102中的文件 访问不到了 那么安装ngx_fastdfs_module模块的作用是什么呢 拜谢 抱拳
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
这30个CSS选择器,你必须熟记(上)
关注前端达人,与你共同进步CSS的魅力就是让我们前端工程师像设计师一样进行网页的设计,我们能轻而易举的改变颜色、布局、制作出漂亮的影音效果等等,我们只需要改几行代码,不需...
国产开源API网关项目进入Apache孵化器:APISIX
点击蓝色“程序猿DD”关注我回复“资源”获取独家整理的学习资料!近日,又有一个开源项目加入了这个Java开源界大名鼎鼎的Apache基金会,开始进行孵化器。项目名称:AP...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
编写Spring MVC控制器的14个技巧
本期目录 1.使用@Controller构造型 2.实现控制器接口 3.扩展AbstractController类 4.为处理程序方法指定URL映射 5.为处理程序方法指定HTTP请求方法 6.将请求参数映射到处理程序方法 7.返回模型和视图 8.将对象放入模型 9.处理程序方法中的重定向 10.处理表格提交和表格验证 11.处理文件上传 12.在控制器中自动装配业务类 ...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
求小姐姐抠图竟遭白眼?痛定思痛,我决定用 Python 自力更生!
点击蓝色“Python空间”关注我丫加个“星标”,每天一起快乐的学习大家好,我是 Rocky0429,一个刚恰完午饭,正在用刷网页浪费生命的蒟蒻...一堆堆无聊八卦信息的网页内容慢慢使我的双眼模糊,一个哈欠打出了三斤老泪,就在此时我看到了一张图片:是谁!是谁把我女朋友的照片放出来的!awsl!太好看了叭...等等,那个背景上的一堆鬼画符是什么鬼?!真是看不下去!叔叔婶婶能忍,隔壁老王的三姨妈的四表...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
相关热词 如何提升c#开发能力 矩阵乘法c# c#调用谷歌浏览器 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天
立即提问