fengshao0907 / weed-fs

Automatically exported from code.google.com/p/weed-fs
0 stars 0 forks source link

master on non-localhost #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm trying to have 3 nodes, being all a master with one volume, having 
replication and failover

So, first step, I tried the following on the first node:

weed server -ip=192.168.33.21 

where 192.168.33.21 is his external IP, since the 2 other nodes will need to 
have access to that master.
But somehow it seems that the volume always tries to find a master on 
localhost, instead of the external IP:

vagrant@vagrant-debian:~$ weed server -ip=192.168.33.21
I0420 21:24:53 03606 file_util.go:19] Folder /tmp Permission: -rwxrwxrwx
I0420 21:24:53 03606 file_util.go:19] Folder /tmp Permission: -rwxrwxrwx
I0420 21:24:53 03606 file_util.go:19] Folder /tmp/filer Permission: -rwx------
I0420 21:24:53 03606 topology.go:83] Using default configurations.
I0420 21:24:53 03606 master_server.go:57] Volume Size Limit is 30000 MB
I0420 21:24:53 03606 server.go:155] Start Weed Master 0.55 at port 
192.168.33.21:9333
I0420 21:24:53 03606 raft_server.go:97] Recovered from log
I0420 21:24:53 03606 store.go:237] Store started on dir: /tmp with 0 volumes 
max 7
I0420 21:24:53 03606 volume_server.go:72] store joined at 192.168.33.21:9333
I0420 21:24:53 03606 server.go:190] Start Weed volume server 0.55 at 
http://192.168.33.21:8080
I0420 21:24:53 03606 http_util.go:27] Post http://localhost:9333/dir/join: dial 
tcp 127.0.0.1:9333: connection refused

I also tried -ip=0.0.0.0 but this was worse: the script crashed, without any 
explicit message

I guess I'm missing something here ?

Thanks !

Original issue reported on code.google.com by ed.herd...@gmail.com on 20 Apr 2014 at 7:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The line shows it is trying to connect to localhost, while you have not 
supplied any information. This is because the cluster setup is "sticky". There 
are some configuration stored under /tmp/conf file.

I0420 21:24:53 03606 http_util.go:27] Post http://localhost:9333/dir/join dial 
tcp 127.0.0.1:9333: connection refused

Please clean the /tmp folder before changing the setup.

Original comment by chris...@gmail.com on 21 Apr 2014 at 5:41

GoogleCodeExporter commented 9 years ago
btw: This line also shows it is reusing previous logs for clustering setup.

Original comment by chris...@gmail.com on 21 Apr 2014 at 5:46

GoogleCodeExporter commented 9 years ago
You're right, it worked after cleaning the /tmp/conf file 

ps: is this written somewhere in the documentation ? It could be helpful to 
know which files/dirs we have to clean if we change the setup

Thanks for your quick answer !

Original comment by ed.herd...@gmail.com on 21 Apr 2014 at 3:51