Wowza Community

API Docs error: "Can't read from server" on Azure Wowza server

Hi, I installed an Azure 4.3 server as per the instructions here:

https://www.wowza.com/docs/wowza-streaming-engine-for-linux-on-azure-quick-start-guide

Then, I have completed the steps to enable the API documentation as per:

https://www.wowza.com/docs/how-to-access-documentation-for-wowza-streaming-engine-rest-api

Then I installed Apache (after disabling port 80 usage by Wowza) and installed the Swagger UI on the same server, at the same IP, to try to avoid any CORS issues…

However all I receive when using Swagger UI to access the endpoint at {myipaddress}:8089/api-docs is:

“Can’t read from server. It may not have the appropriate access-control-origin settings.”

with an: ERR_CONNECTION_TIMED_OUT in my console…

Here is my Server.xml file, where {externalIP} = my server’s external IP:

<?xml version="1.0" encoding="UTF-8"?>
<Root version="2">
	<Server>
		<Name>Wowza Streaming Engine</Name>
		<Description>Wowza Streaming Engine is robust, customizable, and scalable server software that powers reliable streaming of high-quality video and audio to any device, anywhere.</Description>
		<RESTInterface>
			<Enable>true</Enable>
			<IPAddress>*</IPAddress>
			<Port>8087</Port>
			<!-- none, basic, digest-->
			<AuthenticationMethod>none</AuthenticationMethod>
			<DiagnosticURLEnable>true</DiagnosticURLEnable>
			<SSLConfig>
				<Enable>false</Enable>
				<KeyStorePath></KeyStorePath>
				<KeyStorePassword></KeyStorePassword>
				<KeyStoreType>JKS</KeyStoreType>
				<SSLProtocol>TLS</SSLProtocol>
				<Algorithm>SunX509</Algorithm>
				<CipherSuites></CipherSuites>
				<Protocols></Protocols>
			</SSLConfig>
			<IPWhiteList>127.0.0.1,{externalIP}</IPWhiteList>
			<IPBlackList></IPBlackList>
			<EnableXMLFile>false</EnableXMLFile>
			<DocumentationServerEnable>true</DocumentationServerEnable>
			<DocumentationServerPort>8089</DocumentationServerPort>
			<!-- none, basic, digest-->
			<DocumentationServerAuthenticationMethod>none</DocumentationServerAuthenticationMethod>
			<Properties>
				<Property>
				    <Name>restUserHTTPHeaders</Name>
				    <Value>Access-Control-Allow-Origin:*|Access-Control-Allow-Methods:OPTIONS,GET,PUT,DELETE,POST</Value>
				</Property>
			</Properties>
		</RESTInterface>
		<CommandInterface>
			<HostPort>
				<ProcessorCount>${com.wowza.wms.TuningAuto}</ProcessorCount>
				<IpAddress>*</IpAddress>
				<Port>8083</Port>
			</HostPort>
		</CommandInterface>
		<AdminInterface>
			<!-- Objects exposed through JMX interface: Server, VHost, VHostItem, Application, ApplicationInstance, MediaCaster, Module, Client, MediaStream, SharedObject, Acceptor, IdleWorker -->
			<ObjectList>Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker</ObjectList>
		</AdminInterface>
		<Stats>
			<Enable>true</Enable>
		</Stats>
		<!-- JMXUrl: service:jmx:rmi://localhost:8084/jndi/rmi://localhost:8085/jmxrmi -->
		<JMXRemoteConfiguration>
			<Enable>false</Enable>
			<IpAddress>{externalIP}</IpAddress> <!-- set to localhost or internal ip address if behind NAT -->
			<RMIServerHostName>{externalIP}</RMIServerHostName> <!-- set to external ip address or domain name if behind NAT -->
			<RMIConnectionPort>8084</RMIConnectionPort>
			<RMIRegistryPort>8085</RMIRegistryPort>
			<Authenticate>true</Authenticate>
			<PasswordFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.password</PasswordFile>
			<AccessFile>${com.wowza.wms.ConfigHome}/conf/jmxremote.access</AccessFile>
			<SSLSecure>false</SSLSecure>
		</JMXRemoteConfiguration>
		<UserAgents>Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)</UserAgents>
		<Streams>
			<DefaultStreamPrefix>mp4</DefaultStreamPrefix>
		</Streams>
		<ServerListeners>
			<ServerListener>
				<BaseClass>com.wowza.wms.mediacache.impl.MediaCacheServerListener</BaseClass>
			</ServerListener>
			<!--
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener</BaseClass>
			</ServerListener>
			-->
			<!--
			<ServerListener>
				<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerSender</BaseClass>
			</ServerListener>
			-->
		</ServerListeners>
		<VHostListeners>
			<!--
			<VHostListener>
				<BaseClass></BaseClass>
			</VHostListener>
			-->
		</VHostListeners> 
		<HandlerThreadPool>
			<PoolSize>${com.wowza.wms.TuningAuto}</PoolSize>
		</HandlerThreadPool>
		<TransportThreadPool>
			<PoolSize>${com.wowza.wms.TuningAuto}</PoolSize>
		</TransportThreadPool>
		<RTP>
			<DatagramStartingPort>6970</DatagramStartingPort>
			<DatagramPortSharing>false</DatagramPortSharing>
		</RTP>
		
		<Manager>
			<!-- Properties defined are used by the Manager -->
			<Properties>
			</Properties>
		</Manager>
		
		<!-- Properties defined here will be added to the IServer.getProperties() collection -->
		<Properties>
		</Properties>
	</Server>
