# Aplication Restart  not working

**URL:** https://community.wowza.com/t/aplication-restart-not-working/37449
**Category:** Wowza Developer Dojo
**Created:** [June 16, 2016, 5:39am UTC](https://community.wowza.com/t/aplication-restart-not-working/37449 "2016-06-16T05:39:41Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![burak\_guder](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@burak\_guder](https://community.wowza.com/u/burak_guder)
#### Post date: [June 16, 2016, 5:39am UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/1 "2016-06-16T05:39:41Z")

</div>

hi wowza team

curl

```auto
http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/actions/restart

```

response

[HTML]

false

Unknown action: restart

[/HTML]

I’m waiting for your help

Burak GUDER

---

<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: [June 16, 2016, 10:11am UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/2 "2016-06-16T10:11:42Z")

</div>

Hello.

Try this request structure:

```auto
curl -X PUT --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/actions/restart

```

Regards,

Salvadore

---

<div class="post-metadata">

### Author: ![burak\_guder](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@burak\_guder](https://community.wowza.com/u/burak_guder)
#### Post date: [June 17, 2016, 2:27am UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/3 "2016-06-17T02:27:39Z")

</div>

for php ?

---

<div class="post-metadata">

### Author: ![burak\_guder](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@burak\_guder](https://community.wowza.com/u/burak_guder)
#### Post date: [June 17, 2016, 10:50pm UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/4 "2016-06-17T22:50:48Z")

</div>

[PHP]public function restartAPP ($appName) {

$apiURL = ‘http://’.$this-\>\_ServerURL.’:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/’.$appName.’/actions/restart’;

$json=’{“restURI”: “http://’.$this-\>\_ServerURL.’:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/’.$appName.’/actions/restart”}’;

$return = $this-\>sendCurlData($json, $apiURL);

return $apiURL.’ | '.$return;

}

private function sendCurlData($json, $apiURL) {

$ch = curl\_init ( $apiURL );

curl\_setopt ( $ch, CURLOPT\_CUSTOMREQUEST, “POST” );

curl\_setopt ( $ch, CURLOPT\_POSTFIELDS, $json );

curl\_setopt ( $ch, CURLOPT\_USERPWD, $this-\>\_User . “:” . $this-\>\_password );

curl\_setopt ( $ch, CURLOPT\_HTTPAUTH, CURLAUTH\_DIGEST );

curl\_setopt ( $ch, CURLOPT\_RETURNTRANSFER, true );

curl\_setopt ( $ch, CURLOPT\_HTTPHEADER, array (

‘Accept:application/json; charset=utf-8’,

‘Content-type:application/json; charset=utf-8’,

'Content-Length: ’ . strlen ( $json )

) );

$contents = curl\_exec ( $ch );

curl\_close ( $ch );

return $contents;

}[/PHP]

Not Working Help Me pls !!!

---

<div class="post-metadata">

### Author: ![burak\_guder](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@burak\_guder](https://community.wowza.com/u/burak_guder)
#### Post date: [June 18, 2016, 5:19am UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/5 "2016-06-18T05:19:50Z")

</div>

sorry no way does not resumed .

I am delete and rebuilding aplication on server

[PHP]public class RestApis extends HTTProvider2Base {

public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse arg2) {

try {

String status = “”;

StringBuffer ret = new StringBuffer();

String return\_status = “null”;

String appName = req.getParameter(“aplication”);

String progess = req.getParameter(“progess”);

ExecCommend exec = new ExecCommend();

if (progess.equals(“delete”)) {

exec.RunExec(“rm -R -rf /usr/local/WowzaStreamingEngine/conf/”+appName);

return\_status = “delete Aplication”;

}

ret.append(return\_status);

System.out.println(“burada”);

OutputStream out = arg2.getOutputStream();

byte[] outBytes = ret.toString().getBytes();

out.write(outBytes);

} catch (Exception e) {

System.out.println("Hata : " + e);

}

}

}[/PHP]

---

<div class="post-metadata">

### Author: ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)
#### Post date: [June 29, 2016, 3:44pm UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/6 "2016-06-29T15:44:51Z")

</div>

Hi,

I’m not sure what you’re asking here. Did you get your code working in PHP?

Paul

---

<div class="post-metadata">

### Author: ![Richard\_Li](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Richard\_Li](https://community.wowza.com/u/Richard_Li)
#### Post date: [November 7, 2017, 10:15pm UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/7 "2017-11-07T22:15:00Z")

</div>

Restart application failed from enginemanager to Wowza Streaming Engine, can’t login Wowza Streaming Engine again, please help!

---

<div class="post-metadata">

### Author: ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)
#### Post date: [November 10, 2017, 12:53am UTC](https://community.wowza.com/t/aplication-restart-not-working/37449/8 "2017-11-10T00:53:03Z")

</div>

Hi, I’ve responded to your [other post](http://community.wowza.com/community/questions/46343/restart-application-failed-from-enginemanager-to-w.html). It sounds like the issue is that the Engine service has stopped. Do please check on this first.

Michelle
