Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filer.copy error with weed filer setup with redis&cassandra #603

Closed
zhashuyu opened this issue Nov 25, 2017 · 9 comments
Closed

filer.copy error with weed filer setup with redis&cassandra #603

zhashuyu opened this issue Nov 25, 2017 · 9 comments

Comments

@zhashuyu
Copy link

Question

I setup seaweedfs filer with cassandra, I can upload file to seaweedfs by command curl ,but when I use filer.copy to upload lots of files , I got errors, see bellow. I got the same result when using redis.

test with curl

# curl -F "file=@/etc/resolv.conf" "http://10.110.200.37:8888/abc/def/"
{"name":"resolv.conf","size":74,"fid":"2,3d185d9b1b","url":"http://10.110.200.175:9080/2,3d185

test with filer.copy
BTW when I use the id (2,3e6e533926) from command filer.copy, seaweedfs cluster got file actually.

# weed filer.copy -master 10.110.200.175:9333 /root/ceph-cluster http://10.110.200.37:8888/1011020037/etc/
Failed to register file /root/ceph-cluster/ceph-deploy-ceph.log on 10.110.200.37:8888: Failed to register path:/1011020037/etc/ceph-cluster/ceph-deploy-ceph.log on filer:10.110.200.37:8888 to file id:2,3e6e533926
Example: weed filer.copy file_or_dir1 [file_or_dir2 file_or_dir3] http://localhost:8888/path/to/a/folder/
Default Usage:
  -collection string
    	optional collection name
......
[root@ceph-adm ~]# curl http://10.110.200.175:9333/2,3e6e533926
<a href="http://10.110.200.177:9080/2,3e6e533926">Moved Permanently</a>.

[root@ceph-adm ~]# curl http://10.110.200.175:9333/**2,3e6e533926** -L
[2017-03-04 14:34:42,315][ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[2017-03-04 14:34:42,316][ceph_deploy.cli][INFO  ] Invoked (1.5.37): /usr/bin/ceph-deploy new ceph-mon1.skyinno.com ceph-mon2.skyinno.com ceph-mon3.skyinno.com
[2017-03-04 14:34:42,316][ceph_deploy.cli][INFO  ] ceph-deploy options:
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  username                      : None
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  func                          : <function new at 0x1422410>
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  verbose                       : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  overwrite_conf                : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  quiet                         : False
......

version

OS: centos7 latest
seaweedfs: 0.76
cassandra: 3.11.1
redis: 3.2.1

Setup

seaweedfs cluster

  • node1 10.110.200.175
# /usr/bin/weed -log_dir=/weed/master/log master -defaultReplication=020 -port=9333 -mdir=/weed/master/mdir -ip=10.110.200.175
# /usr/bin/weed -log_dir=/weed/volume1/log volume -port=9080 -dir=/weed/volume1/dir -mserver=10.110.200.175:9333 -ip=10.110.200.175 -dataCenter=dc1 -rack=rack1
  • node2 10.110.200.176
# /usr/bin/weed -log_dir=/weed/master/log master -defaultReplication=020 -port=9333 -mdir=/weed/master/mdir -ip=10.110.200.176 -peers=10.110.200.175:9333
# /usr/bin/weed -log_dir=/weed/volume1/log volume -port=9080 -dir=/weed/volume1/dir -mserver=10.110.200.175:9333 -ip=10.110.200.176 -dataCenter=dc1 -rack=rack2
  • node3 10.110.200.177
# /usr/bin/weed -log_dir=/weed/master/log master -defaultReplication=020 -port=9333 -mdir=/weed/master/mdir -ip=10.110.200.177 -peers=10.110.200.175:9333
# /usr/bin/weed -log_dir=/weed/volume1/log volume -port=9080 -dir=/weed/volume1/dir -mserver=10.110.200.175:9333 -ip=10.110.200.177 -dataCenter=dc1 -rack=rack3

cassandra

follow this https://www.howtoforge.com/tutorial/how-to-install-apache-cassandra-on-centos-7/

filer

  • filer 10.110.200.37
# weed -log_dir=/weed/filer/log filer -dir=/weed/filer/dir -master=10.110.200.175:9333 -ip=10.110.200.37 -port=8888 -defaultReplicaPlacement=020 -cassandra.server=127.0.0.1
chrislusf added a commit that referenced this issue Nov 25, 2017
display the error message for debugging
#603
@chrislusf
Copy link
Collaborator

chrislusf commented Nov 25, 2017

I added debug message in this commit. 97f757c

Please use it to see what the error is.

@zhashuyu
Copy link
Author

I still find no useful info, this is result from weed filer with cassandra config:

  • filer
# /usr/bin/weed -log_dir=/weed/filer/log filer -dir=/weed/filer/dir -master=10.110.200.175:9333 -ip=10.110.200.37 -port=8888 -defaultReplicaPlacement=020 -cassandra.server=127.0.0.1
I1127 13:41:57 27540 file_util.go:20] Folder /weed/filer/dir Permission: -rwxr-xr-x
I1127 13:41:57 27540 filer.go:129] Start Seaweed Filer 0.76 at port 8888
I1127 13:41:57 27540 filer_server.go:122] Filer server bootstraps with master 10.110.200.175:9333
I1127 13:42:41 27540 filer_server_handlers_write.go:77] failing to find path in filer store /admin/register No file id found for /admin/register
  • file.copy
