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-06-01, 07:04:40

Author Topic: Kloxo unable to connect to port 7779  (Read 8437 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Kloxo unable to connect to port 7779
« on: 2013-06-18, 16:16:12 »
This is happening each night. Port 7779 is down and I have to restart kloxo to be able to add new domains.

Can you fix this Mustafa ?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Kloxo unable to connect to port 7779
« Reply #1 on: 2013-06-18, 16:38:45 »
It's rare happens. Only solution 'sh /script/restart' (as the same as 'service kloxo restart').

I am worry, it's not related to Kloxo-MR but lxphp/lxlighttpd.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #2 on: 2013-06-18, 16:48:15 »
Quote from: "MRatWork"
It's rare happens. Only solution 'sh /script/restart' (as the same as 'service kloxo restart').

I am worry, it's not related to Kloxo-MR but lxphp/lxlighttpd.

I need an automatic restart script that will check telnet localhost 7779 and restarts kloxo if needed.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Kloxo unable to connect to port 7779
« Reply #3 on: 2013-06-18, 17:08:25 »
This is original code by Ligesh inside /usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/remotelib.php:
Code: [Select]
if ($socket <= 0) {
if ($raddress === 'localhost' && !$sgbl->isDebug()) {
// lxshell_background("/usr/sbin/lxrestart", $sgbl->__var_program_name);
throw new lxException('no_socket_connect_to_server', '', $raddress);
throw new lxException('restarting_backend', '', $raddress);
} else {
throw new lxException('no_socket_connect_to_server', '', $raddress);
}
}
and then you can try:

Code: [Select]
if ($socket <= 0) {
if ($raddress === 'localhost' && !$sgbl->isDebug()) {
// lxshell_background("/usr/sbin/lxrestart", $sgbl->__var_program_name);
// throw new lxException('no_socket_connect_to_server', '', $raddress);
// throw new lxException('restarting_backend', '', $raddress);

// MR -- not using lxshell_background becuase the same as exec
// try kloxo restart if found socket error
exec("service {$sgbl->__var_program_name} restart >/dev/null 2>&1 &");
} else {
throw new lxException('no_socket_connect_to_server', '', $raddress);
}
}
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #4 on: 2013-06-19, 23:08:50 »
I've installed the new code. We will see if it failes at 5 AM when I'm always sleeping ;)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Kloxo unable to connect to port 7779
« Reply #5 on: 2013-06-19, 23:29:12 »
Better using:
Code: [Select]
function recall_send_to_some_stream_server($type, $size, $raddress, $var)
{
send_to_some_stream_server($type, $size, $raddress, $var, $fd, true);
}

function send_to_some_stream_server($type, $size, $raddress, $var, $fd, $reexec = null)
{
...

if ($socket <= 0) {
if ($raddress === 'localhost' && !$sgbl->isDebug()) {
// lxshell_background("/usr/sbin/lxrestart", $sgbl->__var_program_name);
// throw new lxException('no_socket_connect_to_server', '', $raddress);
// throw new lxException('restarting_backend', '', $raddress);

if (!$reexec) {
// MR -- not using lxshell_background because the same as exec
// try kloxo restart if found socket error
exec("sh /script/restart >/dev/null 2>&1 &");
sleep(5);
recall_send_to_some_stream_server($type, $size, $raddress, $var);
} else {
throw new lxException('no_socket_connect_to_server', '', $raddress);
throw new lxException('restarting_backend', '', $raddress);
}
} else {
throw new lxException('no_socket_connect_to_server', '', $raddress);
}
}
...
}
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #6 on: 2013-06-20, 03:10:43 »
Ok. Patched and we will see :)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #7 on: 2013-06-20, 15:33:30 »
It didn't helped. Port 7779 failed again on 5:08 AM
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #8 on: 2013-06-21, 17:37:59 »
A simple script inside cron and we're good

Code: [Select]
#!/bin/bash
if wget http://localhost:7779 -t1 -o /tmp/kloxocheck; cat /tmp/kloxocheck | grep refused
then
echo "Kloxo doesn't work!"
echo Restarting Kloxo...
rm -f /tmp/kloxocheck
/etc/init.d/kloxo restart;
else
echo "Kloxo is running ok!"
fi
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Kloxo unable to connect to port 7779
« Reply #9 on: 2013-06-21, 17:52:49 »
Try modified /usr/local/lxlabs/ext/php/etc/lxphpcgi.sh to:
Code: [Select]
#!/bin/sh
# To use your own php.ini, comment the next line and uncomment the following one
export PHP_INI_SCAN_DIR="/usr/local/lxlabs/ext/php/etc/php.d"
export PHPRC="/usr/local/lxlabs/ext/php/etc"
export PHP_FCGI_CHILDREN=15
export PHP_FCGI_MAX_REQUESTS=1024
exec /usr/local/lxlabs/ext/php/bin/php_cgi
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline rAXv2

  • Valuable Member
  • *
  • Posts: 68
  • Karma: +0/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #10 on: 2013-06-21, 20:00:05 »
i am getting this error quite often now...

Code: [Select]
Alert: Could not Connect to the server localhost. This is most likely due to underlying network problem. Make sure that the server is accessible from this particular node by running telnet slave-id 7779
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #11 on: 2013-06-21, 20:04:03 »
Quote from: "rAXv2"
i am getting this error quite often now...

Code: [Select]
Alert: Could not Connect to the server localhost. This is most likely due to underlying network problem. Make sure that the server is accessible from this particular node by running telnet slave-id 7779

That's what we are talking about here ...
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline nusapenida

  • Junior Member
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
    • http://www.sukandia.com
Re: Kloxo unable to connect to port 7779
« Reply #12 on: 2013-06-22, 06:27:30 »
I also found this problem too!
even this problem occur 15minutes after rebooted the vps.

sometime, i got internal server error suddenly.

thanks
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Kloxo unable to connect to port 7779
« Reply #13 on: 2013-06-22, 12:58:40 »
I found the same issue on 1 of my servers. Solution is modified /usr/local/lxlabs/kloxo/httpdocs/htmllib/lib/remotelib.php:

from:
Code: [Select]
if ($socket <= 0) {
if ($raddress === 'localhost' && !$sgbl->isDebug()) {
// lxshell_background("/usr/sbin/lxrestart", $sgbl->__var_program_name);
throw new lxException('no_socket_connect_to_server', '', $raddress);
throw new lxException('restarting_backend', '', $raddress);
} else {
throw new lxException('no_socket_connect_to_server', '', $raddress);
}
}

to:
Code: [Select]
if ($socket <= 0) {
if ($raddress === 'localhost' && !$sgbl->isDebug()) {
// lxshell_background("/usr/sbin/lxrestart", $sgbl->__var_program_name);

exec_with_all_closed("sh /script/restart >/dev/null 2>&1 &");
throw new lxException('no_socket_connect_to_server', '', $raddress);
throw new lxException('restarting_backend', '', $raddress);
} else {
throw new lxException('no_socket_connect_to_server', '', $raddress);
}
}

With modified above code, we still see error message but try again will be work. It's because before error message ('no_socket_connect_to_server'), panel execute 'exec_with_all_closed'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline qtriangle

  • Junior Member
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Kloxo unable to connect to port 7779
« Reply #14 on: 2014-06-26, 21:16:37 »
I installed latest kloxo on a new VPS on openvz Centos 6-64 bits, and I am stuck on first screen that asks to change default admin password.
This error is not allowing me to go beyond.
I tried koxo restart, server reboot, hiawatha stop, running cleanup etc.
Nothing works.
Any suggestions?

 


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

Page created in 0.028 seconds with 22 queries.

web stats analysis