mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.28k stars 1.11k forks source link

Create multiple instance of murmur server and run with service mumble-serverX start|enable #4827

Closed rodrigoslayertech closed 3 years ago

rodrigoslayertech commented 3 years ago

Hello! I have duplicate these files:

(!!! Consider "X" as many instances of Mumble-server as you want.)

/etc

Copy /etc/mumble-server.ini to /etc/mumble-serverX.ini Edit mumble-serverX.ini files: database=/var/lib/mumble-server/mumble-serverX.sqlite logfile=/var/log/mumble-server/mumble-serverX.log pidfile=/var/run/mumble-server/mumble-serverX.pid port=64739 // + 1 (64740, 64741, and so on...) registerName=Mumble Server X

/etc/init.d

Copy /etc/init.d/mumble-server to /etc/init.d/mumble-serverX Edit mumble-serverX files: NAME=mumble-serverX DESC="Mumble VoIP Server X" INIFILE=/etc/mumble-serverX.ini

Now... how to create multiple mumble-serverX.service to run (service mumble-serverX start) and put on autostart (service mumble-serverX enable) independently?

service mumble-serverX start:
Failed to start mumble-server2.service: Unit mumble-server2.service not found.

* update-rc.d mumble-serverX defaults does not work to create mumble-serverX.service units

Krzmbrzl commented 3 years ago

What are you trying to achieve? Hosting multiple Mumble servers from a single machine? That actually already works with a single server instance running. You can create what is called a "vritaul server" (as many as you want/need).

rodrigoslayertech commented 3 years ago

"vritaul server"? How to create "vritaul server" on Ubuntu for example?

Krzmbrzl commented 3 years ago

Ah sorry. That's supposed to be "virtual" xD

In order to create these virtual servers, you'll have to use the Ice interface. There you can create and boot new servers. You can also use a tool (I think mumble-moderator can do this) that facilitates this.

rodrigoslayertech commented 3 years ago

Is there no way to create another service on Ubuntu to start another separate instance? I can do this on Debian but not on Ubuntu.

Using update-rc.d in Debian it generates another service, but not in Ubuntu. I already have a machine in Debian with 299 servers, but I cannot restart separately. To restart any changes in Debian I have to restart the server with "sudo reboot"

Krzmbrzl commented 3 years ago

From the error message it seems like the service file is not found.

I don't see a reason why doing this should not work on Ubuntu. But I also don't know much about services :shrug:

@davidebeatrici I think you have more experience with this kind of stuff. Any idea?

davidebeatrici commented 3 years ago

Why are you attempting to use both init.d and systemd?

Kissaki commented 3 years ago

If you use a systemd service unit definition you do not have to tamper with init.d files at all. by calling systemctl enable those will be created if even necessary. Systemd is a replacement to the old init.rc system, and easier to work with.

In /etc/systemd/system/ copy mumble-server.service to mumble-serverX.service, and adjust its content accordingly.

Then systemctl status/enable/start mumble-serverX.service should work.

Kissaki commented 3 years ago

Sorry, I think I misread service, and davide saying systemd is used.

But from what @slowaways wrote nothing says systemd.

service - run a System V init script

I think those are in /etc/init.d? Not sure why it would not be found.

Kissaki commented 3 years ago

service runs a System V init script or systemd unit

If you can and are willing, I would strongly recommend switching to systemd. There is a single service configuration so it is easier to talk about and debug issues.

I don't know why service may not find your file. You're the only one who can check on it on your system.

The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT

So /etc/init.d/SCRIPT is correct. If that does not work, check the file permissions. Otherwise it'll be on you to check further, or switch away and try something different (systemd).

davidebeatrici commented 3 years ago

Sorry, saw .service and immediately associated it with systemd.

stale[bot] commented 3 years ago

This support-issue has been automatically marked as stale because it has not had recent activity. If no further activity occurs, the issue will be automatically closed as we'll assume your problem to be fixed.