MRatWork Forum by Mustafa Ramadhan
Language Specific Discussions => Indonesia Users => Topic started by: prandah on 2013-08-09, 12:53:21
-
gk tau judulnya apa yang pas tapi yah begitulah :)
server saya memakai 2 ip
192.254.73.242
192.254.74.18
yang buat saya bingung, kenapa di ip 192.254.74.18
tampilannya :
The page you are looking for is temporarily unavailable.
Please try again later.
sedangkan di ip 192.254.73.242 normal
ada nasehat ?
fyi : itu ip asli ya :) biar bisa di test
-
solved :
caranya menreplace program dan webserver -,-
pertama pakai nginxproxy ubah langsung ke lighty terus ke nginxproxy lagi -,-
setelah itu di webserver uncheck lxphp dan dari php-fpm ke mod_ruid lalu kembalikan lagi ke semula -,-
hanya sesimple itu lah :lol:
-
Using 'old trick again'!. :D
-
tapi radak aneh
ketika server high cpu
kenapa ada beberapa client yang harus mengalami internal server error
nah ketika dijalankan restart-all
makan akan muncul ini
[root@pegasus ~]# sh /script/restart-all
Stopping named: . [ OK ]
Starting named: [ OK ]
Stopping httpd: [ OK ]
Starting httpd: httpd.event: Could not reliably determine the server's fully qualified domain name, using pegasus.bowo.name for ServerName
[ OK ]
Stopping nginx:. [ OK ]
Starting nginx: [ OK ]
Stopping php-fpm: [FAILED]
Starting php-fpm: [09-Aug-2013 13:30:38] ERROR: An another FPM instance seems to already listen on /home/php-fpm/sock/apache.sock
[09-Aug-2013 13:30:38] ERROR: FPM initialization failed
[FAILED]
Restarting qmail:
* Stopping qmail-smtpd.
* Sending qmail-send SIGTERM and restarting.
* Restarting qmail-smtpd.
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
Stopping kloxo-phpcgi: [ OK ]
Starting kloxo-phpcgi: [ OK ]
Stopping kloxo-hiawatha: [ OK ]
Starting kloxo-hiawatha: [ OK ]
Stopping Varnish Cache: [ OK ]
Starting Varnish Cache: [ OK ]
[root@pegasus ~]#
-
Selamat Hari Raya Idul Fitri
mohon maaf lahir bathin.
-------------
hi,
saya baru saja update ke versi kloxo-mr terbaru 2013080701
proses update berjalan lancar2 saja,
sampai ke sh /script/restart-all (2x) semua dinyatakan ok.
tapi kadang2 "500 Internal server error" masih muncul pada beberapa kasus script wordpress php.
setelah saya check di error log, ternyata ada dinyatakan error pada :
FastCGI: server "/home/admin/username/domain.com.0fake" stderr: PHP message: WordPress database error ...
saya coba ganti php type ke: suPHP event, dan ternyata tidak terjadi error lagi!
nginxproxy
php53u
suphp_event
bagaimana cara memperbaikinya agar bisa kembalikan lagi ke php-fpm_event?
terima kasih,
wasalam
-
hahahaha senaseb yak =))
-
Tanda 'FastCGI: server "/home/admin/username/domain.com.0fake" stderr:' artinya php-fpm anda masih pakai ip-port dan seharusnya sudah ganti ke socket. Ini anda ada pakai file custom di apache dan atau php-fpm. File custom ini harus anda sesuaikan dengan file originalnya.
-
kalo saya ini yang saya rubah hanya
php-fpm
$startservers = '6';
$minspareservers = '4';
$maxspareservers = '6';
$maxchildren = '8';
[root@pegasus tpl]# cat custom.php53-fpm-pool.conf.tpl
<?php
$userinfo = posix_getpwnam($user);
if ($user === 'apache') {
// MR -- for future purpose, apache user have uid 50000
$fpmport = 50000;
} else {
$userinfo = posix_getpwnam($user);
$fpmport = (50000 + $userinfo['uid']);
}
if ($user == 'apache') {
$pool = 'default';
} else {
$pool = $user;
}
$startservers = '6';
$minspareservers = '4';
$maxspareservers = '6';
$maxchildren = '8';
?>
[<?php echo $pool; ?>]
#listen = 127.0.0.1:<?php echo $fpmport; ?>
listen = /home/php-fpm/sock/<?php echo $user; ?>.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
user = <?php echo $user; ?>
group = <?php echo $user; ?>
pm = dynamic
pm.max_children = <?php echo $maxchildren; ?>
pm.start_servers = <?php echo $startservers; ?>
pm.min_spare_servers = <?php echo $minspareservers; ?>
pm.max_spare_servers = <?php echo $maxspareservers; ?>
pm.max_requests = 1000
;pm.status_path = /status
;ping.path = /ping
;ping.response = pong
request_terminate_timeout = 120s
request_slowlog_timeout = 30s
slowlog = /var/log/php-fpm/slow.log
rlimit_files = 1024
rlimit_core = 0
;chroot =
;chdir = /var/www
catch_workers_output = yes
security.limit_extensions = .php .php3 .php4 .php5
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f webmaster@domain.com
;php_flag[display_errors] = off
php_admin_value[error_log] = /var/log/php-fpm/error.log
php_admin_value[session.save_path] = /var/lib/php/session
php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 64M
[root@pegasus tpl]#
nginx :
yang saya rubah hanya port saja
soale saya pakek varnish di depan nginx
jadi varnish - nginx - apache
ada solusi laen ?
-
Tunjukkan content dari '/home/apache/conf/defaults/cp.conf'.
-
[root@pegasus tpl]# cat /home/apache/conf/defaults/cp.conf
### begin - web of 'cp.*' - do not remove/modify this line
### 'cp' config
<VirtualHost *:30080>
ServerName cp
ServerAlias cp.*
DocumentRoot "/home/kloxo/httpd/cp/"
DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl
<IfModule suexec.c>
SuexecUserGroup apache apache
</IfModule>
<IfModule mod_suphp.c>
SuPhp_UserGroup apache apache
</IfModule>
<IfModule mod_ruid2.c>
RMode config
RUidGid apache apache
RMinUidGid apache apache
</IfModule>
<IfModule itk.c>
AssignUserId apache apache
</IfModule>
<IfModule mod_fastcgi.c>
Alias /cp.0fake "/home/kloxo/httpd/cp/cp.0fake"
#FastCGIExternalServer "/home/kloxo/httpd/cp/cp.0fake" -host 127.0.0.1:50000
FastCGIExternalServer "/home/kloxo/httpd/cp/cp.0fake" -socket /home/php-fpm/sock/apache.sock
AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /cp.0fake
<Files "cp.0fake">
RewriteCond %{REQUEST_URI} !cp.0fake
</Files>
</IfModule>
<IfModule mod_fcgid.c>
<Directory "/home/kloxo/httpd/cp/">
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper /home/httpd/php5.fcgi .php
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
</IfModule>
<IfModule mod_proxy_fcgi.c>
ProxyPass / fcgi://127.0.0.1:50000/
ProxyPassReverse / fcgi://127.0.0.1:50000/
</IfModule>
<Location />
allow from all
Options +Indexes +FollowSymlinks
</Location>
</VirtualHost>
### 'cp' config
<VirtualHost *:30443>
ServerName cp
ServerAlias cp.*
DocumentRoot "/home/kloxo/httpd/cp/"
DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl
<IfModule mod_ssl.c>
SSLEngine On
SSLCertificateFile /home/kloxo/httpd/ssl/eth0_0___localhost.crt
SSLCertificateKeyFile /home/kloxo/httpd/ssl/eth0_0___localhost.key
SSLCACertificatefile /home/kloxo/httpd/ssl/eth0_0___localhost.ca
</IfModule>
<IfModule suexec.c>
SuexecUserGroup apache apache
</IfModule>
<IfModule mod_suphp.c>
SuPhp_UserGroup apache apache
</IfModule>
<IfModule mod_ruid2.c>
RMode config
RUidGid apache apache
RMinUidGid apache apache
</IfModule>
<IfModule itk.c>
AssignUserId apache apache
</IfModule>
<IfModule mod_fastcgi.c>
Alias /cp.1fake "/home/kloxo/httpd/cp/cp.1fake"
#FastCGIExternalServer "/home/kloxo/httpd/cp/cp.1fake" -host 127.0.0.1:50000
FastCGIExternalServer "/home/kloxo/httpd/cp/cp.1fake" -socket /home/php-fpm/sock/apache.sock
AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /cp.1fake
<Files "cp.1fake">
RewriteCond %{REQUEST_URI} !cp.1fake
</Files>
</IfModule>
<IfModule mod_fcgid.c>
<Directory "/home/kloxo/httpd/cp/">
Options +ExecCGI
AllowOverride All
AddHandler fcgid-script .php
FCGIWrapper /home/httpd/php5.fcgi .php
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
</IfModule>
<IfModule mod_proxy_fcgi.c>
ProxyPass / fcgi://127.0.0.1:50000/
ProxyPassReverse / fcgi://127.0.0.1:50000/
</IfModule>
<Location />
allow from all
Options +Indexes +FollowSymlinks
</Location>
</VirtualHost>
### end - web of 'cp.*' - do not remove/modify this line
[root@pegasus tpl]#
-
Kalau Kloxo-MR sebelumnya pakai 'FastCGIExternalServer "/home/kloxo/httpd/cp/cp.1fake" -host 127.0.0.1:50000' (ip-port based untuk php-fpm) tapi yang baru pakai 'FastCGIExternalServer "/home/kloxo/httpd/cp/cp.1fake" -socket /home/php-fpm/sock/apache.sock' (socket based).
-
Terus, apa untungkannya pakai socket daripada ip-port untuk php-fpm?. Socket lebih cepat dan memungkinkan dengan lebih mudah implementasi 'multiple php' (php 52, 53 dan 54 ada bersama-sama) dimana setiap website bisa pilih php mana yang mau dipakai (kesemua php ini berjalan dalam 'lingkungan' php-fpm; sekarang ini hanya ada php primary 53/54 dan secondari php52 dimana secondary berjalan dalam 'lingkungan' suphp).
-
owh :) jadi client bisa memilih versi php nya masih masing di webserver config ya?
btw masalah saya kekny Udah resolve deh, udah gak ada client yang demo saya lagi soale. tapi mungkin mereka tidur hehehe :)
-
btw untuk webmail sendiri kok gak bisa ya
http://webmail.ditusuk.net (http://webmail.ditusuk.net)
-
btw untuk webmail sendiri kok gak bisa ya
http://webmail.ditusuk.net (http://webmail.ditusuk.net)
Apa semua domain mengalami 'nasib' yang sama?.
Untuk php-fpm sebenarnya yang berubah cuma ganti ip-port ke socket sedangkan aspek lain cenderung sama.
-
halo sory baru bangun tidur :)
webmail.abenetworkshop.com
-
Tanda 'FastCGI: server "/home/admin/username/domain.com.0fake" stderr:' artinya php-fpm anda masih pakai ip-port dan seharusnya sudah ganti ke socket. Ini anda ada pakai file custom di apache dan atau php-fpm. File custom ini harus anda sesuaikan dengan file originalnya.
pak,
setelah cek, saya belum menggunakan custom file baik di apache, php-fpm ataupin di nginx (/home/apache/tpl)
ada solusi?
thanks
-
iya sama
kok aneh ya
[Sun Aug 11 00:39:32 2013] [error] [client 192.254.73.242] (111)Connection refused: FastCGI: failed to connect to server "/home/xxxx/xxxx/xxxx.com.0fake": connect() failed
-
Isi /home/php-fpm/sock sama tidak namanya (tidak termasuk extension) dengan /etc/php-fpm/conf.d
-
gini isinya
[root@pegasus ~]# dir /home/php-fpm/sock
abe.sock apache.sock download.sock jjomobi.sock romneyks.sock
admin.sock blogbola.sock homemade.sock lishuiec.sock techgela.sock
animalia.sock ditusuk.sock homesdes.sock rohan.sock
[root@pegasus ~]# dir /etc/php-fpm/conf.d
dir: cannot access /etc/php-fpm/conf.d: No such file or directory
[root@pegasus ~]#
-
Maaf, mestinya di '/etc/php-fpm.d'
-
sory baru bales. keknya sama deh :
[root@pegasus ~]# dir /etc/php-fpm.d
abe.conf blogbola.conf download.conf jjomobi.conf romneyks.conf
admin.conf default.conf homemade.conf lishuiec.conf techgela.conf
animalia.conf ditusuk.conf homesdes.conf rohan.conf www.nonconf
[root@pegasus ~]# dir /home/php-fpm/sock
abe.sock apache.sock download.sock jjomobi.sock romneyks.sock
admin.sock blogbola.sock homemade.sock lishuiec.sock techgela.sock
animalia.sock ditusuk.sock homesdes.sock rohan.sock
[root@pegasus ~]#
tapi anehnya internal error itu
fix kalo di restart :)
tapi masak mau di restart terus ya :)
-
Apa yang perlu direstart?. Mestinya terkait webserver atau php-fpm. Coba saja perhatikan apa yang jadi masalah (webserver atau php-fpm).
-
kemungkinan sih php-fpm :D
karena ketika saya restart-services
maka yg akan muncul
Stopping php-fpm: [FAILED]
Starting php-fpm: [11-Aug-2013 13:10:22] ERROR: An another FPM instance seems to already listen on /home/php-fpm/sock/apache.sock
[09-Aug-2013 13:30:38] ERROR: FPM initialization failed
[FAILED]
-
Bisa jadi php-fpm instance lama (pakai ip-port) masih jalan kemudian dicoba restart php-fpm baru (pakai socket). Jelas conflict.
Coba jalankan:
killall php-fpm
service php-fpm restart
Jika tidak manjur, reboot.
-
untuk cara fix nya gimana ya yang bener?
-
Jika sesuai dugaan saya, cukup reboot maka akan beres.
-
iya beres, mas :D
tapi bakal muncul internal error lagi lama kelamaan :)
-
iya beres, mas :D
tapi bakal muncul internal error lagi lama kelamaan :)
Mestinya tidak lagi sepanjang php-fpm sudah pakai socket. Yang perlu dicermati apakah di /etc/sysctl.conf ada 'fs.file-max = 209708'.
Jika belum ada tambahkan tapi jika ada lebih dari 1 maka hilang duplikasinya.
Parameter ini penting untuk php-fpm yang pakai socket dimana bila tidak ada maka website 'temporary unavailable'.
-
nah saya kebetulan ada2 nih
[root@pegasus ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536
# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
fs.file-max = 209708
fs.file-max = 209708
[root@pegasus ~]#
so solusinya dihilangkan 1 ?
-
Ya, hilangkan satu karena Kloxo-MR versi 2013080502-0602 ada tidak menangani adanya duplikasi (cuma asal tambahkan saja ke sysctl.conf itu).
-
@goblok
ip masih error
:lol:
ditunggu
-
@zenkul
wis mari :D
jaluk reboot tok tibak e
masalahe cuman sering "anjlok" php-fpm kalo pas ngatasi high trepik high cpu
-
@zenkul
wis mari :D
jaluk reboot tok tibak e
masalahe cuman sering "anjlok" php-fpm kalo pas ngatasi high trepik high cpu
Mesti di-optimise itu php-fpm-nya.