When i was installing Ejabberd, it gave an error saying it wasnt installed successfully. But then i have the folder my-ejabberd with all the folders in it.
I am not sure if thats 100% installed, but when i try to start up the server, with the command line sbin/ejabberdctl start, it says No such file or directory. I am running on Mac OS 10.8.5.
Not sure what the problem is. Any Ideas?
Edit
This is the error from Terminal
bin/ejabberdctl: line 24: getent: command not found
/Users/clark/my-ejabberd/bin/erl: line 35: /Applications/my-ejabberd/bin/erlexec: No such file or directory
Edit:
If you have installed the ejabberd with source code then ejabberdctl will be sbin folder. If installed from source code, follow this:
$ cd /path/to/my-ejabberd
$ sbin/ejabberdctl start
$ sbin/ejabberdctl status
The node ejabberd#localhost is started with status: started
ejabberd 15.06.21 is running in that node
If you have installed with binary installer, then you will see the ejabberdctl in bin folder. And also you see start, stop and some other commands. If you did this, then follow
$ cd /path/to/my-ejabberd
$ cd bin
$ ./ejabberdctl start
$ ./ejabberdctl status
The node ejabberd#localhost is started with status: started
ejabberd 15.06.21 is running in that node
If you see the node is starting, then the ejabberd is running successfully. If you want you can check http://localhost:5280/admin for the ejabberd admin panel interface. To access this admin panel you need to register a user and give admin access in the ejabberd configuration file as:
// If installed from source code
$ sbin/ejabberdctl register username localhost password
// If installed from binary installer
$ ./ejabberdctl register username localhost password
Then open the ejabberd configuration file (ejabberd.yml) and add username under the admin as:
acl:
admin:
- "username": "localhost"
Now restart the server or stop and start the server and open the admin panel. Give username and password then you can access the admin panel.
In my particular case installing with .dmg i found using find / -name ejabberdctl in terminal and result /Applications/ejabberd.xx.x/bin/ejabberdctl
Related
I'm trying to install MySQL(pure) on Arch Linux so I downloaded the following file from https://dev.mysql.com/downloads/mysql/.
mysql-8.0.26-linux-glibc2.17-x86_64-minimal-rebuild.tar.xz
I extracted it and tried to run ./mysql_secure_installation but after I enter the root password I get the following error message:
[rob#archrob bin]$ sudo ./mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
How can I fix this?
I tried to download it from AUR repository too but when I run the makepkg -si it get a point of the installation it looks like will take forever.
Build files have benn written to /home/rob/mysql/src/build
[0%] Built target INFO_BIN
[0%] built target abi_check
[0%] built target INFO_SRC
[0%] Building CXX object extra/protobuf...
[0%] and so on...
After one hour it was at [22%] so I stopped the installation and tried from the official website.
You'll need to start mariadb before running mysql_secure_installation:
$ sudo systemctl start mariadb.service
I started working on ejabberd recently and ran into a problem while connecting with mysql.
I had installed ejabberd using the command line on Ubuntu - sudo apt-get install ejabberd
I had referenced the following tutorial for setting up ejabberd - Install ejabberd on Ubuntu
Now, in order to connect to Mysql I have done the following changes in ejabberd.yml -
auth_method: odbc
odbc_type: mysql
odbc_server: "localhost"
odbc_database: "ejabberd"
odbc_username: "ejabberd"
odbc_password: "password"
##
## If you want to specify the port:
odbc_port: 3306
But on restarting the service, I get this error
[critical] <0.38.0>#ejabberd:exit_or_halt:133 failed to start application 'p1_mysql': {error,
{"no such file or directory",
"p1_mysql.app"}}
I saw a few links where it was mentioned to use ./configure --enable-odbc --enable-mysql to solve this issue(works when you install ejabberd by compiling the source), but since I have not compiled the source code to install ejabberd (like I mentioned above), I am unable to do this. How do I solve this issue. Thanks in advance.
To use ejabberd with Mysql in Ubuntu you need to install the erlang-p1-mysql package:
sudo apt install erlang-p1-mysql
I had the same issue and that solved it.
Compile it from source and put resulting p1_mysql* files in the installed ejabberd's ebin directory, e.g.:
$ ./configure --enable-mysql
$ make
$ cp deps/p1_mysql/ebin/* /path/to/running/ejabberd/ebin/
I am trying to connect with ejabberd server with following command
# ejabberdctl start
but, it gives me below error.
Failed RPC connection to the node ejabberd#localhost: nodedown
Please help me to figure out this. thank you
first you have to check the service, terminal code below.
ps aux | grep ejabberd
if any unwanted servicer running kill that,terminal code below.
eg.
kill 14056
and stop the ejabberd service ,terminal code below.
ejabberdctl stop
or
/sbin/ejabberdctl stop
close the terminal and reopen terminal and start the ejabberd service,terminal code below.
ejabberdctl start
or
/sbin/ejabberdctl start
you have to change your directory to the folder which contains ejabberdctl file:
cd /Applications/ejabberd/bin
Then you have to use this code to start ejabberd:
./ejabberdctl start
you can also use this to see the status of your ejabberd server:
./ejabberdctl status
first check if service is running or no then ./ejabberdctl start. If you still have errors you should post your log because I can't see what is happening on your machine
Following the instructions at https://github.com/processone/ejabberd-contrib I try running:
ejabberdctl module_install ejabberd_auth_http
But the response I get is:
Error: not available
Do I need to download the module to a specific place in the ejabberd install path for this to work, or is there some other step missing?
I tried the following sequence on ejabberd and it seems at least to install:
Make sure ejabberd is started
$ ./ejabberdctl start
Download the list of available modules:
$ ./ejabberdctl modules_update_specs
Check available modules:
$ ./ejabberdctl modules_available
Install the module:
$ ./ejabberdctl module_install ejabberd_auth_http
src/ejabberd_auth_http.erl:11: Warning: behaviour ejabberd_gen_auth undefined
ok
From there you should be able to configure it and restart ejabberd.
Reference: Easy installer and structure for ejabberd contributed modules
i am trying to setup mysql-proxy on ubuntu on amazon ec2
i have done following:
sudo apt-get install mysql-proxy --yes
vi /etc/default/mysql-proxy
i put following content on "/etc/default/mysql-proxy"
ENABLED="true"
OPTIONS="--proxy-lua-script=/usr/share/mysql-proxy/rw-splitting.lua
--proxy-address=127.0.0.1:3306
--proxy-backend-addresses=private_ip_of_another_ec2_db_server:3306,private_ip_of_another_ec2_db_server:3306"
also tied with "--proxy-address=private_ip_or_public_ip_of_proxy-server:3306 or 4040"
and "--proxy-backend-addresses=public_ip_of_another_ec2_db_server:3306,public_ip_of_another_ec2_db_server:3306"
after that i tried to connect proxy server from another pc using mysql like:
mysql -u some_user -pxxxxx -h proxy_server_ip
or
mysql -u some_user -pxxxxx -h proxy_server_ip -P 4040
but its not working
its showing error:
ERROR 2003 (HY000): Can't connect to MySQL server on 'ip' (10061)
i want to tell you can connect the db server remotely where i allowed remote connection to any host
i also tried /etc/init.d/mysql-proxy start or /etc/init.d/mysql-proxy restart but no result
just to inform you that /etc/init.d/mysql-proxy stop is showing failed
can anyone please help me to setup and configure mysql-proxy on ubuntu
===
Edit
i found some help from other question of stackoverflow and also according to a suggestion in the comments, have done following procedure. and it seems its working now.
i installed mysql-client and mysql-server locally(on proxy server)
then i tried to run mysql-proxy using following command:
mysql-proxy --proxy-backend-addresses=10.73.151.244:3306 --proxy-backend-addresses=10.73.198.7:3306 --proxy-address=:4040 --admin-username=root --admin-password=root --admin-lua-script=>/usr/lib/mysql-proxy/lua/admin.lua
then i tried to connect remotely to the proxy server and its working.
but it seems i need to run this command under screen because when i close the terminal proxy stops working.
Can you please tell me that do i need to run this command under screen or is there any other way to make it alive all time?
There is no need to install Mysql client or Mysql Server on your mysql-proxy.
Installing mysql-proxy does have "full daemon capabilities" compiled into it.
If your are running Ubuntu Server, you may wish to use an UPSTART service script.
This script can be copied into /etc/init/mysql-proxy.conf
# mysql-proxy.conf (Ubuntu 14.04.1) Upstart proxy configuration file for AWS RDS
# mysql-proxy - mysql-proxy job file
description "mysql-proxy upstart script"
author "shadowbq <shadowbq#gmail.com>"
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect daemon
# Run before process
pre-start script
[ -d /var/run/mysql-proxy ] || mkdir -p /var/run/mysql-proxy
echo "starting mysql-proxy"
end script
# Start the process
exec /usr/bin/mysql-proxy --plugins=proxy --proxy-lua-script=/usr/share/mysql-proxy/rw-splitting.lua --log-level=debug --proxy-backend-addresses=private_ip_of_another_ec2_db_server:3306,private_ip_of_another_ec2_db_server:3306 --daemon --log-use-syslog --pid-file=/var/run/mysql-proxy/mysql-proxy.pid
In the above example I hard coded the AWS RDS server into script, instead of fiddling with defaults and config file
Install Upgraded version 0.8.5
Note:
apt repo does not have 0.8.5 so we need to download tar from mysql official site
Prerequisite :-
Create file /etc/default/mysql-proxy with following content
ENABLED="true"
OPTIONS="--defaults-file=/etc/mysql/mysql-proxy.cnf"
Installation Procedure :-
Download mysql-proxy 0.8.x
Untar in /usr/local
Update PATH environment with /usr/local/mysql-proxy-0.8.5-linux-debian6.0-x86-64bit/bin
vim /etc/environment (to update environment path)
cd /usr/local/mysql-proxy-0.8.5-linux-debian6.0-x86-64bit/bin
Run command sudo ./mysql-proxy --defaults-file=/etc/mysql/mysql-proxy.cnf
Sample mysql-proxy.cnf file
[mysql-proxy]
log-level=debug
log-file=/var/log/mysql-proxy.log
pid-file = /var/run/mysql-proxy.pid
daemon = true
--no-proxy = false
admin-username=ADMIN
admin-password=ADMIN
proxy-backend-addresses=RDS-ENDPOINT:RDS-PORT
admin-lua-script=/usr/lib/mysql-proxy/lua/admin.lua
proxy-address=0.0.0.0:4040
admin-address=localhost:4041
change host ip and port of RDS or mysql
connect to Mysql server via proxy with
mysql -h{proxy-host-ip} -P 4040 -u{mysql_username} -p