Aplication Restart not working

hi wowza team

curl

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

Hello.

Try this request structure:

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

Regards,

Salvadore

for php ?

[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 !!!

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]

Hi,

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

Paul

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

Hi, I’ve responded to your other post. It sounds like the issue is that the Engine service has stopped. Do please check on this first.

Michelle