Hello,
I’d like to create a custom module
I’ve followed the instructions of the Wowza IDE Guide https://www.wowza.com/uploads/developers/WowzaIDE_UsersGuide.pdf and the module compiles and start the server perfectly but… two questions…
-
Why the server don’t start 8088 port for Streaming Engine Manager?
-
Why I don’t get any info in the console or the log files with the following code requesting a live stream?
package com.mycompany.wms.module;
import com.wowza.wms.application.*;
import com.wowza.wms.amf.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.*;
import com.wowza.wms.request.*;
import com.wowza.wms.stream.*;
import com.wowza.wms.rtp.model.*;
import com.wowza.wms.httpstreamer.model.*;
import com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.*;
import com.wowza.wms.httpstreamer.smoothstreaming.httpstreamer.*;
public class live extends ModuleBase {
public void doSomething(IClient client, RequestFunction function,
AMFDataList params) {
getLogger().info("doSomething");
sendResult(client, params, "Hello Wowza");
}
public void onAppStart(IApplicationInstance appInstance) {
String fullname = appInstance.getApplication().getName() + "/"
+ appInstance.getName();
getLogger().info("onAppStart: " + fullname);
}
public void onAppStop(IApplicationInstance appInstance) {
String fullname = appInstance.getApplication().getName() + "/"
+ appInstance.getName();
getLogger().info("onAppStop: " + fullname);
}
public void onConnect(IClient client, RequestFunction function,
AMFDataList params) {
getLogger().info("onConnect: " + client.getClientId());
}
public void onConnectAccept(IClient client) {
getLogger().info("onConnectAccept: " + client.getClientId());
}
public void onConnectReject(IClient client) {
getLogger().info("onConnectReject: " + client.getClientId());
}
public void onDisconnect(IClient client) {
getLogger().info("onDisconnect: " + client.getClientId());
}
public void onStreamCreate(IMediaStream stream) {
getLogger().info("onStreamCreate: " + stream.getSrc());
}
public void onStreamDestroy(IMediaStream stream) {
getLogger().info("onStreamDestroy: " + stream.getSrc());
}
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
getLogger().info("onHTTPSessionCreate: " + httpSession.getSessionId());
}
public void onHTTPSessionDestroy(IHTTPStreamerSession httpSession) {
getLogger().info("onHTTPSessionDestroy: " + httpSession.getSessionId());
}
public void onHTTPCupertinoStreamingSessionCreate(
HTTPStreamerSessionCupertino httpSession) {
getLogger().info(
"onHTTPCupertinoStreamingSessionCreate: "
+ httpSession.getSessionId());
}
public void onHTTPCupertinoStreamingSessionDestroy(
HTTPStreamerSessionCupertino httpSession) {
getLogger().info(
"onHTTPCupertinoStreamingSessionDestroy: "
+ httpSession.getSessionId());
}
public void onHTTPSmoothStreamingSessionCreate(
HTTPStreamerSessionSmoothStreamer httpSession) {
getLogger().info(
"onHTTPSmoothStreamingSessionCreate: "
+ httpSession.getSessionId());
}
public void onHTTPSmoothStreamingSessionDestroy(
HTTPStreamerSessionSmoothStreamer httpSession) {
getLogger().info(
"onHTTPSmoothStreamingSessionDestroy: "
+ httpSession.getSessionId());
}
public void onRTPSessionCreate(RTPSession rtpSession) {
getLogger().info("onRTPSessionCreate: " + rtpSession.getSessionId());
}
public void onRTPSessionDestroy(RTPSession rtpSession) {
getLogger().info("onRTPSessionDestroy: " + rtpSession.getSessionId());
}
public void onCall(String handlerName, IClient client,
RequestFunction function, AMFDataList params) {
getLogger().info("onCall: " + handlerName);
}
}
Best regards
To answer your questions:
Why the server don’t start 8088 port for Streaming Engine Manager?
Ensure that you don’t have port 8088 blocked in your local firewall and check that the manager is started.
Why I don’t get any info in the console or the log files with the following code requesting a live stream?
Did you setup the module in your Application.xml (under ) similar to the following (as obtained from the user guide):
<Module>
<Name>Live</Name>
<Description>Live Module</Description>
<Class>com.mycompany.wms.module.live</Class>
</Module>
Is your .jar file also included in the [install-dir]/lib directory?
Hi,
Port 8088 is for the Wowza Streaming Engine Manager which runs as a separate service to the main server.
You should be able to start it from the command line by going to /Library/WowzaStreamingEngine/manager/bin and running sudo ./startmgr.sh.
You can also set it to run continuously by starting it using the launchctl command. Please refer to the Users Guide for detailed instructions. The Manager is a basic web server so when it is not being used in the browser, it will just sit quietly waiting. When you start the main server from the command line, you will be able to connect to it from the manager. You may notice some errors in the manager if you do shut down the main server and are on one of the pages that automatically refreshes.
Roger.
Thanks matt_y,
The module now is working and I receive all the messages in the console window, the problem was on the Application.xml wrong module name.
But the 8088 port isn’t started, here is the console log, it seems that it didn’t try to start it.
Configure logging: file:///Library/WowzaStreamingEngine-4.0.3/conf/log4j.properties
INFO server server-start Wowza Streaming Engine 4 Developer Edition (Expires: oct 18, 2014) 4.0.3 build10989 -
INFO server comment - Server License Key: EDEV4-XXXXX-XXXXX-XXXXX-XXXXX-7d9AG
INFO server comment - Maximum Connections: 10
INFO server comment - Maximum Incoming Streams: 3
INFO server comment - Transcoder Streams Available: Transcoder Not Available (osx-64)
INFO server comment - nDVR Available: Yes
INFO server comment - DRM Available: Yes
INFO server comment - HTTP Origin Available: No
INFO server comment - Push Publish Available: Yes
INFO server comment - REST API Available: Yes
INFO server comment - Hardware Available Processors: 4
INFO server comment - Hardware Physical Memory: 10970MB/16384MB
INFO server comment - Hardware Swap Space: 1386MB/2048MB
INFO server comment - Max File Descriptor Count: 10240
INFO server comment - Open File Descriptor Count: 85
INFO server comment - OS Name: Mac OS X
INFO server comment - OS Version: 10.9.2
INFO server comment - OS Architecture: x86_64
INFO server comment - Java Name: Java HotSpot(TM) 64-Bit Server VM
INFO server comment - Java Vendor: Apple Inc.
INFO server comment - Java Version: 1.6.0_65
INFO server comment - Java VM Version: 20.65-b04-462
INFO server comment - Java Spec Version: 1.6
INFO server comment - Java Home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
INFO server comment - Java Max Heap Size: 759MB
INFO server comment - Java Architecture: 64
INFO server comment - Java Locale[user.language]: es
INFO server comment - Java Locale[user.country]: ES
INFO server comment - Java Locale[file.encoding]: US-ASCII
INFO server comment - Java Timezone[user.timezone]: Europe/Madrid
INFO server comment - Java Args[0]: -Xmx768M
INFO server comment - Java Args[1]: -Dcom.wowza.wms.AppHome=/Library/WowzaStreamingEngine-4.0.3
INFO server comment - Java Args[2]: -Dcom.wowza.wms.ConfigHome=/Library/WowzaStreamingEngine-4.0.3
INFO server comment - Java Args[3]: -Dcom.sun.management.jmxremote=true
INFO server comment - Java Args[4]: -Dcom.wowza.wms.native.base=osx
INFO server comment - Java Args[5]: -Dfile.encoding=US-ASCII
INFO server comment - Server native.platform: osx
INFO server comment - Server threads[h/t]: 120/80
INFO server comment - RESTServer: Bind attempt ([any]:8087)
INFO server comment - RESTServer: Bind successful ([any]:8087)
INFO server comment - Wowza REST API started
INFO server comment - REST API: ready
INFO server comment - RESTServer: Using configs from:/Library/WowzaStreamingEngine-4.0.3/
INFO server comment - RESTServer: SSL:No
INFO server comment - RESTServer: BasicAuth:No
INFO server comment - RESTServer: Digest:Yes
INFO server comment - RESTServer: XML Viewer:No
INFO server comment - CMDInterface now listening: [any]:8083
INFO server comment - MediaCache[MediaCache]: Thread pool size: [writer/readahead]:4/2
INFO server comment - MediaCache[MediaCache]: MAX Pending size: [writer/readahead]:500M/25M
INFO server comment - MediaCache[MediaCache]: Add store: path:/Library/WowzaStreamingEngine-4.0.3/mediacache maxSize:10737418240
INFO server comment - MediaCache[MediaCache]: Add source[dvrorigin]: prefix:dvrorigin/ basePath:http://
INFO server comment - MediaCache[MediaCache]: Flushing cache: start
INFO server comment - MediaCache[MediaCache]: Flushing cache: done
INFO server comment - MediaCache[MediaCache]: Start MediaCache GC
INFO server comment - MediaCache[MediaCache]: Started
INFO vhost vhost-start _defaultVHost_ -
INFO server comment - _defaultVHost_ threads[h/t]:0/0 home:/Library/WowzaStreamingEngine-4.0.3
INFO vhost comment _defaultVHost_ Bind attempt ([any]:1935:4)
INFO vhost comment _defaultVHost_ Bind successful ([any]:1935)
INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086:2)
INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)
INFO server comment - Server.startShutdownHook: Start server shutdown hook
INFO server comment - StatsManager:startManager() Enabled=true
INFO server comment - Wowza Streaming Engine is started!
Best Regards
Double check ports and firewall settings. Make sure nothing else listens on 8088. Also see this https://www.wowza.com/docs/how-to-find-your-way-around-wowza-streaming-engine-manager
1 Like