<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Run multiple webserver instance in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588699#M85094</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You can do that with the version selector.&lt;/P&gt;&lt;P&gt;If you want to open the "FlexSim 22.0 with a dedicated module and library," then load an fsm that was saved in version 22. It will open that FlexSim.&lt;/P&gt;&lt;P&gt;If you want to open the "FlexSim 24.0 with a dedicated module and library," then load an fsm that was saved in version 24. It will open &lt;EM&gt;that&lt;/EM&gt; FlexSim.&lt;/P&gt;&lt;P&gt;Instead of having to specify a different webserver port for each different FlexSim version, you can specify the FlexSim version to open based on the version saved in the fsm that you are trying to open. That's the point of the version selector.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;In the future I will migrate all libraries and modules to the same FlexSim version, but I can't do it now.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You don't need to do that now. If you use the version selector, then the same webserver can open different FlexSim versions with different modules and libraries.&lt;/P&gt;&lt;P&gt;How did you interpret what I said to mean that you would need to migrate all libraries and modules to the same FlexSim version??&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 23 May 2024 15:48:34 GMT</pubDate>
    <dc:creator>philboboADSK</dc:creator>
    <dc:date>2024-05-23T15:48:34Z</dc:date>
    <item>
      <title>Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588693#M85088</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 24.0.3 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;I have an issue with the webserver and I am searching a solution.&lt;/P&gt;&lt;P&gt;I need to run two different webservers in the same machine to support two different FlexSim versions.&lt;/P&gt;&lt;P&gt;If I run one webserver per time, everythings works. When I run both simultaneously, only one is initialize correctly. The second one return this error&lt;/P&gt;&lt;PRE&gt;Error:
listen EADDRINUSE: address already in use \\.\pipe\FlexsimServerRegistrationPipe
Error: listen EADDRINUSE: address already in use \\.\pipe\FlexsimServerRegistrationPipe
    at Server.setupListenHandle [as _listen2] (node:net:1855:21)
    at listenInCluster (node:net:1920:12)
    at Server.listen (node:net:2025:5)
    at Object.runServer [as run] (C:\Program Files (x86)\FlexSim Web Server 22 - CV\webserver\server.js:356:22)
    at runServer (C:\Program Files (x86)\FlexSim Web Server 22 - CV\webserver\index.js:125:16)
    at Object.&amp;lt;anonymous&amp;gt; (C:\Program Files (x86)\FlexSim Web Server 22 - CV\webserver\index.js:129:5)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)


There was a Problem with the FlexSim WebServer.
Press Enter to Exit.&lt;/PRE&gt;&lt;P&gt;I suppose that it isn't supported by webserver, but I need to confirm it. Do you have any workaround?&lt;/P&gt;&lt;P&gt;You can reproduce the problem in this easy way:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;install webserver 21.0 and configure it;&lt;/LI&gt;&lt;LI&gt;install webserver 22.2 and configure it;&lt;/LI&gt;&lt;LI id="isPasted"&gt;run the webserver 21.0 (should work correctly);&lt;/LI&gt;&lt;LI id="isPasted"&gt;run the webserver 22.2 (shoudn't work);&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I hope to find a solution!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 May 2024 08:28:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588693#M85088</guid>
      <dc:creator>amerloQ2XZU</dc:creator>
      <dc:date>2024-05-14T08:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588694#M85089</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/840/alessio.m.html" nodeid="840"&gt;@Alessio Merlo&lt;/A&gt;, You need probably a different setup to get access to your webserver on a different port or a second virtual internet address.&lt;/P&gt;&lt;PRE&gt;"address already in use"&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 May 2024 08:42:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588694#M85089</guid>
      <dc:creator>joerg_vogel_HsH</dc:creator>
      <dc:date>2024-05-14T08:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588695#M85090</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P id="isPasted" style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;Thanks &lt;A rel="user" href="https://answers.flexsim.com/users/461/joerg.v.html" nodeid="461"&gt;@&lt;/A&gt;Joerg for quick reply! But the port is not the problem.&lt;/P&gt;&lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;When I use the same port the error is:&lt;/P&gt;&lt;PRE style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;Error:
listen EADDRINUSE: address already in use :::8081
Error: listen EADDRINUSE: address already in use :::8081
    at Server.setupListenHandle [as _listen2] (node:net:1872:16)
    at listenInCluster (node:net:1920:12)
    at Server.listen (node:net:2008:7)
    at Object.runServer [as run] (C:\Program Files (x86)\FlexSim Web Server 22 - test\webserver\server.js:578:19)
    at runServer (C:\Program Files (x86)\FlexSim Web Server 22 - test\webserver\index.js:125:16)
    at Object.&amp;lt;anonymous&amp;gt; (C:\Program Files (x86)\FlexSim Web Server 22 - test\webserver\index.js:129:5)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
 
 
