Ejabberd: "Error executing post installation script" during eJabberd 15.07 installation

Created on 24 Aug 2015  Â·  14Comments  Â·  Source: processone/ejabberd

After clean Debian 8.1 X64 install, trying to install eJabberd server based on this tutorial

http://docs.ejabberd.im/admin/guide/installation/#installing-ejabberd-with-binary-installer

At the end of installation, it pops error message

Error: Error running Post Install Script.
The installation may have not completed correctly

Then I opened log file:

...
Unpacking /opt/ejabberd-15.07/doc/guide.html
Executing final installation script
Error executing post installation script
/opt/ejabberd-15.07/bin/postinstall.sh
\useradd: user 'ejabberd' already exists
usermod: no changes
chown: cannot access ‘/opt/ejabberd-15.07/{database,conf,logs}’: No such file or directory
mkdir: cannot create directory ‘/opt/ejabberd-15.07/database/ejabberd@localhost’: Permission denied
./ejabberdctl: 140: cd: can't cd to /opt/ejabberd-15.07/database/ejabberd@localhost
mkdir: cannot create directory ‘/opt/ejabberd-15.07/database/ejabberd@localhost’: Permission denied
./ejabberdctl: 140: cd: can't cd to /opt/ejabberd-15.07/database/ejabberd@localhost
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed

What am I doing wrong?

Installers

Most helpful comment

I have also a problem with post installation script. In fact, I tied to install Ejabberd 16.02. But, I get the following error: Error executing post installation script. When I try to start ejabberd by doing : ./ejabberdctl start, it doesn't work apparently. I've tried also to execute postinstall.sh independently. But I get '' ejabberd can not run''

All 14 comments

@badlop @cromain
Here are some hints:
It looks like /bin/sh is Dash on latest Debian distros (apparently the default since Debian Squeeze). However, the postinstall.sh script inside the package uses brace expansion, which while widely supported in various shells is not required by the POSIX standard, and thus Dash is not in error by not supporting it. The postinstall.sh script should either specify /bin/bash instead of /bin/sh in its first line, or abstain from using Bash-specific features.

I tried tp explicitly run the postinstall script with Bash:

sudo bash /opt/ejabberd-15.07/bin/postinstall.sh

Got result

http://imgur.com/YoRIksW

it wanted to create a user, and expected the details to be passed as command line arguments to the postinstall script.

I can reproduce the problem in my newly installed Debian 8.1 amd64. Furthermore:

$ checkbashisms postinstall.sh 
possible bashism in postinstall.sh line 12 (brace expansion):
  chown -R ejabberd /opt/ejabberd-15.07/{database,conf,logs}

are you going to fix this?

Confirm this problem on Ubuntu 14.04. Package extract sucessfully, but after this - fails on postinst script:

/opt/bitrock/ejabberd-15.07-0/helperBinary --mode unattended --rpmstage postinstall
Error running Post Install Script.
The installation may have not completed correctly

Is there any debug or verbose mode available for helperBinary to understand where is the problem?

Also I have found erl_crash_20150826-235751.dump file in logs, that have created time between helperBinary start and end, file contents is here: http://pastebin.com/raw.php?i=FDbXn0tT

@MurzNN We don't even know when they're gonna fix it

@turalsprofile: Over at #691 it says the issue has been added to the ejabberd 15.09 milestone. ;)

yes, relax, guys :) It will be fixed in 15.09. In the meantime, you can always build from source.

fixed: 15.09 package will include the fix

Just had this with Ubuntu 15.04 using ejabberd_15.07-0_amd64.deb. As a workaround i did the following:

sudo mv /bin/sh /bin/sh.1
sudo mv /bin/sh.distrib /bin/shsh.distrib.1
sudo ln -s /bin/bash /bin/sh
sudo ln -s /bin/bash /bin/sh.distrib
sudo dpkg -i ejabberd_15.07-0_amd64.deb
sudo rm /bin/sh.distrib /bin/sh
sudo mv /bin/sh.1 /bin/sh
sudo mv /bin/shsh.distrib.1 /bin/sh.distrib

The install seems to have work fine with that.

Unpacking C:Program Files\ejabberd-16.02\bin\libiconv-2.dll
Creating Desktop Shortcut for Start ejabberd
Creating Desktop Shortcut for Stop ejabberd
Executing final installation script
Error executing post installation script
C:Program Files\ejabberd-16.02\binpostinstall.cmd
Program ended with an error exit code
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Uninstaller icon changed
Installation completed
Log finished 03/18/2016 at 01:17:21

I have also a problem with post installation script. In fact, I tied to install Ejabberd 16.02. But, I get the following error: Error executing post installation script. When I try to start ejabberd by doing : ./ejabberdctl start, it doesn't work apparently. I've tried also to execute postinstall.sh independently. But I get '' ejabberd can not run''

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Vshnv picture Vshnv  Â·  4Comments

jjdp picture jjdp  Â·  3Comments

pacija picture pacija  Â·  4Comments

SamWhited picture SamWhited  Â·  4Comments

rahul-l picture rahul-l  Â·  3Comments