# Restart Wowza

**URL:** <https://community.wowza.com/t/restart-wowza/43068>\
**Category:** Wowza Streaming Engine\
**Created:** [July 18, 2014, 5:25pm UTC](https://community.wowza.com/t/restart-wowza/43068 "2014-07-18T17:25:15Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 18, 2014, 5:25pm UTC](https://community.wowza.com/t/restart-wowza/43068/1 "2014-07-18T17:25:15Z")

</div>

Hey Everyone!

I am with a problem that when I restart the Wowza Server in Wowza Streaming Engine he doesn’t work more. Acessing http://[wowza-ip]:1935 the server isn’t found. Acessing Wowza Streaming Engine and trying to add stream the message is shown:

**"MediaCaster type not found[live/_definst_]: rtp"**

Can anyone tell me what can be? Would it be a bug?

Because i saw in Release Note [[https://www.wowza.com/docs/wowza-streaming-engine-4-0-4-release-notes](https://www.wowza.com/docs/wowza-streaming-engine-4-0-4-release-notes) that this issue [“Fixed RTP MediaCaster thread locking issue with application instance shutdown”] was corrected.

P.S: Wowza Streaming Engine version 4.0.4 in AMI (Amazon Machine Images) with license Byol.

AMI ID: WowzaStreamingEngine-ebs-byol-4.0.4-x86\_64-5f03c7f6-de9b-43fe-a602-1c49f77d1a02-ami-1e847d76.2 (ami-574ae54a)

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 18, 2014, 7:06pm UTC](https://community.wowza.com/t/restart-wowza/43068/2 "2014-07-18T19:06:56Z")

</div>

Hello there,

Are you sure you restarted the stream upon Wowza restart? How are you starting the stream? /conf/StartupStreams.xml or from Stream Manager?

Salvadore

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [July 22, 2014, 5:35pm UTC](https://community.wowza.com/t/restart-wowza/43068/3 "2014-07-22T17:35:17Z")

</div>

You can [start a MediaCaster stream](https://www.wowza.com/docs/how-to-mediacaster-api-to-start-native-rtp-and-mpeg-ts-streams) in a ServerListener, which runs when Wowza starts.

Something like this:

```auto
package test;
import com.wowza.wms.application.IApplicationInstance;
import com.wowza.wms.logging.*;
import com.wowza.wms.mediacaster.IMediaCaster;
import com.wowza.wms.mediacaster.MediaCasterStreamItem;
import com.wowza.wms.mediacaster.MediaCasterStreamMap;
import com.wowza.wms.server.*;
import com.wowza.wms.vhost.IVHost;
import com.wowza.wms.vhost.VHost;
import com.wowza.wms.vhost.VHostSingleton;
public class ServerListenerMediaCasterExample implements IServerNotify2 {
	public void onServerInit(IServer server) {
		WMSLoggerFactory.getLogger(null).info("onServerInit");
		
		IVHost vhost = VHostSingleton.getInstance(VHost.VHOST_DEFAULT);
		
		IApplicationInstance appInstance = vhost.getApplication("live").getAppInstance("_definst_");
		
		MediaCasterStreamMap mediaCasterMap = appInstance.getMediaCasterStreams();
		MediaCasterStreamItem mediaCasterItem = mediaCasterMap.acquire("mystream.stream", "rtp-live");
				
	}
		
	public void onServerConfigLoaded(IServer server) {
		WMSLoggerFactory.getLogger(null).info("onServerConfigLoaded");
	}
	public void onServerCreate(IServer server) {
		WMSLoggerFactory.getLogger(null).info("onServerCreate");
	}
	public void onServerShutdownStart(IServer server) {
		WMSLoggerFactory.getLogger(null).info("onServerShutdownStart");
	}
	public void onServerShutdownComplete(IServer server) {
		WMSLoggerFactory.getLogger(null).info("onServerShutdownComplete");
	}
}

```

Richard

---

<div class="post-metadata">

**Author:** ![Daren\_Johnson](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@Daren\_Johnson](https://community.wowza.com/u/Daren_Johnson)\
**Post date:** [July 21, 2014, 9:00pm UTC](https://community.wowza.com/t/restart-wowza/43068/4 "2014-07-21T21:00:46Z")

</div>

HI,

Yes, correct. You need to configure StartupStreams, [guide here,](https://www.wowza.com/docs/how-to-start-streams-at-server-startup) so that the streams are started automatically when the Wowza Streaming Engine is restarted.

Daren

---

<div class="post-metadata">

**Author:** ![Meynard\_Hill](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Meynard\_Hill](https://community.wowza.com/u/Meynard_Hill)\
**Post date:** [January 4, 2016, 4:31am UTC](https://community.wowza.com/t/restart-wowza/43068/5 "2016-01-04T04:31:05Z")

</div>

Are you sure you restarted the stream upon Wowza restart? How are you starting the stream? /conf/StartupStreams.xml or from Stream Manager?

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 21, 2014, 6:39am UTC](https://community.wowza.com/t/restart-wowza/43068/6 "2014-07-21T06:39:47Z")

</div>

Lets see what the logs have to say, start Wowza in stand alone mode, [install-dir]/bin/startup.bat(startup.sh on Mac)

This will display the logs in the console. Do you see any start up errors in the logs?

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 21, 2014, 8:21am UTC](https://community.wowza.com/t/restart-wowza/43068/7 "2014-07-21T08:21:28Z")

</div>

In your run or debug configuration in eclipse, try adding the following to the VM Arguments on the Arguments tab.

```auto
-Dcom.wowza.wms.native.base="win"

```

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 21, 2014, 8:43am UTC](https://community.wowza.com/t/restart-wowza/43068/8 "2014-07-21T08:43:46Z")

</div>

Be sure your JAVA\_HOME environment variable is pointing at the the correct version of Java. Try opening a DOS prompt and enter:

%JAVA\_HOME%/bin/java -version

See what that returns. If incorrect version then update the JAVA\_HOME environment variable to point to the correct location.

[After installing latest Java version, java command is still using old Java (fix)](https://www.wowza.com/docs/how-to-manually-install-and-troubleshoot-java-on-your-wowza-media-server)

I hope this helps.

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 21, 2014, 12:21pm UTC](https://community.wowza.com/t/restart-wowza/43068/9 "2014-07-21T12:21:48Z")

</div>

To update, it looks like the error you are getting suggests that you are running a newer version of java on the dev server then you are running on the production server.

You should use the same version (or older version) on the dev machine that is running on the production machine.

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 21, 2014, 12:46pm UTC](https://community.wowza.com/t/restart-wowza/43068/10 "2014-07-21T12:46:27Z")

</div>

Excellent! Thanks for the update, glad you got this sorted out and happy to help!

Salvadore

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [July 21, 2014, 4:04pm UTC](https://community.wowza.com/t/restart-wowza/43068/11 "2014-07-21T16:04:03Z")

</div>

Guilherme,

I am not sure what you mean, can you please explain exactly what you are doing when this happens, and exactly what is happening.

Thanks.

Salvadore

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 21, 2014, 9:34am UTC](https://community.wowza.com/t/restart-wowza/43068/12 "2014-07-21T09:34:08Z")

</div>

Hello Salvadore,

Yes, i have. Indeed i restart the Wowza service in Wowza Streaming Engine Interface and it stopped to work. I start the stream by Stream Manager too. When i try to access http://[wowza-ip]:1935 informations like “Wowza Streaming Engine 4 Developer Edition 4.0.4 build[numbers\_here]” are not displayed.

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 21, 2014, 11:06am UTC](https://community.wowza.com/t/restart-wowza/43068/13 "2014-07-21T11:06:23Z")

</div>

INFO server comment - MediaCache[MediaCache]: Started

INFO server comment - REST API: ready

Error starting: java.lang.reflect.InvocationTargetException

java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.wowza.wms.bootstrap.Bootstrap.startServer(Bootstrap.java:555)

at com.wowza.wms.bootstrap.Bootstrap.main(Bootstrap.java:67)

Caused by: java.lang.UnsupportedClassVersionError: com/ipset/wms/httpprovider/StreamingRequest : Unsupported major.minor version 52.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$100(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.wowza.wms.util.VHostUtils.loadHTTPProvider(VHostUtils.java:61)

at com.wowza.wms.util.VHostUtils.loadHostPort(VHostUtils.java:609)

at com.wowza.wms.util.VHostUtils.loadHostPortList(VHostUtils.java:686)

at com.wowza.wms.util.VHostUtils.loadConfigFile(VHostUtils.java:978)

at com.wowza.wms.vhost.VHost.c(VHost.java:1185)

at com.wowza.wms.vhost.VHost.init(VHost.java:501)

at com.wowza.wms.vhost.VHostSingleton.init(VHostSingleton.java:62)

at com.wowza.wms.server.Server.startVHost(Server.java:2215)

at com.wowza.wms.server.Server.startVHosts(Server.java:2764)

at com.wowza.wms.server.Server.start(Server.java:1006)

… 6 more

i see that the error happened in HTTPProvider created by me. But i create in a development environment with the same Wowza version. What would be a “Unsupported major.minor version 52.0”? Java version?

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 21, 2014, 11:33am UTC](https://community.wowza.com/t/restart-wowza/43068/14 "2014-07-21T11:33:22Z")

</div>

So Salvadore for to develop the HTTProvider i set this variable before. I saw in another thread here in the Forum.

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 21, 2014, 3:43pm UTC](https://community.wowza.com/t/restart-wowza/43068/15 "2014-07-21T15:43:42Z")

</div>

In fact the problem was the java version. Wowza in the production server has java 1.7.0\_55 while in development environment was 1.8.0. Thus I downloaded the jre e jdk for 1.7.0\_55 version and build again the project. That’s worked.

Thank you very much for your help Salvadore.

Best Regards,

Guilherme.

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 21, 2014, 6:46pm UTC](https://community.wowza.com/t/restart-wowza/43068/16 "2014-07-21T18:46:34Z")

</div>

You are Welcome!

I just have one more question Salvadore. When I restart the Wowza streams in the “Live Application” disappear. How do I prevent this from happening?

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 21, 2014, 7:14pm UTC](https://community.wowza.com/t/restart-wowza/43068/17 "2014-07-21T19:14:48Z")

</div>

Then it happens when I restart the server in Wowza Streaming Engine Manager. All .streams in the live Application disappear. Do i need to configure StartupStreams file? How can I make a startup of a Application like live or vod?

Thank you too.

Guilherme.

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 22, 2014, 9:59am UTC](https://community.wowza.com/t/restart-wowza/43068/18 "2014-07-22T09:59:59Z")

</div>

Hey Daren. Thank you for reply.

Right! And there any method in the Wowza API that with the stream name publishes automatically the stream to come up with the server? Or maybe startup a VHost, Application or Application Instance automatically?

---

<div class="post-metadata">

**Author:** ![Guilherme\_Nozawa](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@Guilherme\_Nozawa](https://community.wowza.com/u/Guilherme_Nozawa)\
**Post date:** [July 23, 2014, 9:26am UTC](https://community.wowza.com/t/restart-wowza/43068/19 "2014-07-23T09:26:01Z")

</div>

All right. I’ll try here.

Thank you Richard.

Best Regards,

Guilherme.
