Modernmt: Running 2 instances of MMT on the same machine?

Created on 30 Nov 2017  路  5Comments  路  Source: modernmt/modernmt

Hello MMT team,

I have an MMT instance running. I trained another engine using a different standalone instance of MMT. Is there a way to run 2 instances of MMT on the same machine?

Whenever I start the new instance/engine on a different port, it throws this error:

ERROR Unexpected exception: Exception('failed to start node, check log file for more details: /opt/orcjap/runtime/enja/logs/node.log',)

Here is the output of the node.log file.

2017-11-29 22:50:41,670 INFO eu.modernmt.cluster.ClusterNode [main] Node is joining the cluster
2017-11-29 22:50:41,997 INFO com.hazelcast.instance.DefaultAddressPicker [main] [LOCAL] [eu.modernmt] [3.7.5] Interfaces is disabled, trying to pick one address from TCP-IP config addresses: []
2017-11-29 22:50:41,998 INFO com.hazelcast.instance.DefaultAddressPicker [main] [LOCAL] [eu.modernmt] [3.7.5] Prefer IPv4 stack is true.
2017-11-29 22:50:41,998 WARN com.hazelcast.instance.DefaultAddressPicker [main] [LOCAL] [eu.modernmt] [3.7.5] Could not find a matching address to start with! Picking one of non-loopback addresses.
2017-11-29 22:50:42,001 ERROR com.hazelcast.instance.DefaultAddressPicker [main] [LOCAL] [eu.modernmt] [3.7.5] Port [5016] is already in use and auto-increment is disabled. Hazelcast cannot start.
java.net.BindException: Address already in use

That being said, can I copy the new model from '/MMT/engines/enja' to the already running/old engine, then restart MMT and then I can call the API for enja without problems using source and target parameters? Would the REST API be functional for both engines; in my case "EN>ES" and "EN>JP"?

What do you think?

Thanks,
Mohamed

All 5 comments

Hi @mzeidhassan,

Yes, it is possible to run multiple engines on the same machine, but you can not connect them in the same cluster (because they share the same IP address).

If you need a single MMT installation to support both EN>ES and EN>JP, and if your models are neural, my advice is to have a single multilingual engine support these language pairs.

You can find here a guide on how to use your models in the same engine.

I hope this helps!

Have a nice day :)

Andrea

Thanks @AndRossi ! You said it's 'possible to run multiple engines on the same machine, but you can not connect them". Can you please let me know what you mean 'by connect them'. I want them running on the same machine independently. Is this possible? If yes, how?

If the only way for me to follow your guide and merge both engines, then I will give it a shot over the weekend and try to merge them.

Thanks again for your support!
Mohamed

Hi @mzeidhassan,

What I meant is that two engines can run on the same machine as long as they are not part of the same MMT cluster.

If you want your engines to run independently, on the contrary, that is definitely possible :)
Let's say you want to create an enja engine and an enes engine in the same machine.
You can do that this way (If I get it well, you have already done this part successfully):

$ ./mmt create en ja /path/to/your/en_ja/data/ -e enja
$ ./mmt create en es /path/to/your/en_es/data/ -e enes

Then you can start them separately like this:

$ ./mmt start -e enja
$ ./mmt start -e enes -p 8046 --cluster-port 5017 --datastream-port 9093 --db-port 9043

Of course, since the two engines are not part of the same cluster, you can not ask your enja engine to translate from EN to ES (and the same goes for your enes engine with EN-to-JA input).

Please let me know if this suits your needs and if this solves your problem :)
Have a great day!

Andrea

Yep, this is working perfectly fine. Thanks a million @AndRossi ! Please feel free to close this issue.

That's great!
As usual, feel free to reopen it if you need further support :)

Best,
Andrea

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EtienneAb3d picture EtienneAb3d  路  4Comments

EtienneAb3d picture EtienneAb3d  路  6Comments

mzeidhassan picture mzeidhassan  路  6Comments

LoekvanKooten picture LoekvanKooten  路  4Comments

EtienneAb3d picture EtienneAb3d  路  4Comments