# weed filer.copy -master 10.110.200.175:9333 /root/ceph-cluster http://10.110.200.37:8888/1011020037/etc/
Failed to register file /root/ceph-cluster/ceph-deploy-ceph.log on 10.110.200.37:8888: Failed to register path /1011020037/etc/ceph-cluster/ceph-deploy-ceph.log on filer 10.110.200.37:8888 to file id 3,3fc280ec1b : http://10.110.200.37:8888/admin/register: 500 Internal Server Error
Example: weed filer.copy file_or_dir1 [file_or_dir2 file_or_dir3] http://localhost:8888/path/to/a/folder/
Default Usage:
  -collection string
    	optional collection name
......
  • curl
# curl http://10.110.200.175:9333/3,3fc280ec1b -L | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    74  100    74    0     0  89156      0 --:--:-- --:--:-- --:--:-- 74000
[2017-03-04 14:34:42,315][ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[2017-03-04 14:34:42,316][ceph_deploy.cli][INFO  ] Invoked (1.5.37): /usr/bin/ceph-deploy new ceph-mon1.skyinno.com ceph-mon2.skyinno.com ceph-mon3.skyinno.com
[2017-03-04 14:34:42,316][ceph_deploy.cli][INFO  ] ceph-deploy options:
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  username                      : None
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  func                          : <function new at 0x1422410>
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  verbose                       : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  overwrite_conf                : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  quiet                         : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  cd_conf                       : <ceph_deploy.conf.cephdeploy.Conf instance at 0x1493878>
[2017-03-04 14:34:42,318][ceph_deploy.cli][INFO  ]  cluster                       : ceph
......

And this is from weed filer with redis config:

  • filer
# /usr/bin/weed -log_dir=/weed/filer/log filer -dir=/weed/filer/dir -master=10.110.200.175:9333 -ip=10.110.200.37 -port=8888 -defaultReplicaPlacement=020 -redis.server=127.0.0.1:6379
I1127 13:50:21 27623 file_util.go:20] Folder /weed/filer/dir Permission: -rwxr-xr-x
I1127 13:50:21 27623 filer.go:129] Start Seaweed Filer 0.76 at port 8888
I1127 13:50:21 27623 filer_server.go:122] Filer server bootstraps with master 10.110.200.175:9333
  • file.copy
# weed filer.copy -master 10.110.200.175:9333 /root/ceph-cluster http://10.110.200.37:8888/1011020037/etc/
Failed to register file /root/ceph-cluster/ceph-deploy-ceph.log on 10.110.200.37:8888: Failed to register path /1011020037/etc/ceph-cluster/ceph-deploy-ceph.log on filer 10.110.200.37:8888 to file id 2,41365ee401 : http://10.110.200.37:8888/admin/register: 404 Not Found
Example: weed filer.copy file_or_dir1 [file_or_dir2 file_or_dir3] http://localhost:8888/path/to/a/folder/
Default Usage:
  -collection string
......
  • curl
