Answer for Daemon mode creates two processes on Ubuntu 14.04

Hi Bryan, While I thought I had a valid workaround for running EvoStream on 14.04, your explanation around multiple processes gives me pause, and I wanna make sure I’m not shooting myself in the foot here. So here’s what happens when I launch the default init.d script on 14.04:

evostre+ 12349  0.5  0.2  28652  4012 ?        Ss   15:00   0:00 /usr/bin/evostreamms --daemon --uid=1002 --gid=1002 --pid=/var/run/evostreamms/evostreamms.pid /etc/evostreamms/config.lua
root     12350  0.0  0.0  19736   596 ?        S    15:00   0:00 /usr/bin/evostreamms --daemon --uid=1002 --gid=1002 --pid=/var/run/evostreamms/evostreamms.pid /etc/evostreamms/config.lua
And with this setup, I can’t even create stream aliases or ingest points, despite my config requesting them:

vagrant@vagrant-ubuntu-trusty-64:/var/log/evostreamms$ telnet localhost 1112
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
createIngestPoint privateStreamName=secret1 publicStreamName=test1
d{"data":null,"description":"Unable to create ingest point `secret1` -> `test1`","status":"FAIL"}
Lastly, here is our config.lua:

configuration=
{
	daemon=false,
	instancesCount=-1,
	pathSeparator="/",
	logAppenders=
	{
		--[[{
			name="console appender",
			type="coloredConsole",
			level=6
		},]]--
		{
			name="file appender",
			type="file",
			level=6,
			fileName="/var/log/evostreamms/evostreamms",
			newLineCharacters="n",
			fileHistorySize=100,
			fileLength=1024*1024,
			singleLine=true
		},
	},
	applications=
	{
		rootDirectory="./",
		{
			appDir="./",
			name="evostreamms",
			description="EVOSTREAM MEDIA SERVER",
			protocol="dynamiclinklibrary",
			default=true,
			pushPullPersistenceFile="/var/evostreamms/xml/pushPullSetup.xml",
			authPersistenceFile="/var/evostreamms/xml/auth.xml",
			connectionsLimitPersistenceFile="/var/evostreamms/xml/connlimits.xml",
			bandwidthLimitPersistenceFile="/var/evostreamms/xml/bandwidthlimits.xml",
			ingestPointsPersistenceFile="/var/evostreamms/xml/ingestpoints.xml",
			streamsExpireTimer=10,
			rtcpDetectionInterval=15,
			hasStreamAliases=true,
			hasIngestPoints=true,
			validateHandshake=false,
			aliases={"reel"},
			maxRtmpOutBuffer=512*1024,
			mediaStorage = {
				recordedStreamsStorage="/var/evostreamms/media",
				{
					description="Default media storage",
					mediaFolder="/var/evostreamms/media",
				},
				--[[
				-- the following is an example and contains all
				-- available properties along with their default
				-- values(except paths, of course)
				sample={
					description="Storage example",
					mediaFolder="/some/media/folder",
					metaFolder="/fast/discardable/separate/folder",
					enableStats=false,
					clientSideBuffer=15,
					keyframeSeek=true,
					seekGranularity=0.1,
					externalSeekGenerator=false,
				}
				]]--
			},
			acceptors=
			{
				-- CLI aceptors
				{
					ip="127.0.0.1",
					port=1112,
					protocol="inboundJsonCli",
					useLengthPadding=true
				},
				{
					ip="0.0.0.0",
					port=7777,
					protocol="inboundHttpJsonCli"
				},

				-- RTMP and clustering
				{
					ip="0.0.0.0",
					port=1935,
					protocol="inboundRtmp",
				},
				{
					ip="127.0.0.1",
					port=1936,
					protocol="inboundRtmp",
					clustering=true
				},
				{
					ip="127.0.0.1",
					port=1113,
					protocol="inboundBinVariant",
					clustering=true
				},

				-- RTSP
				--[[{
					ip="0.0.0.0",
					port=5544,
					protocol="inboundRtsp",
					
					multicast=
					{
						ip="224.2.1.39",
						ttl=127,
					}
				},]]--

				-- LiveFLV ingest
				{
					ip="0.0.0.0",
					port=6666,
					protocol="inboundLiveFlv",
					waitForMetadata=true,
				},
				
				-- HTTP
				--[[{
					ip="0.0.0.0",
					port=8080,
					protocol="inboundHttp",
				},]]--
				--RTMPS
				{
					ip="0.0.0.0",
					port=4443,
					protocol="inboundRtmp",
					-- cipherSuite="!DEFAULT:RC4-SHA", -- enables/disables a specific set of ciphers. If not specified, it is defaulted to the openssl collection of ciphers
					sslKey="/etc/evostreamms/evostreamd.key",
					sslCert="/etc/evostreamms/evostreamd.cert",
				}
			},
			--[[
			autoHLS=
			{
				targetFolder= "/var/evostreamms/media",
			},
			autoHDS=
			{
				targetFolder= "/var/evostreamms/media",
			},
			]]--
			--[[
			authentication=
			{
				rtmp=
				{
					type="adobe",
					encoderAgents=
					{
						"FMLE/3.0 (compatible; FMSc/1.0)",
						"Wirecast/FM 1.0 (compatible; FMSc/1.0)",
						"EvoStream Media Server (www.evostream.com)"
					},
					usersFile="/etc/evostreamms/users.lua"
				},
				rtsp=
				{
					usersFile="/etc/evostreamms/users.lua",
					--authenticatePlay=false,
				}
			},
			]]--
			eventLogger=
			{
				-- the following customData node will be apended to all outgoing
				-- events generated by this logger.
				--customData=123,
				sinks=
				{
					--[[{
						-- the following customData node will be apended to all
						-- events generated by this sink. It overwrides the
						-- customData node defined on the upper level. It can
						-- also be a complex structure like this
						customData =
						{
							some="string",
							number=123.456,
							array={1, 2.345, "Hello world", true, nil}
						},
						type="file",
						filename="/var/log/evostreamms/events.txt",
						--format="text",
						--format="xml",
						format="json",
					},]]--
					--[[{
						type="RPC",
						url="http://localhost/evowebservices/evowebservices.php",
						serializerType="JSON",
						-- serializerType="XML"
						-- serializerType="XMLRPC"
						enabledEvents=
						{
							"inStreamCreated",
							"outStreamCreated",
							"streamCreated",
							"inStreamCodecsUpdated",
							"outStreamCodecsUpdated",
							"streamCodecsUpdated",
							"inStreamClosed",
							"outStreamClosed",
							"streamClosed",
							"cliRequest",
							"cliResponse",
							"applicationStart",
							"applicationStop",
							"carrierCreated",
							"carrierClosed",
							"serverStarted",
							"serverStopping",
							"protocolRegisteredToApp",
							"protocolUnregisteredFromApp",
							"processStarted",
							"processStopped",
							"timerCreated",
							"timerTriggered",
							"timerClosed",
							"hlsChunkCreated",
							"hlsChunkClosed",
							"hlsChunkError",
							"hlsChildPlaylistUpdated",
							"hlsMasterPlaylistUpdated",
							"hdsChunkCreated",
							"hdsChunkClosed",
							"hdsChunkError",
							"hdsChildPlaylistUpdated",
							"hdsMasterPlaylistUpdated"
						},
					},]]--
					{
						type="RPC",
						url="<%= node[:evostream][:rtmp_manager_url] %>",
						serializerType="JSON",
						enabledEvents=
						{
							"serverStarted",
							"serverStopping"
						},
					},
					{
						type="RPC",
						url="<%= node[:evostream][:web_service_url] %>",
						serializerType="JSON",
						enabledEvents=
						{
							"inStreamCreated",
							"outStreamCreated",
							"inStreamClosed",
							"outStreamClosed"
						},
					}
				},
			},
			transcoder = {
				scriptPath="/usr/bin/emsTranscoder.sh",
				srcUriPrefix="rtsp://localhost:5544/",
				dstUriPrefix="-f flv tcp://localhost:6666/"
			},
			mp4BinPath="/usr/bin/evo-mp4writer",
			--[[
			drm={
				type="verimatrix",
				requestTimer=1,
				reserveKeys=10,
				reserveIds=10,
				-- urlPrefix="http://server1.evostream1.com:12684/CAB/keyfile"
				urlPrefix="http://vcas3multicas1.verimatrix.com:12684/CAB/keyfile"
			},
			]]--
		},
	}
}
I experienced the same behavior with the stock configu.lua as well — I was unable to even play back an .flv file :/ If I use the init script I posted previously, I get only a single process, and everything behaves correctly. But, from what you’re saying, I’m probably not getting the most out of the instance then. Thoughts?

Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.