ejabberd - Comments for "badarg, [{ets, lookup, [crypto_server_table, port]}," https://www.ejabberd.im/badarg_crypto_server en I found a solution for my system - might work for some of you https://www.ejabberd.im/badarg_crypto_server#comment-51936 <p>Hey folks,</p> <p>I ran into this read error problem when installing (from source) ejabberd 2.0.0 on a RHEL 5 64bit Dell PowerEdge 1950.</p> <p>Dell PowerEdge 1950<br /> RHEL 5<br /> Erlang R11B-5 (compiled from source)<br /> expat 2.01 (compiled from source)<br /> ejabberd 2.0.0 (compiled from source)<br /> gcc 4.1</p> <p>My old server was a 32bit desktop system that I was able to use a install package on. With our new 64bit server I was unable to find one that would work so I set about building from source.</p> <p>What I found was an issue with compiling erlang with the defaults. I did NOT have to uninstall anything. I had to rebuild and install erlang. </p> <p>From within my existing erlang src directory I entered the following commands:</p> <div class="codeblock"><code>./configure<br />make</code></div> <p>Then I navigated to: %ERL_TOP%/lib/crypto/c_src<br /> and entered this command: </p> <div class="codeblock"><code>gcc -shared&nbsp; -o ../priv/lib/x86_64-unknown-linux-gnu/crypto_drv.so ../priv/obj/x86_64-unknown-linux-gnu/crypto_drv.o /usr/lib64/libcrypto.so</code></div> <p>After this I moved back to the root of my erlang source folder and entered:</p> <div class="codeblock"><code>make install</code></div> <p>After this all I had to do was stop, and then start my ejabberd server and all was well with the world. I found the reference to this fix here:<br /> <noindex><a href="http://www.erlang.org/pipermail/erlang-patches/2007-November/000196.html" title="http://www.erlang.org/pipermail/erlang-patches/2007-November/000196.html" rel="nofollow" >http://www.erlang.org/pipermail/erlang-patches/2007-November/000196.html</a></noindex></p> <p>Hope this helps anyone else who may encounter this issue. Keep up the good work fellas!</p> <p>Peace<br /> Ross</p> Tue, 04 Mar 2008 23:35:29 +0000 Ross Hansen comment 51936 at https://www.ejabberd.im Hi, I've had the same https://www.ejabberd.im/badarg_crypto_server#comment-26157 <p>Hi,<br /> I've had the same problem but following workaround seems to work:<br /> I don't know why but when i strace the erlang shell while starting crypto() i<br /> see it searching for libcrypto.so.0.9.8 in lib/linux-x86 but the installer came with<br /> libcrypto.so.0.9.7, after symlinking libcrypto.so.0.9.7 to libcrypto.so.0.9.8 crypto() started<br /> without any other problems. Ejabberd also seems to work now.</p> <p>Regards.</p> Wed, 04 Jul 2007 17:40:40 +0000 Tom de Waha comment 26157 at https://www.ejabberd.im Can't resolve this problem on Ubuntu6.1 https://www.ejabberd.im/badarg_crypto_server#comment-5076 <p>Hi.. I'm having this same symptom... I've tried symlinking the libssl and libcryto .so files into /usr/local/lib... I've tried renaming those symlinks as libssl.so and libcrypto.so explicitly, instead of the long version names of the actual libs... I've tried reinstalling ejabberd after doing all that... still PSI cannot log in while Spark can... what can this mean?</p> Mon, 28 May 2007 04:45:04 +0000 Anonymous comment 5076 at https://www.ejabberd.im crypto_drv.so https://www.ejabberd.im/badarg_crypto_server#comment-3450 <p>I had this problem today, and solved it with some tinkering.</p> <p>I would guess this will only occur if the crypto server could not be started. To test this open an erlang shell and start the crypto server. You do this by entering "crypto:start()." without the quotation. If the crypto server can not be started this should yield alot of error messages when the server tries to start multiple times.</p> <p>You can try loading the file like the crypto_server does. In crypto-1.5 it's done something like this:</p> <div class="quote-msg"> <div class="quote-author"><em>crypto_server:init/0</em> wrote:</div> <p> erl_ddll:start(),<br /> PrivDir = code:priv_dir(crypto),<br /> LibDir1 = filename:join([PrivDir, "lib"]),<br /> erl_ddll:load_driver(LibDir1, crypto_drv).</p></div> <p>erl_ddll:load_driver() returns ok on success and {error,Reason} on fail. The crypto_server tries with a different path after the first fail, but has no error handling for an error during this second load and just tries to run with it regardless of the outcome.</p> <p>Among the error messages printed you will get a line, "sh: exec: crypto_drv not found", or something of the like. I've seen different versions of this error message on different platforms. One reason for this, and the reason my crypto server would not start, is that the crypto_server could not load crypto_drv.so because it's not linked properly. The file should be located in your erlang lib, under crypto-/priv/lib/, or something similar.</p> <p>If this file exists, it's quite possible that the path it tries to find ssl libs for dynamic loading is wrong. I had to rebuild my crypto_drv.so file from the priv/obj folder with my Makefile's SO_SSL_LIBDIR variable changed to correspond to the location of my libssl.so and libcrypto.so files. Another way to fix this could be to symlink or copy the corresponding libssl.so and libcrypto.so files to /usr/local/lib, which I think is the default path to look for them.</p> <p>If you have this error and this solution fixes it, you may also have some trouble with your lib/ssl-/priv/bin/ssl_esock file's dynamic library loading. Rebuilding this file, or copying or symlinking the lib files to /usr/local/lib might solve this issue too.</p> <p>/Zxinn</p> Fri, 30 Mar 2007 11:58:04 +0000 Zxinn comment 3450 at https://www.ejabberd.im