ผมเจอปัญหาแบบนี้ครับ
service httpd run Listen port 8080
ต้องการ kill process httpd
#killall -9 httpd
แต่ process ยังรันอยู่ครับ ไม่สามารถ start ได้
#ps -ef | grep httpd
ยังมีรันอยู่ ครับ ต้องแก้ไขโดยการ restart server ตลอดเวลาเลยครับ
ท่านใดมีคำแนะนำบ้างมั๊ยครับ หาใน อากู ก็ให้ kill อย่างเดียวก็ไม่หายครับ
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:8080
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
Unable to open logs
มีอย่างอื่นรันที่พอร์ต 8080 ป่าวครับ
netstat -aeopn | grep :8080
iCafe
January 18, 2013, 6:25pm
4
run varnish on 8080 หรือเปล่า ถ้าใช่
ต้องแก้ ใหม่ให้ httpd = 80 / varnish = 8080 แล้วใช้ iptable redirect 80 to 8080 แทน
มีแบบนี้ครับ
#[COLOR=#333333]netstat -aeopn | grep :8080
[/COLOR]
0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:42024 CLOSE_WAIT 0 0 - keepalive (2245.13/0/0)
tcp 948 0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:42044 CLOSE_WAIT 0 0 - keepalive (2245.29/0/0)
tcp 989 0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:41983 CLOSE_WAIT 0 0 - keepalive (2244.93/0/0)
tcp 992 0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:42039 CLOSE_WAIT 0 0 - keepalive (2245.27/0/0)
tcp 1128 0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:41984 CLOSE_WAIT 0 0 - keepalive (2244.93/0/0)
tcp 1379 0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:41925 CLOSE_WAIT 0 0 - keepalive (2244.71/0/0)
tcp 1542 0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:42001 CLOSE_WAIT 0 0 - keepalive (2245.07/0/0)
tcp 852 0 ::ffff:192.168.1.101:8080 ::ffff:192.168.1.101:42000 CLOSE_WAIT 0 0 - keepalive (2245.07/0/0)
httpd run port 8080 ทั้ง domain และ subdomain ครับ ผมควรจัดการ kill ยังเหรอครับ โดยที่ไม่ต้อง restart server
รอง kill processid แล้ว พอ kill เสร็จ
เรียกดู processid httpd ให้
processid เดิม ก็ยังอยู่ ครับ ตอน kill processid นั้นไม่มี error ครับ
ไม่ได้ใช้ varnish ครับ ใช้ squid อยู่ครับ ยังไม่ได้ รองเปลี่ยนครับ squid run port 80 cache_peer port 8080 ของ httpd ครับ
ps -aux l grep httpd
kill -9 process id
kke
January 18, 2013, 8:09pm
10
ไม่มีคำสั่ง httpd ใน /etc/init.d หรือครับ ทำไมต้องไป kill มัน
ถ้าไม่มีแนะนำให้สร้างไฟล์ init ขึ้นมาสำหรับสั่ง start/stop/restart น่าจะดีกว่าไป kill มันทิ้งดื้อๆนะครับ
kenjung
January 18, 2013, 8:11pm
11
init 6 ครับ
คือผมไม่อยาก reboot เครื่องอ่ะครับ k ton
ton1
January 18, 2013, 8:12pm
12
บางที service ทำงานที่ socket หรือ port นี้จำนวนมากๆ มัน kill หรือใช้คำสั่ง ไม่ได้หรอกครับ
ต้องรอ หรือไม่ก็ block ไม่ให้ใช้งานก่อน ชั่วคราวครับ
icez
January 18, 2013, 9:22pm
13
เวลามันค้าง สั่ง netstat -nltp มาหน่อยครับ
kenjung
January 19, 2013, 8:58am
14
[root@web1 ~]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.1.100:21064 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1253/rpcbind
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 26506/varnishd
tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN 1925/python
tcp 0 0 0.0.0.0:46709 0.0.0.0:* LISTEN 1271/rpc.statd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1761/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1837/master
tcp 0 0 127.0.0.1:6082 0.0.0.0:* LISTEN 26505/varnishd
tcp 0 0 :::11111 :::* LISTEN 2009/ricci
tcp 0 0 :::111 :::* LISTEN 1253/rpcbind
tcp 0 0 :::80 :::* LISTEN 26506/varnishd
tcp 0 0 :::8080 :::* LISTEN 16188/httpd
tcp 0 0 :::16851 :::* LISTEN 2722/modclusterd
tcp 0 0 :::22 :::* LISTEN 1761/sshd
tcp 0 0 :::25 :::* LISTEN 1837/master
tcp 0 0 :::42556 :::* LISTEN 1271/rpc.statd
[root@web1 ~]#
รบกวนขอคำแนะนำด้วยครับ คุณ ice
iCafe
January 19, 2013, 9:08am
15
kenjung:
[root@rs1 ~]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.1.100:21064 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1253/rpcbind
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 26506/varnishd
tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN 1925/python
tcp 0 0 0.0.0.0:46709 0.0.0.0:* LISTEN 1271/rpc.statd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1761/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1837/master
tcp 0 0 127.0.0.1:6082 0.0.0.0:* LISTEN 26505/varnishd
tcp 0 0 :::11111 :::* LISTEN 2009/ricci
tcp 0 0 :::111 :::* LISTEN 1253/rpcbind
tcp 0 0 :::80 :::* LISTEN 26506/varnishd
tcp 0 0 :::8080 :::* LISTEN 16188/httpd
tcp 0 0 :::16851 :::* LISTEN 2722/modclusterd
tcp 0 0 :::22 :::* LISTEN 1761/sshd
tcp 0 0 :::25 :::* LISTEN 1837/master
tcp 0 0 :::42556 :::* LISTEN 1271/rpc.statd
[root@rs1 ~]#
รบกวนขอคำแนะนำด้วยครับ คุณ ice
ไหนบอกไม่ได้รัน varnish แล้วมาไงเนี่ย - -
kenjung
January 19, 2013, 9:10am
16
มี file ครับ คุณ kke มี /etc/init.d/httpd
สั่ง restart แล้วครับ ไม่สามารถ start ได้ครับ
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:8080
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[root@web1 ~]#
kenjung
January 19, 2013, 9:10am
17
ผมพึ่งรองใช้ดูครับ สลับกับ squid ครับ
[root@web1 ~]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.1.100:21064 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1253/rpcbind
tcp 0 0 192.168.1.100:80 0.0.0.0:* LISTEN 28317/(squid)
tcp 0 0 0.0.0.0:8084 0.0.0.0:* LISTEN 1925/python
tcp 0 0 0.0.0.0:46709 0.0.0.0:* LISTEN 1271/rpc.statd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1761/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1837/master
tcp 0 0 :::11111 :::* LISTEN 2009/ricci
tcp 0 0 :::111 :::* LISTEN 1253/rpcbind
tcp 0 0 :::8080 :::* LISTEN 16188/httpd
tcp 0 0 :::16851 :::* LISTEN 2722/modclusterd
tcp 0 0 :::22 :::* LISTEN 1761/sshd
tcp 0 0 :::25 :::* LISTEN 1837/master
tcp 0 0 :::42556 :::* LISTEN 1271/rpc.statd
[root@web1 ~]#
ปัจจุบันที่ใช้คือตัวนี้ครับ ต้องขออภัยด้วยครับ ‘’
และ ระบบมีอยู่ 3 ID apache ที่ไม่สามารถ kill ได้ครับ
[root@web1 ~]# ps -ef | grep httpd
apache 16188 1 0 Jan18 ? 00:00:00 /usr/sbin/httpd
apache 16193 1 0 Jan18 ? 00:00:00 /usr/sbin/httpd
apache 17407 1 0 Jan18 ? 00:00:00 /usr/sbin/httpd
root 29651 26133 0 09:33 pts/1 00:00:00 grep httpd
[root@web1 ~]#