[Spce-user] Mediator not starting after upgrade

qabane me qabaneitsolutions at gmail.com
Wed Aug 22 05:24:18 EDT 2018


Hi

I reckon I have found the issue. /etc/init.d/mediator is incomplete for
some obscure reason. Note the stats portion is missing. there is a
mediator.dpkg.dist present which looks to be the correct new one. I have
compared that one to a test install of 3.8.13 and it's identical. I will
replace the file after hours just for safety's sake and check but that
seems to be the mystery?

[ -z "$PIDFILE" ] || OPTIONS="$OPTIONS -D $PIDFILE"
[ -z "$INTERVAL" ] || OPTIONS="$OPTIONS -i $INTERVAL"
[ -z "$SOURCE_HOST" ] || OPTIONS="$OPTIONS -h $SOURCE_HOST"
[ -z "$SOURCE_PORT" ] || OPTIONS="$OPTIONS -o $SOURCE_PORT"
[ -z "$SOURCE_USER" ] || OPTIONS="$OPTIONS -u $SOURCE_USER"
[ -z "$SOURCE_PASS" ] || OPTIONS="$OPTIONS -p $SOURCE_PASS"
[ -z "$SOURCE_DB" ] || OPTIONS="$OPTIONS -b $SOURCE_DB"
[ -z "$DEST_HOST" ] || OPTIONS="$OPTIONS -H $DEST_HOST"
[ -z "$DEST_PORT" ] || OPTIONS="$OPTIONS -O $DEST_PORT"
[ -z "$DEST_USER" ] || OPTIONS="$OPTIONS -U $DEST_USER"
[ -z "$DEST_PASS" ] || OPTIONS="$OPTIONS -P $DEST_PASS"
[ -z "$DEST_DB" ] || OPTIONS="$OPTIONS -B $DEST_DB"
[ -z "$PROV_HOST" ] || OPTIONS="$OPTIONS -S $PROV_HOST"
[ -z "$PROV_PORT" ] || OPTIONS="$OPTIONS -T $PROV_PORT"
[ -z "$PROV_USER" ] || OPTIONS="$OPTIONS -R $PROV_USER"
[ -z "$PROV_PASS" ] || OPTIONS="$OPTIONS -A $PROV_PASS"
[ -z "$PROV_DB" ] || OPTIONS="$OPTIONS -N $PROV_DB"
if test "$FORK" = "yes" ; then
        OPTIONS="$OPTIONS -d"

This part is just not present:

[ -z "$STATS_HOST" ] || OPTIONS="$OPTIONS -Z $STATS_HOST"
[ -z "$STATS_PORT" ] || OPTIONS="$OPTIONS -z $STATS_PORT"
[ -z "$STATS_USER" ] || OPTIONS="$OPTIONS -W $STATS_USER"
[ -z "$STATS_PASS" ] || OPTIONS="$OPTIONS -w $STATS_PASS"
[ -z "$STATS_DB" ] || OPTIONS="$OPTIONS -X $STATS_DB"
[ -z "$STATS_PERIOD" ] || OPTIONS="$OPTIONS -x $STATS_PERIOD"


On Tue, Aug 21, 2018 at 11:15 AM, qabane me <qabaneitsolutions at gmail.com>
wrote:

> /Hi
>
> I had found the file in the meantime, in this case /etc/default/mediator I
> think? The contents look fine. The mediator.tt2 file also looks correct as
> far as I can see. And yes :-) I am having fun!
>
>
> RUN_MEDIATOR="yes"
>
> PIDFILE="/var/run/mediator.pid"
> FORK="yes"
> INTERVAL="10"
> SOURCE_HOST="localhost"
> SOURCE_PORT="3306"
> SOURCE_USER="kamailio"
> SOURCE_PASS='fmepWPtkisz7WvvoEouR'
> SOURCE_DB="kamailio"
> DEST_HOST="localhost"
> DEST_PORT="3306"
> DEST_USER="mediator"
> DEST_PASS='wFTN34Xnoeyzae3yEzyv'
> DEST_DB="accounting"
> PROV_HOST="localhost"
> PROV_PORT="3306"
> PROV_USER="mediator"
> PROV_PASS='wFTN34Xnoeyzae3yEzyv'
> PROV_DB="provisioning"
> STATS_DB="stats"
> STATS_HOST="localhost"
> STATS_PORT="3306"
> STATS_USER="mediator"
> STATS_PASS="wFTN34Xnoeyzae3yEzyv"
> STATS_PERIOD="1"
>
>
>
> On Tue, Aug 21, 2018 at 10:54 AM, Alex Lutay <alutay at sipwise.com> wrote:
>
>> Hi,
>>
>> Correct. The default MySQL port is 3306.
>>
>> You can check mediator config to find the option with port 0:
>> > grep port /etc/ngcp-mediator/ngcp-mediator.conf
>>
>> later you can check ngcpcfg to find which YML options is missing for you
>> > /etc/ngcp-config/templates/etc/ngcp-mediator/ngcp-mediator.conf.tt2
>> Also ensure you have no customtt file there.
>>
>> Ensure your YML file has all the necessary values.
>>
>> BTW, modern releases have ability to validate your YML config:
>> > ngcpcfg --validate check
>>
>> Have fun!
>>
>> On 08/20/2018 08:34 PM, qabane me wrote:
>> > Ok the grants are ok seemingly but the port is wrong:
>> >
>> > Aug 20 20:16:10 sipwise mediator[20666]: STATS database
>> > host='localhost', port='0', user='mediator', name='stats'
>> >
>> > that should be port 3306 surely?
>> >
>> > I have checked the constants.yml file which only has references to port
>> > 3306 as far as I can see?
>> --
>> Alex Lutay
>> _______________________________________________
>> Spce-user mailing list
>> Spce-user at lists.sipwise.com
>> https://lists.sipwise.com/listinfo/spce-user
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20180822/d93ca72a/attachment-0001.html>


More information about the Spce-user mailing list