Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 18:17:43

Author Topic: The connection was reset  (Read 24413 times)

0 Members and 1 Guest are viewing this topic.

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
The connection was reset
« on: 2013-01-13, 00:43:58 »
Sometimes (not always) when i access my site i see errors like..

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

or

On Firefox:
Problem loading page
The connection to the server was reset while the page was loading.

on Chrome:
This webpage is not available
The connection to domain.com was interrupted.
Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

any idea what is the reason of it?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #1 on: 2013-01-13, 13:00:41 »
is it something due to timeout?
i never saw it in opera.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #2 on: 2013-01-13, 21:36:10 »
It's because httpd is restarting in background. Mustafa should change restart to more graceful.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #3 on: 2013-01-13, 21:52:06 »
did you ever got this problem Marek? Is there any temporary fix?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #4 on: 2013-01-13, 22:04:25 »
Quote from: "Anik"
did you ever got this problem Marek? Is there any temporary fix?

I always got it.

Modify restart line in /etc/init.d/httpd to:

Code: [Select]
restart)
      $apachectl $@
        RETVAL=$?
        ;;
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #5 on: 2013-01-14, 00:09:17 »
I'm using php-fpm with nginxproxy. will this fix apply for this setup?

and now the config is something like

Code: [Select]
#!/bin/bash
#
# httpd        Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: The Apache HTTP Server is an efficient and extensible  
#       server implementing the current HTTP standards.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
#
### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $local_fs $remote_fs $network $named
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: distcache
# Short-Description: start and stop Apache HTTP Server
# Description: The Apache HTTP Server is an extensible server
#  implementing the current HTTP standards.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/httpd ]; then
        . /etc/sysconfig/httpd
fi

# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}

# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""

# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.

# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-/var/run/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0

# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.
start() {
        echo -n $"Starting $prog: "
        LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch ${lockfile}
        return $RETVAL
}

# When stopping httpd a delay of >10 second is required before SIGKILLing the
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
# errant children.
stop() {
echo -n $"Stopping $prog: "
killproc -p ${pidfile} -d 10 $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
reload() {
    echo -n $"Reloading $prog: "
    if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
        RETVAL=$?
        echo $"not reloading due to configuration syntax error"
        failure $"not reloading $httpd due to configuration syntax error"
    else
        killproc -p ${pidfile} $httpd -HUP
        RETVAL=$?
    fi
    echo
}

# See how we were called.
case "$1" in
  start)
start
;;
  stop)
stop
;;
  status)
       status $httpd
RETVAL=$?
;;
  restart)
stop
start
# MR -- back to original because gracefull have a trouble with 2.2.23 version
#$apachectl configtest
#echo -e $"Gracefully restarting"
#$apachectl graceful
#status $httpd
;;
  condrestart)
if [ -f ${pidfile} ] ; then
stop
start
fi
;;
  force-reload|reload)
        reload
;;
  graceful|help|configtest|fullstatus)
$apachectl $@
RETVAL=$?
;;
  *)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
RETVAL=3
esac

exit $RETVAL

should i delete them all and put just this following 4 lines as you said?

Code: [Select]
restart)
      $apachectl $@
        RETVAL=$?
        ;;
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #6 on: 2013-01-14, 02:07:57 »
No just replace this:

Code: [Select]
 restart)
   stop
   start
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #7 on: 2013-01-14, 13:35:06 »
after doing this apache failed to start and all my websites is now completely down. :(
I used this config

Code: [Select]
#!/bin/bash
#
# httpd        Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: The Apache HTTP Server is an efficient and extensible  
#       server implementing the current HTTP standards.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd.pid
#
### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $local_fs $remote_fs $network $named
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: distcache
# Short-Description: start and stop Apache HTTP Server
# Description: The Apache HTTP Server is an extensible server
#  implementing the current HTTP standards.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/httpd ]; then
        . /etc/sysconfig/httpd
fi

# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}

# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""

# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.

# Path to the apachectl script, server binary, and short-form for messages.
apachectl=/usr/sbin/apachectl
httpd=${HTTPD-/usr/sbin/httpd}
prog=httpd
pidfile=${PIDFILE-/var/run/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0

# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.
start() {
        echo -n $"Starting $prog: "
        LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch ${lockfile}
        return $RETVAL
}

# When stopping httpd a delay of >10 second is required before SIGKILLing the
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
# errant children.
stop() {
echo -n $"Stopping $prog: "
killproc -p ${pidfile} -d 10 $httpd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
reload() {
    echo -n $"Reloading $prog: "
    if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
        RETVAL=$?
        echo $"not reloading due to configuration syntax error"
        failure $"not reloading $httpd due to configuration syntax error"
    else
        killproc -p ${pidfile} $httpd -HUP
        RETVAL=$?
    fi
    echo
}

# See how we were called.
case "$1" in
  start)
start
;;
  stop)
stop
;;
  status)
       status $httpd
RETVAL=$?
;;
  restart)
        $apachectl $@
        RETVAL=$?
# MR -- back to original because gracefull have a trouble with 2.2.23 version
#$apachectl configtest
#echo -e $"Gracefully restarting"
#$apachectl graceful
#status $httpd
;;
  condrestart)
if [ -f ${pidfile} ] ; then
stop
start
fi
;;
  force-reload|reload)
        reload
;;
  graceful|help|configtest|fullstatus)
$apachectl $@
RETVAL=$?
;;
  *)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
RETVAL=3
esac

exit $RETVAL

is anything i missed out?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #8 on: 2013-01-14, 13:59:05 »
just fixed it. reason was some permission error.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #9 on: 2013-01-14, 14:09:49 »
but that above config didn't worked. apache isn't starting.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #10 on: 2013-01-14, 15:38:50 »
can you post here the exact config file which will work Marek?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: The connection was reset
« Reply #11 on: 2013-01-14, 16:47:33 »
Your are missing:

Quote
;;

before

Quote
# MR -- back to original because gracefull have a trouble with 2.2.23 version
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #12 on: 2013-01-15, 15:04:39 »
tried that too before but failed

also there is already ;;

Code: [Select]
 restart)
        $apachectl $@
        RETVAL=$?
   # MR -- back to original because gracefull have a trouble with 2.2.23 version
   #$apachectl configtest
   #echo -e $"Gracefully restarting"
   #$apachectl graceful
   #status $httpd
   ;;
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline Anik

  • Senior Member
  • *
  • Posts: 189
  • Karma: +0/-0
    • View Profile
    • http://www.feirox.com
Re: The connection was reset
« Reply #13 on: 2013-01-15, 15:06:10 »
those lines are commented out so at the end of them theres already a ;;
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Having Kloxo-MR useful? Then support the development. Consider buying a server from the author. http://hostspectra.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: The connection was reset
« Reply #14 on: 2013-01-15, 16:20:17 »
Look inside '/usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/lxserverlib.php' in 'function checkRestart()'

Code: [Select]
...
default:
exec_with_all_closed("/etc/init.d/$cmd restart");
...

How about if change to:

Code: [Select]
...
default:
// exec_with_all_closed("/etc/init.d/$cmd restart");

if (exec("service $cmd status | grep 'is running'")) {
exec_with_all_closed("/etc/init.d/$cmd reload");
} else {
exec_with_all_closed("/etc/init.d/$cmd restart");
}
...

It's mean if service status as 'running' just 'reload' and but if not running will be 'restart'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.067 seconds with 22 queries.

web stats analysis