Error When Reading /var/lib/ejabberd/.erlang.cookie
Looking for ejabberd docs? To access the most up-to-date ejabberd documentation, please visit docs.ejabberd.im » Error when reading /var/lib/ejabberd/spool/.erlang.cookie: eacces Submitted by arth on Sun, 2010-04-18 07:39 ejabberd Administration My ejabberd 2.1.3 server has been humming along nicely for a few days, when suddenly today I got disconnected from it, and I couldn't reconnect. So I restarted the server, but still couldn't connect. I did "service ejabberd status" to see if it was really running, and got this instead: {error_logger,{{2010,4,18},{1,21,8}},std_error,"File operation error: eacces. Target: /etc/ejabberd/inetrc. Function: get_file. Process: kernel_sup."}
{error_logger,{{2010,4,18},{1,21,8}},"inet_config: file ~s not found~n",["/etc/ejabberd/inetrc"]}
{error_logger,{{2010,4,18},{1,21,8}},{error,"Error when reading /var/lib/ejabberd/spool/.erlang.cookie: eacces"},[]}
{error_logger,{{2010,4,18},{1,21,8}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{{error,"Error when reading /var/lib/ejabberd/spool/.erlang.cookie: eacces"},[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.18.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,24},{reductions,366}],[]]}
{error_logger,{{2010,4,18},{1,21,8}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{{error,"Error when reading /var/lib/ejabberd/spool/.erlang.cookie: eacces"},[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{offender,[{pid,undefined},{name,auth},{mfa,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2010,4,18},{1,21,8}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error}
abdessemed mohamed amine ⋅ January 5, 2009 ⋅ 4 Comments Recently, I had the pleasant experience of setting up ejabberd on Centos 5, and because of this afternoon of grueling fun, I've decided to point out some not so obvious problems that you may run into. Ultimately, we're going to be running this chat service in a clustered environment, which should be even *more* fun I'm sure, but lets start with the basics. First of all, ejabberd is written in erlang, which is an extremely smart multi-threaded language, that is also extremely difficult to use https://www.ejabberd.im/node/4007 for the casual user. Because of this, everything you know about setting up and running normal services written in C usually doesn't apply… and this is exactly where it gets interesting! Before even installing ejabberd, make sure that the version of erlang you have is identical to the version that ejabberd was built against. If you don't, ejabberd is proven to eat babies at will, and https://aminesoft.wordpress.com/2009/01/05/ejabberd-setup-hints-and-pitfalls/ we can't have dead babies laying around on our operating system now can we. When I setup my install I wasn't able to find any erlang packages lying around for Centos 5, so I built the most recent version. A quick rpm search for ejabberd, however, had plenty of packages around the interwebs that were ready to go. While this is not the best practice anyways, I figured what the hell, why not just use my local erlang and the world built ejabberd. Well… I quickly found out why. [root@host ~]# /sbin/service ejabberd start Starting ejabberd: [ OK ] Ok, great! [root@host ~]# /usr/sbin/ejabberdctl status Node ejabberd@host is started. Status: started ejabberd is not running WTF. This is one of the great things about ejabberd, erlang, and init scripts. Just because the init script started the erlang service, that doesn't mean that ejabberd itself is running, only that erlang is ready to run it. Thankfully, you can startup ejabberd directly and save yourself the trouble of guessing what went wrong. You'll see a bunch of debug code, but this is what you're looking for:
[root@host ~]# /usr/sbin/ejabberdctl live =CRASH REPORT==== 20-Jun-2008::15:09:24 === crasher: pid: <0.118.0> registered_name: strina GitHub account Sign in Create https://gist.github.com/1751336 a gist now Instantly share code, notes, and snippets. Star 0 Fork 0 onlyshk/gist:1751336 Created Feb 6, 2012 Embed What https://bugzilla.redhat.com/show_bug.cgi?id=1163812 would you like to do? Embed Embed this gist in your website. Embed Share Copy sharable URL for this gist. error when Share Clone via HTTPS Clone with Git or checkout with SVN using the repository's web address. HTTPS Learn more about clone URLs Download ZIP Code Revisions 1 Raw gistfile1.txt sudo -u ejabberd /usr/sbin/ejabberdctl live mkdir: `/usr/var/lib/ejabberd': Отказано в доступе /usr/sbin/ejabberdctl: line error when reading 119: cd: /usr/var/lib/ejabberd: Это не каталог -------------------------------------------------------------------- IMPORTANT: ejabberd is going to start in LIVE (interactive) mode. All log messages will be shown in the command shell. You can interact with the ejabberd node if you know how to use it. Please be extremely cautious with your actions, and exit immediately if you are not completely sure. To exit this LIVE mode and stop ejabberd, press: q(). and press the Enter key -------------------------------------------------------------------- To bypass permanently this warning, add to ejabberdctl.cfg the line: EJABBERD_BYPASS_WARNINGS=true Press any key to continue {error_logger,{{2012,2,6},{5,20,28}},std_error,"File operation error: eacces. Target: /usr/etc/ejabberd/inetrc. Function: get_file. Process: kernel_sup."} {error_logger,{{2012,2,6},{5,20,28}},"inet_config: file ~s not found~n",["/usr/etc/ejabberd/inetrc"]} {error_logger,{{2012,2,6},{5,20,29}},{error,"Error when reading /usr/var/lib/ejabberd/.erlang.cookie: eacces"},[]} {error_logger,{{2012,2,6},{5,20,29}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.18.0>},{registered_name,[]},{error_info,{exit,{{error,"Error when reading /usr/var/lib/ejabberd/.erlang.cookie: eacces"},[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.16.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,24},{reductions,363}],[]]} {error_logger,{{2012,2,6},{5,20,29}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{{error,"Error when reading /usr/var/lib/ejabberd/.erlang.cookie: eacces"},[{auth,init_cookie,0},{auth,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{offender,[{pid,undefined},{name,auth},{mfargs,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]} {error_logger,{{2012,2,6},{5,20,29}},superv
Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. Bug1163812 - Cannot control ejabberd with ejabberdctl Summary: Cannot control ejabberd with ejabberdctl Status: NEW Aliases: None Product: Fedora Classification: Fedora Component: ejabberd (Show other bugs) Sub Component: --- Version: 25 Hardware: Unspecified Unspecified Priority unspecified Severity unspecified TargetMilestone: --- TargetRelease: --- Assigned To: Peter Lemenkov QA Contact: Fedora Extras Quality Assurance Docs Contact: URL: Whiteboard: Keywords: Depends On: Blocks: Show dependency tree /graph Reported: 2014-11-13 09:09 EST by Juan Orti Modified: 2016-09-07 16:57 EDT (History) CC List: 13 users (show) cds chrissharp09 cjs erlang frederik+fedora jerry jkaluza lemenkov martin pwouters randy russ+bugzilla-redhat samuel-rhbugs See Also: Fixed In Version: Doc Type: Bug Fix Doc Text: Story Points: --- Clone Of: Environment: Last Closed: Type: Bug Regression: --- Mount Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) ejabberd-ejabberdctl-fix.patch (506 bytes, patch) 2015-05-13 11:24 EDT, Frederik Holden no flags Details | Diff Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description Juan Orti 2014-11-13 09:09:23 EST Description of problem: After a clean install of ejabberd in Fedora 21, I cannot use the ejabberdctl utility to register users, etc. I run: # ejabberdctl register admin localhost password Failed RPC connection to the node ejabberd@localhost: nodedown Commands to start an ejabberd node: start Start an ejabberd node in server mode debug Attach an interactive Erlang shell to a running ejabberd node live Start an ejabberd node in live (interactive) mode Optional parameters when starting an ejabberd node: --config-dir dir Config ejabberd: /etc/ejabberd --config file Config ejabberd: /etc/ejabberd/ejabberd.yml --ctl-config file Config ejabberdctl: /etc/ejabberd/ejabberdctl.cfg --logs dir Directory for logs: /var/log/ejabberd --spool dir Database spool dir: /var/lib/ejabberd --node nodename ejabberd node name: ejabberd@localhost And I see this in the log /var/log/ejabberd/ejabberd.log: 2014-11-13 14:57:30.188 [info] <0.7.0> Application lager started on node ejabberd@localhost 2014-11-13 14:57:30.257 [info] <0.7.0> Application sasl started on node ejabberd@localhost 2014-11-1