{"id":8307,"date":"2020-07-23T10:03:42","date_gmt":"2020-07-23T17:03:42","guid":{"rendered":"https:\/\/minisoft.com\/support\/?p=8307"},"modified":"2021-10-01T08:32:08","modified_gmt":"2021-10-01T15:32:08","slug":"managing-configurations-for-director-toolkit-on-unix-linux","status":"publish","type":"post","link":"https:\/\/alt2.minisoft.com\/support\/managing-configurations-for-director-toolkit-on-unix-linux\/","title":{"rendered":"Managing configurations for Director Toolkit on Unix\/Linux"},"content":{"rendered":"\n<p>To control\/view the Director on a Unix\/Linux box, you need to set up tunnels and connect in with Putty before you start up the Director on the Windows box. Follow the steps below to connect to Director Toolkit running on a remote Unix\/Linux instance. On the remote Unix\/Linux instance, add\/modify the JmxPort setting in <code>DirectorSettings.xml<\/code>. This value represents the port that you want to connect to.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Setting Value=\"8996\" Name=\"JmxPort\" \/&gt;<\/pre>\n\n\n\n<p>Add the following to eFORMz startup parameters. This needs to be added to all eFORMz startup scripts. Check \/minisoft\/eformz_start.sh and the service file: <code>\/lib\/systemd\/system\/eFORMzServiceManager.service<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-Djava.rmi.server.hostname=localhost<\/pre>\n\n\n\n<p>Stop and restart eFORMz on the Linux instance. Verify that the JmxPort is active on the Linux instance:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -aon | grep 996<\/pre>\n\n\n\n<p>You should see something like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[eformz@eformz-demo minisoft]$ netstat -aon | grep 96 \ntcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0.0.0.0:8996&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LISTEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; off (0.00\/0\/0)\ntcp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0.0.0.0:9996&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0:*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LISTEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; off (0.00\/0\/0)<\/pre>\n\n\n\n<p>8996 &#8211; this is the JmxPort specified in <code>DirectorSettings.xml<\/code><\/p>\n\n\n\n<p>9996 &#8211; this is the standard port used by Director<\/p>\n\n\n\n<p>On Windows, verify that port 9996 is not already in use. If you have eFORMz Service Manager or Director running locally on your Windows box, you will not be able to use 9996 as a tunnel. Shut down or stop local eFORMz Service Manager or Director. Execute the following in a command prompt: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -aon | findstr \"996\" <\/pre>\n\n\n\n<p>This will verify that ports 8996 and 9996 are unbound.<\/p>\n\n\n\n<p>On Windows, start Putty and load the session that you normally use to SSH into the remote Unix\/Linux instance. Expand the SSH node and click on &#8220;Tunnels&#8221;. Create the following Tunnel configurations:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"452\" height=\"442\" src=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel.png\" alt=\"\" class=\"wp-image-8308\" srcset=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel.png 452w, https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel-300x293.png 300w, https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel-150x147.png 150w, https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel-48x48.png 48w, https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel-250x244.png 250w, https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel-184x180.png 184w, https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2020\/07\/Putty-Tunnel-307x300.png 307w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/figure>\n\n\n\n<p>Set Source port to the JmxPort value (8996).  Set Destination to be localhost:8996. Do the same for Director&#8217;s default port: 9996<\/p>\n\n\n\n<p>Save the SSH configuration and then click open. Verify that your local tunnels are active by running: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -aon | findstr \"996\"<\/pre>\n\n\n\n<p>At this point, you can interact with the remote Linux instance&#8217;s Director Toolkit, but how you interact with it will depend on what you need to do. If you need to access the Director tab to Start and Stop Director configuration files, do the following:<\/p>\n\n\n\n<ol><li>On Windows, start eFORMz and select Host Tools | Local Director Toolkit. This will bring up Director Toolkit, but since your tunnels (8996 and 9996) are active you are actually interacting with the Director Toolkit running on the remote Linux instance. <\/li><li>Switch to the Director tab. If the remote Linux instance has active Director configurations you should see them up and running along with any associated logging. This is similar to viewing local Director configurations, except in this case you are looking at the remote Director. You can start\/stop the remote configurations from this Director Toolkit instance.<\/li><\/ol>\n\n\n\n<p>If you need to change a remote configuration or change Printers, Databases, Archives, PrintServices, you need a separate Director Toolkit instance.<\/p>\n\n\n\n<ol><li>In eFORMz, go to Host Tools | Unix | Director Toolkit. You should see a new Director Toolkit dialog appear. It might take a few seconds to render as it connects to the remote Director. <\/li><li>In this Director Toolkit instance, you will be able to change Director configurations, add\/remote printers, modify database connections\/archives\/print services. <\/li><\/ol>\n\n\n\n<p>When you are done, make sure you exit\/disconnect your Director Toolkit connections before exiting out of your SSH session.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using command line controls to interact with the Director from an SSH session<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">java -jar Run.jar \u2013 com.minisoft.Director.manage.DirectorCommand [options]<\/pre>\n\n\n\n<p>where [options] are:<\/p>\n\n\n\n<p>host= \u2013 default is \u201clocalhost\u201d<br>port= \u2013 default is 9996<br>user= \u2013 Director management user name<br>password= \u2013 Director management password<br>shutdown \u2013 Shut down the Director<br>status \u2013 Display the running configurations<br>startcfg= \u2013 Start the named configuration file<br>stopcfg= \u2013 Stop the named configuration<br>restartcfg= \u2013 Restart the named configuration<br>reload=eformzcfg \u2013 Reload the eFORMzCfg.xml files<br>reload=printerscfg \u2013 Reload Printers.xml<br>reload=databasescfg \u2013 Reload Databases.xml<br>reload=archivecfg \u2013 Reload Archives.xml<\/p>\n\n\n\n<p>com.minisoft.Run.ServiceController 9995<br>com.minisoft.Director.Director 9996<br>com.minisoft.mta.service.Service 9997<br>com.minisoft.webserver.WebServer 9998<\/p>\n\n\n\n<p>If the web page is used, the default ports are 8000 and 8001. The web server is configurable and may use alternate ports. The SSH port is one eFORMz uses. The service (sshd) is provided by the operating system and may use an alternate port.<\/p>\n\n\n\n<p>The four ports used by the eFORMz controllers are fixed and cannot be configured to use an alternate for listening. That said, if the server with eFORMz is being a &#8220;NAT&#8221; firewall, the firewall can translate between two port numbers. The private address for Director must be 9996. With NAT, the public address can be any other available port number.<\/p>\n\n\n\n<p>While not required, it may be convenient to use the Server Manager to launch and control Director for cloud customers who have limited access to the system.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">java -jar Run.jar - com.minisoft.Director.manage.DirectorCommand user=minisoft password=password restartcfg=LocalPM.cfg<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">eFORMz as a service on Linux\/UNIX<\/h2>\n\n\n\n<p>If a situation arises where a termination of the background process is needed, please take note of the following.<\/p>\n\n\n\n<ul><li>The normal signal to send should be 1, 2, or 15.&nbsp; These are equivalent to eFORMz. Processing will shutdown in an orderly fashion. This may take some time as files currently being processed will complete.<\/li><li>If an immediate stop of eFORMz is required, use 9.&nbsp; This will stop processing without waiting for completion. Partial spool files may print. In use files will not have disposition handling and will start over when processing resumes.<\/li><li>Use of 4, 5, 6, 7, 8, 10, 11, 12, 13, and 14 are not recommended and will result in unexpected behavior.<\/li><li>Using a signal value of 3 (<code>SIGQUIT<\/code>) will not stop eFORMz. This signal will attempt to write extra trace information (stack trace ) to the <code>stdout<\/code>.<\/li><\/ul>\n\n\n\n<p>NOTE: When using <code>systemd<\/code> to manage the eFORMz service, the default shutdown is via signal 15 (<code>SIGTERM<\/code>). This may not stop processing immediately if a large or otherwise time consuming process is active. A restart using <code>systemd<\/code> can fail if a script to wait for eFORMz to complete is not configured.<\/p>\n\n\n\n<p>Sample:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@lithium:\/minisoft# ps -ef | grep java<br>root 14201 1 99 14:35 ? 00:00:04 java -mx1024m -ms128m -jar Run.jar -Monitor=true -<br>root@lithium:\/minisoft# kill -15 14201<br>root@lithium:\/minisoft# ps -ef | grep java<br>root@lithium:\/minisoft#<\/pre>\n\n\n\n<p>Linux\/UNIX Signal number to name table:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1) SIGHUP<br>2) SIGINT<br>3) SIGQUIT<br>4) SIGILL<br>5) SIGTRAP<br>6) SIGABRT<br>7) SIGBUS<br>8) SIGFPE<br>9) SIGKILL<br>10) SIGUSR1<br>11) SIGSEGV<br>12) SIGUSR2<br>13) SIGPIPE<br>14) SIGALRM<br>15) SIGTERM<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To control\/view the Director on a Unix\/Linux box, you need to set up tunnels and connect in with Putty before you start up the Director on the Windows box. Follow the steps below to connect to Director Toolkit running on a remote Unix\/Linux instance. On the remote Unix\/Linux instance, add\/modify the JmxPort setting in DirectorSettings.xml. [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85,1],"tags":[419,95,626,82,341],"_links":{"self":[{"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8307"}],"collection":[{"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=8307"}],"version-history":[{"count":5,"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8307\/revisions"}],"predecessor-version":[{"id":9786,"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/8307\/revisions\/9786"}],"wp:attachment":[{"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=8307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=8307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alt2.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=8307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}