There was a Problem with the FlexSim WebServer.
Press Enter to Exit.&lt;/PRE&gt;&lt;P id="isPasted" style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;Totally different message!&lt;/P&gt;&lt;P style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;I suppose that the problem is in runServer() function where the server defines the REG_PIPE_PATH. I tried to change the path, the server starts, but then nothing more works.&lt;/P&gt;&lt;PRE style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: "&gt;function runServer() {
    // registration pipe
    REG_PIPE_PATH = "\\\\.\\pipe\\&lt;STRONG&gt;&lt;U&gt;FlexsimServerRegistrationPipe&lt;/U&gt;&lt;/STRONG&gt;";
    registrationPipe = net.createServer(function(stream) {
        stream.on('data', function(message) {
            var parsedMessage = (message + "").split(",");
            var pid = parsedMessage[0];
            for(var i = 0; i &amp;lt; instances.length; i++) {
                if(instances&lt;I&gt;.proc.pid == pid) {
                    // Store the instance's version before registering
                    if(parsedMessage.length &amp;gt; 1) {
                        instances&lt;I&gt;.version = parsedMessage[1];
                    }

                    instances&lt;I&gt;.registered = true;
                }
            }
        });
        stream.write('3.0.0');
    });
    registrationPipe.listen(REG_PIPE_PATH);&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 May 2024 08:51:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588695#M85090</guid>
      <dc:creator>amerloQ2XZU</dc:creator>
      <dc:date>2024-05-14T08:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588696#M85091</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Does anybody help me? &lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@Phil BoBo&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/220/jordan.j.html" nodeid="220"&gt;@Jordan Johnson&lt;/A&gt; &lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 May 2024 10:12:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588696#M85091</guid>
      <dc:creator>amerloQ2XZU</dc:creator>
      <dc:date>2024-05-23T10:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588697#M85092</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You don't need multiple webservers to support multiple FlexSim versions anymore.&lt;/P&gt;&lt;P&gt;Just specify the path to the Version Selector for the FlexSim program directory in the webserver configuration file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1716472466743.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1523896iD1F56F93FD8A58A7/image-size/large?v=v2&amp;amp;px=999" role="button" title="1716472466743.png" alt="1716472466743.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 May 2024 13:54:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588697#M85092</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2024-05-23T13:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588698#M85093</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@&lt;/A&gt; Phil,&lt;P&gt;I need to keep alive two different webserver instances because they allow two different workflows from the user perspective. I can't simply switch from one FlexSim version to another one.&lt;/P&gt;&lt;P&gt;My framework is:&lt;/P&gt;&lt;P&gt;- webserver 21.0 with FlexSim 22.0 with a dedicated module and library;&lt;/P&gt;&lt;P&gt;- webserver 22.2 with FlexSim 24.0 with a dedicated module and library;&lt;/P&gt;&lt;P&gt;In the future I will migrate all libraries and modules to the same FlexSim version, but I can't do it now.&lt;/P&gt;&lt;P&gt;Rigth now I would like to different address to reach the server and manage the workflow separately.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 May 2024 15:45:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588698#M85093</guid>
      <dc:creator>amerloQ2XZU</dc:creator>
      <dc:date>2024-05-23T15:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588699#M85094</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You can do that with the version selector.&lt;/P&gt;&lt;P&gt;If you want to open the "FlexSim 22.0 with a dedicated module and library," then load an fsm that was saved in version 22. It will open that FlexSim.&lt;/P&gt;&lt;P&gt;If you want to open the "FlexSim 24.0 with a dedicated module and library," then load an fsm that was saved in version 24. It will open &lt;EM&gt;that&lt;/EM&gt; FlexSim.&lt;/P&gt;&lt;P&gt;Instead of having to specify a different webserver port for each different FlexSim version, you can specify the FlexSim version to open based on the version saved in the fsm that you are trying to open. That's the point of the version selector.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;In the future I will migrate all libraries and modules to the same FlexSim version, but I can't do it now.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You don't need to do that now. If you use the version selector, then the same webserver can open different FlexSim versions with different modules and libraries.&lt;/P&gt;&lt;P&gt;How did you interpret what I said to mean that you would need to migrate all libraries and modules to the same FlexSim version??&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 May 2024 15:48:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588699#M85094</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2024-05-23T15:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588700#M85095</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Thanks Phil!&lt;P&gt;I will test your idea, it should work! I need to create two different models and use FlexSim version selector to open it. Great!&lt;/P&gt;&lt;P&gt;One doubt for the future: when I will migrate both modules and libraries to same FlexSim version (not mandatory now), how I can manage it? Potentially the modules and libraries can be not compatible and then I will have 2 different flexsim.exe for the same version. In this case the selector recognizes just one, is it correct?&lt;/P&gt;&lt;P&gt;As for me will be mandatory to make the modules compatible!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 May 2024 16:29:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588700#M85095</guid>
      <dc:creator>amerloQ2XZU</dc:creator>
      <dc:date>2024-05-23T16:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Run multiple webserver instance</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588701#M85096</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Right now, the version selector only works with the FlexSim versions installed in Add/Remove Programs, and you can't have multiple copies of the same version installed there.&lt;/P&gt;&lt;P&gt;You would need to modify the webserver's code if you wanted to be able to select between two different FlexSim installs at different locations with the same version number.&lt;/P&gt;&lt;P&gt;If you need such a customized solution, you'll need to customize it yourself. We're not going to deal with such a unique situation.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 May 2024 16:35:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/run-multiple-webserver-instance/m-p/13588701#M85096</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2024-05-23T16:35:23Z</dc:date>
    </item>
  </channel>
</rss>