</Root>

Can you please tell me what I might be missing? If you need to review directly, please email me and I will provide you with my IP address and login.

Hello

The error indicates that you might not have access to port 8089. Also I would include the following to your restUserHTTPHeaders value:

Access-Control-Allow-Headers:Content-Type

Then restart it and try again.

Thanks,

Matt

“Can’t read from server. It may not have the appropriate access-control-origin settings.”

<?xml version="1.0" encoding="UTF-8"?>

Wowza Streaming Engine

Wowza Streaming Engine is robust, customizable, and scalable server software that powers reliable streaming of high-quality video and audio to any device, anywhere.

true

*

8087

digest

true

false

JKS

TLS

SunX509

*

false

true

8089

none

restUserHTTPHeaders

Access-Control-Allow-Origin:*|Access-Control-Allow-Methods:OPTIONS,GET,PUT,DELETE,POST|Access-Control-Allow-Headers:Content-Type

${com.wowza.wms.TuningAuto}

*

8083

Server,VHost,VHostItem,Application,ApplicationInstance,MediaCaster,Module,IdleWorker

true

false

${com.wowza.amazonaws.ec2.AWSEC2_METADATA_PUBLIC_IPV4}

${com.wowza.amazonaws.ec2.AWSEC2_METADATA_PUBLIC_HOSTNAME}

8084

8085

true

${com.wowza.wms.ConfigHome}/conf/jmxremote.password

${com.wowza.wms.ConfigHome}/conf/jmxremote.access

false

Shockwave Flash|CFNetwork|MacNetwork/1.0 (Macintosh)

mp4

com.wowza.wms.plugin.amazonaws.ec2.env.ServerListenerEC2Variables

com.wowza.wms.mediacache.impl.MediaCacheServerListener

${com.wowza.wms.TuningAuto}

${com.wowza.wms.TuningAuto}

6970

false

this is my sever.xml file.

i finished all steps:

https://www.wowza.com/docs/how-to-access-documentation-for-wowza-streaming-engine-rest-api

then i tested below link : This site can’t be reached

http://[AWS Public IP]:8089/v2/servers/defaultServer/vhosts/defaultVHost/applications

i dont no where is i mistake it?

help me Thanks.