juhyunkwon / php-handlersocket

Automatically exported from code.google.com/p/php-handlersocket
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

HandlerSocket-server doesn't work (not open 9998 and 9999 ports) #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
OS: 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     
root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

pkg_info | grep mysql
mysql-client-5.5.15 Multithreaded SQL database (client)
mysql-server-5.5.15_1 Multithreaded SQL database (server)

1. Go to /usr/ports/databases/libhsclient and edit Makefile:
Changed --enable-handlersocket-server from 'no' to 'yes' and added 
--with-mysql-source=/usr/ports/databases/mysql55-server/work/mysql-5.5.15
2. make install clean
3. /usr/local/etc/rc.d/mysql-server start
4. install plugin handlersocket soname 'handlersocket.so';
5. /usr/local/etc/rc.d/mysql-server restart
6. mysql> SHOW PLUGINS\G
*************************** 18. row ***************************
   Name: handlersocket
 Status: ACTIVE
   Type: DAEMON
Library: handlersocket.so
License: BSD
18 rows in set (0.01 sec)

7. tail -f /var/db/mysql/dev.err
120525 15:25:58 InnoDB: Compressed tables use zlib 1.2.3
120525 15:25:58 InnoDB: Initializing buffer pool, size = 128.0M
120525 15:25:58 InnoDB: Completed initialization of buffer pool
120525 15:25:58 InnoDB: highest supported file format is Barracuda.
120525 15:25:58  InnoDB: Waiting for the background threads to start
120525 15:25:59 InnoDB: 1.1.8 started; log sequence number 4177035013
handlersocket: initialized
120525 15:25:59 [Note] Event Scheduler: Loaded 0 events
120525 15:25:59 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.5.15-log'  socket: '/tmp/mysql.sock'  port: 3306  Source 
distribution

Well, 
sockstat -4l
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
mysql    mysqld     71125 12 tcp4 6 *:3306                *:*
root     sendmail   1095  3  tcp4   127.0.0.1:25          *:*
root     sshd       1087  4  tcp4   *:22                  *:*
www      nginx      951   13 tcp4   *:80                  *:*
root     nginx      949   13 tcp4   *:80                  *:*
root     python2.7  910   3  tcp4   *:81                  *:*
svn      svnserve   903   3  tcp4   *:3690                *:*
root     nfsd       761   3  tcp4   *:2049                *:*
root     mountd     759   7  udp4   *:857                 *:*
root     mountd     759   8  tcp4   *:857                 *:*
root     rpcbind    647   9  udp4   *:111                 *:*
root     rpcbind    647   10 udp4   *:836                 *:*
root     rpcbind    647   11 tcp4   *:111                 *:*
root     syslogd    625   7  udp4   *:514                 *:*

Where are 9998 and 9999 ports? Any idea?

Original issue reported on code.google.com by makarov....@gmail.com on 25 May 2012 at 12:47

GoogleCodeExporter commented 9 years ago
cat distinfo 
SHA256 (HandlerSocket-Plugin-for-MySQL-1.0.6-20110614.tar.gz) = 
1c951e444e7f91102d0986ce82f6028bf2eea55ae742b2e0210ec80a8c6cb09e
SIZE (HandlerSocket-Plugin-for-MySQL-1.0.6-20110614.tar.gz) = 2139275

Original comment by makarov....@gmail.com on 25 May 2012 at 12:50

GoogleCodeExporter commented 9 years ago
I resolved this problem:
Added to my.cnf in section [mysqld]
handlersocket_port_wr=9999
handlersocket_port=9998

Original comment by makarov....@gmail.com on 25 May 2012 at 1:14

GoogleCodeExporter commented 9 years ago
Turns out you have to disable SELINUX as well...

Original comment by ketam...@gmail.com on 19 Sep 2014 at 3:12