'전체 글'에 해당되는 글 93건

1. If you didn't open required ports,
    please check https://stackoverflow.com/questions/36862874/erlang-ejabberd-join-cluster-error-no-ping
    FIREWALL_WINDOW=4200-4210  in ejabberdctl.cfg setting is mandatory.


2. You already opened all required ports, but you are getting no_ping error,
    set hosts config. /etc/hosts -> add your ejabbered node hostname. (in my case, node1, node2)

ex)
...
node1    10.0.100.1
node2    10.0.100.2

How to set ejabberd cluster. step by setp

1. ejabberd.yml -> use same file config
2. ejabberdctl.cfg ->
  use same all but
  ERLANG_NODE=ejabberd@each-node-hostname
  FIREWALL_WINDOW=4200-4210

3. add node1, node2 on /etc/hosts
4. node1) ejabberdctl start
5. node2) ejabberdctl start
6. node2) ejabberdctl --no-timeout join_cluster 'ejabberd@node1'



'ejabberd' 카테고리의 다른 글

How to configure ejabberd web admin  (0) 2018.07.25
mod_pottymouth  (0) 2018.07.11
블로그 이미지

시간을 거스르는자

,

mod_pottymouth

ejabberd 2018. 7. 11. 17:06

It can be difficultly installed with https://github.com/processone/ejabberd-contrib/tree/master/mod_pottymouth


Instructions

mkdir -p $EJABBERD_HOME/erlang-lib/bitarray
cd $EJABBERD_HOME/erlang-lib/bitarray
clone https://github.com/ferd/bitarray git repo
run: /usr/lib/erlang/bin/escript rebar get-deps
run: /usr/lib/erlang/bin/escript rebar compile
run: /usr/bin/install -c -d /usr/local/lib/bitarray-1.0.0/ebin
run: /usr/bin/install -c -d /usr/local/lib/bitarray-1.0.0/priv
run: /usr/bin/install -c -m 644 ./ebin/bitarray.app /usr/local/lib/bitarray-1.0.0/ebin/bitarray.app
run: /usr/bin/install -c -m 644 ./ebin/bitarray.beam /usr/local/lib/bitarray-1.0.0/ebin/bitarray.beam 
run: /usr/bin/install -c -m 644 ./priv/bitarray.so /usr/local/lib/bitarray-1.0.0/priv/bitarray.so

What is $EJABBERD_HOME? default may be ~/ folder.
So, export EJABBERD_HOME=/user/yourhome
in bittarray/rebar.conf, change proper version 1.0 -> 1.2

And Let's get mod_pottymouth

mkdir -n ~/.ejabberd-modules/sources cd ~/.ejabberd-modules/sources git clone https://github.com/processone/ejabberd-contrib.git cd mod_pottymouth make sure ejabberd is running run: ejabberdctl module_install mod_pottymouth run: ejabberdctl restart module will be installed in: ~/.ejabberd-modules/mod_pottymouth

May be you cannot module_install mod_pottymouth

1. remove -include("ejabberd.hrl"). line of mod_pottymouth.erl

2. add this. end of mod_pottymouth.erl

mod_options(_) -> [{blacklists, []}, {charmaps, []}].

3. add this. end of mod_pottymouth.erl -export([ here]) 

mod_options/1


After this module_install mod_pottymouth will be work.

I created pull request about this. 
https://github.com/processone/ejabberd-contrib/pull/253

'ejabberd' 카테고리의 다른 글

How to configure ejabberd web admin  (0) 2018.07.25
[solution] ejabberd join_cluster no_ping error  (0) 2018.07.25
블로그 이미지

시간을 거스르는자

,

고루틴의 CS 시점

시스템 콜이 발생하면 고루틴의 CS가 이루어진다는 것을 알았습니다. 그러면 정확히 어느 시점에서 고루틴의 CS가 이루어질까요? 고루틴의 CS는 다음 시점에서 이루어집니다:

  • unbuffered 채널에 접근할 때(읽거나 쓸 때)
  • 시스템 I/O가 발생했을 때
  • 메모리가 할당되었을 때
  • time.Sleep() 코드 실행(python asyncio에서 asyncio.sleep()을 이용해 yield하는 것과 유사합니다)
  • runtime.Gosched() 코드 실행

https://tech.ssut.me/2017/08/20/goroutine-vs-threads/

'Go' 카테고리의 다른 글

How to run go app in heroku by your own project (with github)  (0) 2017.02.24
LITE IDE setup  (0) 2015.01.28
cannot download, $GOPATH not set  (0) 2015.01.28
블로그 이미지

시간을 거스르는자

,