# curl http://10.110.200.175:9333/2,41365ee401 -L | head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    74  100    74    0     0  97368      0 --:--:-- --:--:-- --:--:-- 74000
[2017-03-04 14:34:42,315][ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[2017-03-04 14:34:42,316][ceph_deploy.cli][INFO  ] Invoked (1.5.37): /usr/bin/ceph-deploy new ceph-mon1.skyinno.com ceph-mon2.skyinno.com ceph-mon3.skyinno.com
[2017-03-04 14:34:42,316][ceph_deploy.cli][INFO  ] ceph-deploy options:
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  username                      : None
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  func                          : <function new at 0x1422410>
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  verbose                       : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  overwrite_conf                : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  quiet                         : False
[2017-03-04 14:34:42,317][ceph_deploy.cli][INFO  ]  cd_conf                       : <ceph_deploy.conf.cephdeploy.Conf instance at 0x1493878>
[2017-03-04 14:34:42,318][ceph_deploy.cli][INFO  ]  cluster                       : ceph
......

@chrislusf
Copy link
Collaborator

chrislusf commented Nov 27, 2017 via email

@zhashuyu
Copy link
Author

I try this one by one, it still report error

  • filer.copy to normal directory
# weed filer.copy -master 10.110.200.175:9333 /root/ceph-cluster http://10.110.200.37:8888/abc/def
Failed to register file /root/ceph-cluster/ceph-deploy-ceph.log on 10.110.200.37:8888: Failed to register path /abc/def/ceph-cluster/ceph-deploy-ceph.log on filer 10.110.200.37:8888 to file id 3,5822af9044 : http://10.110.200.37:8888/admin/register: 404 Not Found
......
  • filer.copy to /admin/register
# weed filer.copy -master 10.110.200.175:9333 /root/ceph-cluster http://10.110.200.37:8888/admin/register
Failed to register file /root/ceph-cluster/ceph-deploy-ceph.log on 10.110.200.37:8888: Failed to register path /admin/register/ceph-cluster/ceph-deploy-ceph.log on filer 10.110.200.37:8888 to file id 1,59b68874c8 : http://10.110.200.37:8888/admin/register: 404 Not Found
......
  • curl to /admin/register
# curl -F "file=@/etc/resolv.conf" "http://10.110.200.37:8888/admin/register"
{"name":"resolv.conf","size":74,"fid":"1,5a22311790","url":"http://10.110.200.175:9080/1,5a22311790"}
# curl -v -L http://10.110.200.175:9080/1,5a22311790
* About to connect() to 10.110.200.175 port 9080 (#0)
*   Trying 10.110.200.175...
* Connected to 10.110.200.175 (10.110.200.175) port 9080 (#0)
> GET /1,5a22311790 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 10.110.200.175:9080
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Date: Tue, 28 Nov 2017 01:29:49 GMT
< Content-Length: 0
< Content-Type: text/plain; charset=utf-8
< 
* Connection #0 to host 10.110.200.175 left intact
  • filer.copy to normal directory again
# weed filer.copy -master 10.110.200.175:9333 /root/ceph-cluster http://10.110.200.37:8888/abc/def
Copy /root/ceph-cluster/ceph-deploy-ceph.log => http://10.110.200.37:8888/abc/def/ceph-cluster/ceph-deploy-ceph.log
Copy /root/ceph-cluster/ceph.bootstrap-mds.keyring => http://10.110.200.37:8888/abc/def/ceph-cluster/ceph.bootstrap-mds.keyring
Copy /root/ceph-cluster/ceph.bootstrap-osd.keyring => http://10.110.200.37:8888/abc/def/ceph-cluster/ceph.bootstrap-osd.keyring
Copy /root/ceph-cluster/ceph.bootstrap-rgw.keyring => http://10.110.200.37:8888/abc/def/ceph-cluster/ceph.bootstrap-rgw.keyring
Copy /root/ceph-cluster/ceph.client.admin.keyring => http://10.110.200.37:8888/abc/def/ceph-cluster/ceph.client.admin.keyring
Copy /root/ceph-cluster/ceph.conf => http://10.110.200.37:8888/abc/def/ceph-cluster/ceph.conf
Copy /root/ceph-cluster/ceph.mon.keyring => http://10.110.200.37:8888/abc/def/ceph-cluster/ceph.mon.keyring
# curl -v -L http://10.110.200.37:8888/abc/def/ceph-cluster/ceph.bootstrap-osd.keyring
* About to connect() to 10.110.200.37 port 8888 (#0)
*   Trying 10.110.200.37...
* Connected to 10.110.200.37 (10.110.200.37) port 8888 (#0)
> GET /abc/def/ceph-cluster/ceph.bootstrap-osd.keyring HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 10.110.200.37:8888
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Date: Tue, 28 Nov 2017 01:29:19 GMT
< Content-Length: 0
< Content-Type: text/plain; charset=utf-8
< 
* Connection #0 to host 10.110.200.37 left intact
  • filer.copy to /admin/register again
# weed filer.copy -master 10.110.200.175:9333 /root/ceph-cluster http://10.110.200.37:8888/admin/register
Copy /root/ceph-cluster/ceph-deploy-ceph.log => http://10.110.200.37:8888/admin/register/ceph-cluster/ceph-deploy-ceph.log
Copy /root/ceph-cluster/ceph.bootstrap-mds.keyring => http://10.110.200.37:8888/admin/register/ceph-cluster/ceph.bootstrap-mds.keyring
Copy /root/ceph-cluster/ceph.bootstrap-osd.keyring => http://10.110.200.37:8888/admin/register/ceph-cluster/ceph.bootstrap-osd.keyring
Copy /root/ceph-cluster/ceph.bootstrap-rgw.keyring => http://10.110.200.37:8888/admin/register/ceph-cluster/ceph.bootstrap-rgw.keyring
Copy /root/ceph-cluster/ceph.client.admin.keyring => http://10.110.200.37:8888/admin/register/ceph-cluster/ceph.client.admin.keyring
Copy /root/ceph-cluster/ceph.conf => http://10.110.200.37:8888/admin/register/ceph-cluster/ceph.conf
Copy /root/ceph-cluster/ceph.mon.keyring => http://10.110.200.37:8888/admin/register/ceph-cluster/ceph.mon.keyring
# curl -v -L http://10.110.200.37:8888/admin/register/ceph-cluster/ceph.bootstrap-mds.keyring
* About to connect() to 10.110.200.37 port 8888 (#0)
*   Trying 10.110.200.37...
* Connected to 10.110.200.37 (10.110.200.37) port 8888 (#0)
> GET /admin/register/ceph-cluster/ceph.bootstrap-mds.keyring HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 10.110.200.37:8888
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Date: Tue, 28 Nov 2017 01:28:22 GMT
< Content-Length: 0
< Content-Type: text/plain; charset=utf-8
< 
* Connection #0 to host 10.110.200.37 left intact

@chrislusf
Copy link
Collaborator

chrislusf commented Nov 28, 2017

Please read this section: https://github.com/chrislusf/seaweedfs/blob/97f757c669ff52d6149138ee5c21f1b6c17bd59a/weed/operation/filer/register.go#L28

And use curl to send a http request with the path and fileId parameter
to http://10.110.200.37:8888/admin/register and see what happened on the
filer server.

@suze521
Copy link

suze521 commented Feb 27, 2018

i have this problom too....

@chrislusf
Copy link
Collaborator

@suze521 need to know how to reproduce this with step by step details.

@suze521
Copy link

suze521 commented Feb 27, 2018

@chrislusf
下面是我启动命令 都是单机
./weed server -dir=./3 -master.port=9333 -volume.port=8083 -volume.cache.enable -ip.bind 0.0.0.0
./weed volume -dir=./4 -port=8084 -cache.enable
./weed volume -dir=./5 -port=8085 -cache.enable
./weed filer -redis.server=10.5.237.59:6379
然后导入命令
./weed filer.copy /data/mbtiles/100/ http://localhost:8888
Failed to register file /data/mbtiles/100//0/0/0.pbf on localhost:8888: Failed to register path:/100/0/0/0.pbf on filer:localhost:8888 to file id:1,028be5aca1
出错

@chrislusf
Copy link
Collaborator

thanks for the reproduce details. please check whether the commit fixed your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants