assert error when stop server
I always came cross such a error in the log when i try to stop mosquitto with "/etc/init.
"mqtt3_
I launch several mosquitto instances with different ports and different persistent files, and the error always(not every time) happens on every instance after 3-4 days since last start, and the server just can't start again until i manually remove the persistence file.
version : 1.2.3
deploy on wheezy
thanks.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- mosquitto Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Can you provide any more details about your config please?
On Tue, Jun 3, 2014 at 9:56 AM, jinlove
<email address hidden> wrote:
> New question #249688 on mosquitto:
> https:/
>
> I always came cross such a error in the log when i try to stop mosquitto with "/etc/init.
>
> "mqtt3_
>
> I launch several mosquitto instances with different ports and different persistent files, and the error always(not every time) happens on every instance after 3-4 days since last start, and the server just can't start again until i manually remove the persistence file.
>
> version : 1.2.3
> deploy on wheezy
>
> thanks.
>
> --
> You received this question notification because you are a member of
> Mosquitto PPA, which is an answer contact for mosquitto.
Revision history for this message
|
#2 |
very glad to receive your reply.
Here is my explicit config per instances, and the port is replaced on
launch.
pid_file /var/run/
port 1883
persistence true
persistence_file mosquitto-1883.db
persistence_
log_dest stdout
allow_anonymous false
password_file /etc/mosquitto/
acl_file /etc/mosquitto/
other option are commented by default.
Here is my /etc/init.
DAEMON=
LOG_PATH=
# /etc/init.
test -x ${DAEMON} || exit 0
umask 022
. /lib/lsb/
# Are we running from init?
run_by_init() {
([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
}
export PATH="$
ulimit -n 65536
for port in $(seq 1860 1899); do
BASE_CONF=
PORT_CONF=
if [ "$BASE_CONF" -nt "$PORT_CONF" ]; then
echo "Updating $PORT_CONF"
sed "s/@port/$port/g" "$BASE_CONF" > "$PORT_CONF"
fi
PIDFILE=
case "$1" in
start)
if init_is_upstart; then
exit 1
fi
if start-stop-daemon --start --quiet --oknodo --background
--make-pidfile --pidfile ${PIDFILE} --no-close --exec ${DAEMON} -- -c
"$PORT_CONF" >> $LOG_PATH 2>&1 ; then
else
fi
;;
stop)
if init_is_upstart; then
exit 0
fi
if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE};
then
rm -f ${PIDFILE}
else
fi
;;
...
Thanks very much.
2014-06-03 17:17 GMT+08:00 Roger Light <<email address hidden>
>:
> Your question #249688 on mosquitto changed:
> https:/
>
> Status: Open => Answered
>
> Roger Light proposed the following answer:
> Can you provide any more details about your config please?
>
> On Tue, Jun 3, 2014 at 9:56 AM, jinlove
> <email address hidden> wrote:
> > New question #249688 on mosquitto:
> > https:/
> >
> > I always came cross such a error in the log when i try to stop mosquitto
> with "/etc/init.
> >
> > "mqtt3_
> failed"
> >
> > I launch several mosquitto instances with different ports and different
> persistent files, and the error always(not every time) happens on every
> instance after 3-4 days since last start, and the server just can't start
> again until i manually remove the persistence file.
> >
> > version : 1.2.3
> > deploy on wheezy
> >
> > thanks.
> >
> > --
> > You received this question notification because you are a member of
> > Mosquitto PPA, which is an answer contact for mosquitto.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
--
Lawrence
Revision history for this message
|
#3 |
That's great, could you also give me a few details about how your
clients connect? I'm interested mostly in whether you use
clean_session or not, but anything you think might be relevant would
be appreciated.
On Tue, Jun 3, 2014 at 10:51 AM, jinlove
<email address hidden> wrote:
> Question #249688 on mosquitto changed:
> https:/
>
> Status: Answered => Open
>
> jinlove is still having a problem:
> very glad to receive your reply.
>
> Here is my explicit config per instances, and the port is replaced on
> launch.
>
> pid_file /var/run/
> port 1883
> persistence true
> persistence_file mosquitto-1883.db
> persistence_
> log_dest stdout
> allow_anonymous false
> password_file /etc/mosquitto/
> acl_file /etc/mosquitto/
>
> other option are commented by default.
>
> Here is my /etc/init.
>
> DAEMON=
> LOG_PATH=
>
> # /etc/init.
> broker
>
> test -x ${DAEMON} || exit 0
>
> umask 022
>
> . /lib/lsb/
>
> # Are we running from init?
> run_by_init() {
> ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
> }
>
> export PATH="$
>
> ulimit -n 65536
>
> for port in $(seq 1860 1899); do
>
> BASE_CONF=
> PORT_CONF=
> if [ "$BASE_CONF" -nt "$PORT_CONF" ]; then
> echo "Updating $PORT_CONF"
> sed "s/@port/$port/g" "$BASE_CONF" > "$PORT_CONF"
> fi
>
> PIDFILE=
>
> case "$1" in
> start)
> if init_is_upstart; then
> exit 1
> fi
> log_daemon_msg "Starting network daemon:" "mosquitto-$port"
> if start-stop-daemon --start --quiet --oknodo --background
> --make-pidfile --pidfile ${PIDFILE} --no-close --exec ${DAEMON} -- -c
> "$PORT_CONF" >> $LOG_PATH 2>&1 ; then
> log_end_msg 0
> else
> log_end_msg 1
> fi
> ;;
> stop)
> if init_is_upstart; then
> exit 0
> fi
> log_daemon_msg "Stopping network daemon:" "mosquitto-$port"
> if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE};
> then
> log_end_msg 0
> rm -f ${PIDFILE}
> else
> log_end_msg 1
> fi
> ;;
> ...
>
> Thanks very much.
>
>
>
>
>
> 2014-06-03 17:17 GMT+08:00 Roger Light <<email address hidden>
>>:
>
>> Your question #249688 on mosquitto changed:
>> https:/
>>
>> Status: Open => Answered
>>
>> Roger Light proposed the following answer:
>> Can you provide any more details about your config please?
>>
>> On Tue, Jun 3, 2014 at 9:56 AM, jinlove
>> <email address hidden> wrote:
>> > New question #249688 on mosquitto:
>> > https:/
>> >
>> > I always came cross such a error in the log when i try to stop mosquitto
>> with "/etc/init.
>> >
>> > "mqtt3_
>> failed"
>> >
>> > I launch several mosquitto instances with different ports and different
>> persistent files, and the error always(not every time) happens on every
>> instance after 3-4 days since last start, and the server just can't start
>> again until i manually remove the persistence file.
>> >
>> > version : 1.2.3
>> > deploy on wheezy
>> >
>> > thanks.
>> >
>> > --
>> > You received this question notification because you are a member of
>> > Mosquitto PPA, which is an answer contact for mosquitto.
>>
>> --
>> If this answers your question, please go to the following page to let us
>> know that it is solved:
>>
>> https:/
>>
>> If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https:/
>>
>> You received this question notification because you asked the question.
>>
>
>
> --
> Lawrence
>
> You received this question notification because you are a member of
> Mosquitto PPA, which is an answer contact for mosquitto.
Revision history for this message
|
#4 |
I use Paho as client and clean session is set to false.
There are 10k connection per instance, and each client subscribe two topics.
BTW, not every time will it throw assert error when i stop instance, but
with very high probability if it is running for several days or perhaps too
many subscriptions (too many unactive clients)
Thanks.
2014-06-03 19:02 GMT+08:00 Roger Light <<email address hidden>
>:
> Your question #249688 on mosquitto changed:
> https:/
>
> Status: Open => Answered
>
> Roger Light proposed the following answer:
> That's great, could you also give me a few details about how your
> clients connect? I'm interested mostly in whether you use
> clean_session or not, but anything you think might be relevant would
> be appreciated.
>
> On Tue, Jun 3, 2014 at 10:51 AM, jinlove
> <email address hidden> wrote:
> > Question #249688 on mosquitto changed:
> > https:/
> >
> > Status: Answered => Open
> >
> > jinlove is still having a problem:
> > very glad to receive your reply.
> >
> > Here is my explicit config per instances, and the port is replaced on
> > launch.
> >
> > pid_file /var/run/
> > port 1883
> > persistence true
> > persistence_file mosquitto-1883.db
> > persistence_
> > log_dest stdout
> > allow_anonymous false
> > password_file /etc/mosquitto/
> > acl_file /etc/mosquitto/
> >
> > other option are commented by default.
> >
> > Here is my /etc/init.
> >
> > DAEMON=
> > LOG_PATH=
> >
> > # /etc/init.
> > broker
> >
> > test -x ${DAEMON} || exit 0
> >
> > umask 022
> >
> > . /lib/lsb/
> >
> > # Are we running from init?
> > run_by_init() {
> > ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
> > }
> >
> > export PATH="$
> >
> > ulimit -n 65536
> >
> > for port in $(seq 1860 1899); do
> >
> > BASE_CONF=
> > PORT_CONF=
> > if [ "$BASE_CONF" -nt "$PORT_CONF" ]; then
> > echo "Updating $PORT_CONF"
> > sed "s/@port/$port/g" "$BASE_CONF" > "$PORT_CONF"
> > fi
> >
> > PIDFILE=
> >
> > case "$1" in
> > start)
> > if init_is_upstart; then
> > exit 1
> > fi
> > log_daemon_msg "Starting network daemon:" "mosquitto-$port"
> > if start-stop-daemon --start --quiet --oknodo --background
> > --make-pidfile --pidfile ${PIDFILE} --no-close --exec ${DAEMON} -- -c
> > "$PORT_CONF" >> $LOG_PATH 2>&1 ; then
> > log_end_msg 0
> > else
> > log_end_msg 1
> > fi
> > ;;
> > stop)
> > if init_is_upstart; then
> > exit 0
> > fi
> > log_daemon_msg "Stopping network daemon:" "mosquitto-$port"
> > if start-stop-daemon --stop --quiet --oknodo --pidfile
> ${PIDFILE};
> > then
> > log_end_msg 0
> > rm -f ${PIDFILE}
> > else
> > log_end_msg 1
> > fi
> > ;;
> > ...
> >
> > Thanks very much.
> >
> >
> >
> >
> >
> > 2014-06-03 17:17 GMT+08:00 Roger Light <
> <email address hidden>
> >>:
> >
> >> Your question #249688 on mosquitto changed:
> >> https:/
> >>
> >> Status: Open => Answered
> >>
> >> Roger Light proposed the following answer:
> >> Can you provide any more details about your config please?
> >>
> >> On Tue, Jun 3, 2014 at 9:56 AM, jinlove
> >> <email address hidden> wrote:
> >> > New question #249688 on mosquitto:
> >> > https:/
> >> >
> >> > I always came cross such a error in the log when i try to stop
> mosquitto
> >> with "/etc/init.
> >> >
> >> > "mqtt3_
> 0'
> >> failed"
> >> >
> >> > I launch several mosquitto instances with different ports and
> different
> >> persistent files, and the error always(not every time) happens on every
> >> instance after 3-4 days since last start, and the server just can't
> start
> >> again until i manually remove the persistence file.
> >> >
> >> > version : 1.2.3
> >> > deploy on wheezy
> >> >
> >> > thanks.
> >> >
> >> > --
> >> > You received this question notification because you are a member of
> >> > Mosquitto PPA, which is an answer contact for mosquitto.
> >>
> >> --
> >> If this answers your question, please go to the following page to let us
> >> know that it is solved:
> >>
> >>
> https:/
> >>
> >> If you still need help, you can reply to this email or go to the
> >> following page to enter your feedback:
> >> https:/
> >>
> >> You received this question notification because you asked the question.
> >>
> >
> >
> > --
> > Lawrence
> >
> > You received this question notification because you are a member of
> > Mosquitto PPA, which is an answer contact for mosquitto.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https:/
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
--
Lawrence
Revision history for this message
|
#5 |
I've made some changes that should hopefully help with this. It's
probably not that critical actually though, this assert happens quite
late on in the deinitialisation process.
On Tue, Jun 3, 2014 at 1:02 PM, jinlove
<email address hidden> wrote:
> Question #249688 on mosquitto changed:
> https:/
>
> Status: Answered => Open
>
> jinlove is still having a problem:
> I use Paho as client and clean session is set to false.
>
> There are 10k connection per instance, and each client subscribe two
> topics.
>
> BTW, not every time will it throw assert error when i stop instance, but
> with very high probability if it is running for several days or perhaps too
> many subscriptions (too many unactive clients)
>
> Thanks.
>
>
> 2014-06-03 19:02 GMT+08:00 Roger Light <<email address hidden>
>>:
>
>> Your question #249688 on mosquitto changed:
>> https:/
>>
>> Status: Open => Answered
>>
>> Roger Light proposed the following answer:
>> That's great, could you also give me a few details about how your
>> clients connect? I'm interested mostly in whether you use
>> clean_session or not, but anything you think might be relevant would
>> be appreciated.
>>
>> On Tue, Jun 3, 2014 at 10:51 AM, jinlove
>> <email address hidden> wrote:
>> > Question #249688 on mosquitto changed:
>> > https:/
>> >
>> > Status: Answered => Open
>> >
>> > jinlove is still having a problem:
>> > very glad to receive your reply.
>> >
>> > Here is my explicit config per instances, and the port is replaced on
>> > launch.
>> >
>> > pid_file /var/run/
>> > port 1883
>> > persistence true
>> > persistence_file mosquitto-1883.db
>> > persistence_
>> > log_dest stdout
>> > allow_anonymous false
>> > password_file /etc/mosquitto/
>> > acl_file /etc/mosquitto/
>> >
>> > other option are commented by default.
>> >
>> > Here is my /etc/init.
>> >
>> > DAEMON=
>> > LOG_PATH=
>> >
>> > # /etc/init.
>> > broker
>> >
>> > test -x ${DAEMON} || exit 0
>> >
>> > umask 022
>> >
>> > . /lib/lsb/
>> >
>> > # Are we running from init?
>> > run_by_init() {
>> > ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
>> > }
>> >
>> > export PATH="$
>> >
>> > ulimit -n 65536
>> >
>> > for port in $(seq 1860 1899); do
>> >
>> > BASE_CONF=
>> > PORT_CONF=
>> > if [ "$BASE_CONF" -nt "$PORT_CONF" ]; then
>> > echo "Updating $PORT_CONF"
>> > sed "s/@port/$port/g" "$BASE_CONF" > "$PORT_CONF"
>> > fi
>> >
>> > PIDFILE=
>> >
>> > case "$1" in
>> > start)
>> > if init_is_upstart; then
>> > exit 1
>> > fi
>> > log_daemon_msg "Starting network daemon:" "mosquitto-$port"
>> > if start-stop-daemon --start --quiet --oknodo --background
>> > --make-pidfile --pidfile ${PIDFILE} --no-close --exec ${DAEMON} -- -c
>> > "$PORT_CONF" >> $LOG_PATH 2>&1 ; then
>> > log_end_msg 0
>> > else
>> > log_end_msg 1
>> > fi
>> > ;;
>> > stop)
>> > if init_is_upstart; then
>> > exit 0
>> > fi
>> > log_daemon_msg "Stopping network daemon:" "mosquitto-$port"
>> > if start-stop-daemon --stop --quiet --oknodo --pidfile
>> ${PIDFILE};
>> > then
>> > log_end_msg 0
>> > rm -f ${PIDFILE}
>> > else
>> > log_end_msg 1
>> > fi
>> > ;;
>> > ...
>> >
>> > Thanks very much.
>> >
>> >
>> >
>> >
>> >
>> > 2014-06-03 17:17 GMT+08:00 Roger Light <
>> <email address hidden>
>> >>:
>> >
>> >> Your question #249688 on mosquitto changed:
>> >> https:/
>> >>
>> >> Status: Open => Answered
>> >>
>> >> Roger Light proposed the following answer:
>> >> Can you provide any more details about your config please?
>> >>
>> >> On Tue, Jun 3, 2014 at 9:56 AM, jinlove
>> >> <email address hidden> wrote:
>> >> > New question #249688 on mosquitto:
>> >> > https:/
>> >> >
>> >> > I always came cross such a error in the log when i try to stop
>> mosquitto
>> >> with "/etc/init.
>> >> >
>> >> > "mqtt3_
>> 0'
>> >> failed"
>> >> >
>> >> > I launch several mosquitto instances with different ports and
>> different
>> >> persistent files, and the error always(not every time) happens on every
>> >> instance after 3-4 days since last start, and the server just can't
>> start
>> >> again until i manually remove the persistence file.
>> >> >
>> >> > version : 1.2.3
>> >> > deploy on wheezy
>> >> >
>> >> > thanks.
>> >> >
>> >> > --
>> >> > You received this question notification because you are a member of
>> >> > Mosquitto PPA, which is an answer contact for mosquitto.
>> >>
>> >> --
>> >> If this answers your question, please go to the following page to let us
>> >> know that it is solved:
>> >>
>> >>
>> https:/
>> >>
>> >> If you still need help, you can reply to this email or go to the
>> >> following page to enter your feedback:
>> >> https:/
>> >>
>> >> You received this question notification because you asked the question.
>> >>
>> >
>> >
>> > --
>> > Lawrence
>> >
>> > You received this question notification because you are a member of
>> > Mosquitto PPA, which is an answer contact for mosquitto.
>>
>> --
>> If this answers your question, please go to the following page to let us
>> know that it is solved:
>>
>> https:/
>>
>> If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https:/
>>
>> You received this question notification because you asked the question.
>>
>
>
> --
> Lawrence
>
> You received this question notification because you are a member of
> Mosquitto PPA, which is an answer contact for mosquitto.
Revision history for this message
|
#6 |
Thanks for your hard work Roger. i will test it in the incoming version.
Can you help with this problem?
Provide an answer of your own, or ask jinlove for more information if necessary.