<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello again!<br>
    <div class="moz-forward-container"> <br>
      I have a problem while trying to start GenieACS at bootup, using
      crontab or init.d<br>
      <br>
      Normally, what it works is to cd to root directory <i>/</i> and
      perform an <i>sh genieacs-start.sh</i>.<br>
      <br>
      The bash script <i>genieacs-start.sh</i> contains the following:<br>
      <br>
      <i>#!/bin/sh</i><i><br>
      </i><i>if tmux has-session -t 'genieacs'; then</i><i><br>
      </i><i>  echo "GenieACS is already running."</i><i><br>
      </i><i>  echo "To stop it use: ./genieacs-stop.sh"</i><i><br>
      </i><i>  echo "To attach to it use: tmux attach -t genieacs"</i><i><br>
      </i><i>else</i><i><br>
      </i><i>  tmux new-session -s 'genieacs' -d</i><i><br>
      </i><i>  tmux send-keys './genieacs/bin/genieacs-cwmp 2>&1
        | tee genieacs-cwmp.log' 'C-m'</i><i><br>
      </i><i>  tmux split-window</i><i><br>
      </i><i>  tmux send-keys './genieacs/bin/genieacs-nbi 2>&1 |
        tee genieacs-nbi.log' 'C-m'</i><i><br>
      </i><i>  tmux split-window</i><i><br>
      </i><i>  tmux send-keys './genieacs/bin/genieacs-fs 2>&1 |
        tee genieacs-fs.log' 'C-m'</i><i><br>
      </i><i>  tmux split-window</i><i><br>
      </i><i>  tmux send-keys 'cd genieacs-gui' 'C-m'</i><i><br>
      </i><i>  tmux send-keys 'rails server' 'C-m'</i><i><br>
      </i><i>  tmux select-layout tiled 2>/dev/null</i><i><br>
      </i><i>  tmux rename-window 'GenieACS'</i><i><br>
      </i><i><br>
      </i><i>  echo "GenieACS has been started in tmux session
        'genieacs'"</i><i><br>
      </i><i>  echo "To attach to session, use: tmux attach -t genieacs"</i><i><br>
      </i><i>  echo "To switch between panes use Ctrl+B-ArrowKey"</i><i><br>
      </i><i>  echo "To deattach, press Ctrl+B-D"</i><i><br>
      </i><i>  echo "To stop GenieACS, use: ./genieacs-stop.sh"<br>
        <br>
      </i>If from<b> crontab</b> I perform any of these possibilities,
      it doesn't work:<br>
      <br>
      @reboot sh /startAll.sh<br>
      <br>
      @reboot cd / && sh genieacs-start.sh 2>&1
      /var/log/genieacs-start.log<br>
      <br>
      @reboot /genieacs/bin/genieacs-cwmp 2>&1
      /var/log/genieacs-cwmp.log<br>
      @reboot /genieacs/bin/genieacs-nbi 2>&1
      /var/log/genieacs-nbi.log<br>
      @reboot /genieacs/bin/genieacs-fs 2>&1
      /var/log/genieacs-fs.log<br>
      <br>
      where file <i>/startAll.sh </i>contains the following:<br>
      <br>
      <i>cd / && sh genieacs-start.sh 2>&1
        /var/log/genieacs-start0.log</i><br>
      <br>
      <br>
      On the other hand, if I incorporate an init script on<b> init.d </b>of

      the genieacs-start.sh modifying the directories, it also doesn't
      work.<br>
      <br>
      The thing is that even now I'm trying to reproduce the exact
      problem as I am telling, I can't get the output log work. I know
      that is failing because the genieacs-cwmp script is failing and I
      don't get response from the devices.<br>
      <br>
      The other times I had an error like "<code>js-bson: Failed to load
        c++ bson extension, using pure JS version"</code><code><br>
      </code><br>
      Or like "Redis connection to 127.0.0.1:6379 failed - connect
      ECONNREFUSED<br>
          at RedisClient.on_error
      (/genieacs/node_modules/redis/index.js:196:24)"  (but the gui was
      working).<br>
      <br>
      Thank you in advance for your help!<br>
      <br>
      Sergio Fernández.<br>
      <br>
      <br>
    </div>
    <br>
  </body>
</html>