title: why xinetd can't run shell service
body: <p>guys,i have a problem on using xinetd,the error message is 'xinetd[20126]: execv( /home/fulu/download/mysqlchk_status2.sh ) failed: Exec format error (errno = 8)' </p>
  
  <ol>
  <li>the system operation is : CentOS release 6.2;</li>
  <li>i installed the xinetd by the command 'sudo yum install xinetd'</li>
  <li>i edited the /etc/services, add my port 6033 for my service named 'mysqlchk'</li>
  <li><p>the service 'mysqlchk' in /etc/xinetd.d/mysqlchk is</p>
  
  <p>service mysqlchk
  {
          disable = no
          flags           = REUSE
          socket_type     = stream
          port            = 6033
          wait            = no
          user            = fulu
          server          = /home/fulu/download/mysqlchk_status2.sh
          log_on_failure  += USERID 
  }</p></li>
  <li><p>the shell file /home/fulu/download/mysqlchk_status2.sh content is</p>
  
  <p>echo 'test'</p></li>
  </ol>
  
  <p>6.i can run the command /home/fulu/download/mysqlchk_status2.sh straightly and get the result 'test'</p>
  
  <ol>
  <li><p>when i telnet 127.0.0.1 6033,i get the output </p>
  
  <p>Trying 127.0.0.1...
  Connected to 127.0.0.1.
  Escape character is '^]'.
  Connection closed by foreign host.</p></li>
  </ol>
  
  <p>then i tail the log file /var/log/messages,it shows</p>
  
  <pre><code>Apr 22 22:01:47 AY1304111122016 xinetd[20001]: START: mysqlchk pid=20126 from=127.0.0.1
  Apr 22 22:01:47 AY1304111122016 xinetd[20126]: execv( /home/fulu/download/mysqlchk_status2.sh ) failed: Exec format error (errno = 8)
  Apr 22 22:01:47 AY1304111122016 xinetd[20001]: EXIT: mysqlchk status=0 pid=20126 duration=0(sec)
  </code></pre>
  
  <p>i don't know why,can anybody help me ?</p>