$ sudo service dadaemon status
Redirecting to /bin/systemctl status dadaemon.service
â dadaemon.service - Data Aggregator
Loaded: loaded (/etc/systemd/system/dadaemon.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2022-01-28 10:07:02 CST; 7s ago
Process: 4879 ExecStop=/opt/IMDataAggregator/scripts/dadaemon stop sysd (code=exited, status=3)
Process: 4778 ExecStart=/opt/IMDataAggregator/scripts/dadaemon start sysd (code=exited, status=0/SUCCESS)
Jan 28 10:07:02 lab runuser[4888]: pam_unix(runuser:session): session opened for user <userName> by (uid=0)
Jan 28 10:07:02 lab runuser[4890]: pam_unix(runuser:session): session opened for user <userName> by (uid=0)
Jan 28 10:07:02 lab dadaemon[4879]: mkdir: cannot create directory â/opt/IMDataAggregator/apache-karaf-4.3.3/data/logâ: Permission denied
Jan 28 10:07:02 lab dadaemon[4879]: mkdir: cannot create directory â/opt/IMDataAggregator/apache-karaf-4.3.3/data/tmpâ: Permission denied
Jan 28 10:07:02 lab dadaemon[4879]: /opt/IMDataAggregator/apache-karaf-4.3.3/data/port shutdown port file doesn't exist. The contain...running.
Jan 28 10:07:02 lab dadaemon[4879]: Error stopping the Data Aggregator, error code=3
Jan 28 10:07:02 lab systemd[1]: dadaemon.service: control process exited, code=exited status=3
Jan 28 10:07:02 lab systemd[1]: Failed to start Data Aggregator.
Jan 28 10:07:02 lab systemd[1]: Unit dadaemon.service entered failed state.
Jan 28 10:07:02 lab systemd[1]: dadaemon.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
]$ sudo service dadaemon start
Redirecting to /bin/systemctl start dadaemon.service
Job for dadaemon.service failed because the control process exited with error code. See "systemctl status dadaemon.service" and "journalctl -xe" for details.
Dx Netops Performance Management 21.2.6+
There was a bug in the
/opt/IMDataAggregator/scripts/karaffunctions (your path may vary)
script
Edit the karaffunctions script
cd /opt/IMDataAggregator/scripts
cp karaffunctions original.karaffunctions
edit karaffunctions
find the section checklockandcleanup()
…………………………
checklockandcleanup()
{
karaf_root=$1
if [ -e $karaf_root/.lock ]; then
echo ".lock file found, backing up data & deploy, clearing karaf cache";
if [ -e $karaf_root/data.bak ]; then
renamefolder $karaf_root/data.bak;
renamefolder $karaf_root/deploy.bak;
fi
mv -f $karaf_root/data $karaf_root/data.bak;
cp -prf $karaf_root/deploy $karaf_root/deploy.bak;
if [ ! -e $karaf_root/deploy ]; then
mkdir $karaf_root/deploy/;
fi
if [ ! -e $karaf_root/data ]; then
# We need to create the karaf.out file as startup fails instead of creating it
mkdir $karaf_root/data/;
touch $karaf_root/data/karaf.out;
fi
if [ -f $karaf_root/deploy/local-jms-broker.xml -a ! -s $karaf_root/deploy/local-jms-broker.xml ]; then
# Delete the local-jms-broker.xml file if it is zero-length.
# The DC will re-create it.
rm -f $karaf_root/deploy/local-jms-broker.xml
fi
fi
date >> $karaf_root/.lock;
}
……………………..
note: look for the section header checklockandcleanup() and replace that entire section, the syntax of your original file may vary from the example given.
and replace it with this:
……………………….
checklockandcleanup()
{
karaf_root=$1
if [ -e $karaf_root/.lock ]; then
if [ "$APP_NAME" = "dadaemon" ]; then
CHOWNUSER=`cat /etc/DA.cfg 2>/dev/null | grep "da.user=" | cut -d'=' -f2`
else
CHOWNUSER=`cat /opt/DCM.cfg 2>/dev/null | grep "DCM_USER=" | cut -d'=' -f2`
fi
echo ".lock file found, backing up data & deploy, clearing karaf cache";
if [ -e $karaf_root/data.bak ]; then
renamefolder $karaf_root/data.bak;
renamefolder $karaf_root/deploy.bak;
fi
mv -f $karaf_root/data $karaf_root/data.bak;
cp -prf $karaf_root/deploy $karaf_root/deploy.bak;
if [ ! -e $karaf_root/deploy ]; then
mkdir $karaf_root/deploy
if [ "$CHOWNUSER" != "root" ]; then
chown -R $CHOWNUSER $karaf_root/deploy
fi
fi
if [ ! -e $karaf_root/data ]; then
# We need to create the karaf.out file as startup fails instead of creating it
mkdir $karaf_root/data
touch $karaf_root/data/karaf.out
if [ "$CHOWNUSER" != "root" ]; then
chown -R $CHOWNUSER $karaf_root/data
fi
if [ -f $karaf_root/deploy/local-jms-broker.xml ]; then
# Delete the local-jms-broker.xml file if recreating data, karaf startup issue
# The DC will re-create it.
rm -f $karaf_root/deploy/local-jms-broker.xml
fi
fi
if [ -f $karaf_root/deploy/local-jms-broker.xml -a ! -s $karaf_root/deploy/local-jms-broker.xml ]; then
# Delete the local-jms-broker.xml file if it is zero-length.
# The DC will re-create it.
rm -f $karaf_root/deploy/local-jms-broker.xml
fi
fi
date >> $karaf_root/.lock;
}
……………………
start activemq first and then dadaemon
systemctl start activemq
(service activemq start)
Systemctl start dadaemon
(service dadaemon start)
The dadaemon script was then able to mkdir the /opt/IMDataAggregator/apache-karaf-*/data folder and complete startup
Additional information on this issue. It appears that even after editing the karaffunctions script, dadaemon cannot start activemq.
Therefore, activemq must be started first, and then dadaemon
note : this issue can be seen on both the data aggregator and the data collector - the same steps will fix it on both systems
this issue is fixed in 21.2.8