# Flash ActionScript RTMP publisher error NetStream.Publish.Failed

**URL:** <https://community.wowza.com/t/flash-actionscript-rtmp-publisher-error-netstream-publish-failed/40423>\
**Category:** Wowza Streaming Engine\
**Created:** [May 24, 2013, 2:22pm UTC](https://community.wowza.com/t/flash-actionscript-rtmp-publisher-error-netstream-publish-failed/40423 "2013-05-24T14:22:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_McGee](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Justin\_McGee](https://community.wowza.com/u/Justin_McGee)\
**Post date:** [May 24, 2013, 2:22pm UTC](https://community.wowza.com/t/flash-actionscript-rtmp-publisher-error-netstream-publish-failed/40423/1 "2013-05-24T14:22:20Z")

</div>

I downloaded the .swf and .as files from [this tutorial](http://www.endseven.net/as3-introduction-to-rtmp-streaming-publishing), and even tried a simpler version of this, and received the same result on both tries: _ **NetConnection.Connect.Success** _

_ **NetStream.Publish.Failed:** _.

The RTMP server works, because I am able to stream from QTB and FMLE with no problem. What does Wowza want from me to make this work?

Here is the simplified AS of what I am trying to do:

```auto
nc = new NetConnection();
nc.onStatus = function(info) {
    trace("LEVEL: "+info.level+" CODE: "+info.code);
        if (info.code == "NetConnection.Connect.Success") {
            startStreamPublish();
    }
};
startStreamPublish = function() {
      // attach the Camera feed to an Embedded Video Object named, "my_video"
      my_video.attachVideo(Camera.get());
      // attach a NetStream to the variable, publish_ns
      publish_ns = new NetStream(nc);
      // attach the Microphone and Camera to the publish_ns stream
      publish_ns.attachAudio(Microphone.get());
      publish_ns.attachVideo(Camera.get());
      // start publishing the combined camera and microphone feed
      publish_ns.publish("webcast_test.sdp", "live");
};
nc.connect("rtmp://myip:port/app_name", "username", "password");

```

---

<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:** [May 25, 2013, 4:36pm UTC](https://community.wowza.com/t/flash-actionscript-rtmp-publisher-error-netstream-publish-failed/40423/2 "2013-05-25T16:36:35Z")

</div>

Do you have ModuleRTMPAuthenticate enabled?

With credentials passed as args of NetConnection.connect, you can use this method:

[https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-netconnection-connect-onconnectauthenticate](https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-netconnection-connect-onconnectauthenticate)

And this version has a db lookup example included:

[https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database](https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database)

Richard

---

<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:** [May 28, 2013, 2:38am UTC](https://community.wowza.com/t/flash-actionscript-rtmp-publisher-error-netstream-publish-failed/40423/3 "2013-05-28T02:38:28Z")

</div>

If you still have ModuleRTMPAuthenticate enabled, you should disable that. moduleOnConnectAuthenticate is the one that works with passing credentials as arguments of NetConnection.connect. moduleOnConnectAuthenticate2 handles credentials in querystring of the rtmp connection string.

Run Wowza in stand-alone (/bin/startup.bat) mode so you can see log output in the console.

Richard

---

<div class="post-metadata">

**Author:** ![Justin\_McGee](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Justin\_McGee](https://community.wowza.com/u/Justin_McGee)\
**Post date:** [May 27, 2013, 12:10pm UTC](https://community.wowza.com/t/flash-actionscript-rtmp-publisher-error-netstream-publish-failed/40423/4 "2013-05-27T12:10:23Z")

</div>

Thanks for your reply, Richard. I’ll try this.

> Do you have ModuleRTMPAuthenticate enabled?
> 
> With credentials passed as args of NetConnection.connect, you can use this method:
> 
> [Wowza Streaming Engine Java API documentation](https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-netconnection-connect-onconnectauthenticate)
> 
> And this version has a db lookup example included:
> 
> [Configure security in Wowza Streaming Engine](https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database)
> 
> Richard

---

<div class="post-metadata">

**Author:** ![Justin\_McGee](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@Justin\_McGee](https://community.wowza.com/u/Justin_McGee)\
**Post date:** [May 27, 2013, 5:14pm UTC](https://community.wowza.com/t/flash-actionscript-rtmp-publisher-error-netstream-publish-failed/40423/5 "2013-05-27T17:14:08Z")

</div>

Richard,

I followed the first link and moduleOnConnectAuthenticate was already enabled. I found another post on the forum where you recommended to someone that they try moduleOnConnectAuthenticate **2** , so I replaced this the former with the latter, but I receive the same error still. I can connect, but NetStream publish fails.
