How to "Activate" an application

How to "Activate" an application

  
I have created a small app in Community edition, loaded my data and published.  I am running in EC2 and have an elastic IP pointing to the instance. 

Unfortunately I cann find a way to make the application available publicly (outside the instance).  I have eliminated the following potential causes:
  1. External access either due to permissions or port blocking - I am able to get to the II7 splash if I hit the server w/o an application folder and created a static page site which I CAN access externally.  I am also able to access the server through RDP remotely using the IP address and the domain I have mapped to it
  2. Services not started - I have (re-)started the services several times
  3. Application not published - I can see its published state in Service Manager and it has a green check next to it
  4. Firewall blocking - I have put rules in the server firewall to allow 12000-12004 as well as HTTP, HTTPS, SQL, RDP, etc
  5. AWS blocking - the group settings allow for HTTP, HTTPS, RDP
  6. Application Functional - I am able to access it locally on the machine

In the OS logs, I'm seeing the following error over and over:

No connection could be made because the target machine actively refused it 127.0.0.1:12004
Stack:

Server stack trace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
at System.Runtime.Remoting.Channels.RemoteConnection.GetSocket()
at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at OutSystems.NssOMLProcessor.CssOMLProcessor.MssGetServiceStatus(String ssHostAddress, String ssServicePort, RLQueueStatusRecordList& ssQueues, RLThreadStatusRecordList& ssThreads)
at ssServiceCenter.RssExtensionOMLProcessor.MssGetServiceStatus(HeContext heContext, String inParamHostAddress, String inParamServicePort, RecordList& outParamQueues, RecordList& outParamThreads)

I am running the latest version of OS, using the preconfigured AMI indicated in the community boards.  What am I missing to get this app up and running?  I'm sure its something so obvious I'm looking right past it.
Hi John,

You did a great job in your thorough analysis of the scenario. However, that error in Service Center is unrelated  to what you are experience, unless the default ports have been changed.

Port 12004 - the one that's giving an error - is the default port for the SMS Service, which probably means that you started the SMS Service, and it's unavailable, just that :) I would assume that if you would stop the SMS Service those errors would stop.

However, regarding troubleshooting what might be the problem, if I am to understand correctly, if you access the application from within the machine's web browser it works, but from outside it doesn't, is that it?

Since there might be many reasons for that to be happening, so it's hard to pinpoint a reason.

Do you have other websites configured there, asides from the default one?

Can you access service center from outside of the machine?

A good way to understand what might be going on is through the IIS logs. In my local machine they are located at C:\inetpub\logs\LogFiles\W3SVC1 .

If they don't give you some insight on what might be the problem, I encourage you to share them here, so we can take a loog at them.

Let us know how it goes - I hope this helps!

Regards,

Paulo Tavares
I have done some additional testing/diagnosis.  I copied a default.htm file to the root of my application and was able to access it publicly, so accessing the foler is not the issue - it must be application related, either OS or mine.

This morning, Service Center was working and now it mysteriously has stopped, even locally.  The only change I have made on the machine today was to install MSMQ for async logging.

Attached is the most recent log.  I'm not much of a platform person, but I'm not seeing any errors in the log, although I have seen some odd errors in the system's event log.  I can post those also if it will help.

This is frustrating, as the tool is AWESOME, and I can't get the awesome site accible to my users.

BTW - The application I am trying to make accessible is CARE, although the name is somewhat arbitrary.
Here is the odd error from the event log:

Error in BulkWriteToServer:Cannot access destination table 'OSLOG_ERROR_7'.
   at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal()
   at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServer(Int32 columnCount)
   at System.Data.SqlClient.SqlBulkCopy.WriteToServer(DataTable table, DataRowState rowState)
   at System.Data.SqlClient.SqlBulkCopy.WriteToServer(DataTable table)
   at OutSystems.HubEdition.LogService.DBLogServer.BulkWriteToSqlServer(IDbConnection connection, DataTable tab)
   at #AZb.#CZb.#LZb(IDbConnection connection, List`1 msgList)
Some further detail:

Service Center seems to be the only thing not running.  I'm able to access my app internally, as well as EnterpriseManager, and the Audit space.
Something is definitely hosed in the configuration somewhere.  Service Center says I need to log in, but is not presenting a login page.  Studio, will not let me log into localhost at all with the admin account.  I have tested all the db connects and they test out fine.

I'm at the point where it would seem simpler to just copy my configs off, dust the instance and start over with a clean instance.
Hi John,

I do apologize for the late reply.

It does seem that something went terribly wrong with your installation. If resetting your instance is an option, meaning that you have all your work backed up, and that you have no relevant data in the machine, I'd probably go for it. Do make sure that you download your application's eSpaces to your local computer.

However, I'd really like to assist you in getting your machine back up, since some times it's something pretty basic, but we are completely overlooking.

I've attached your log files in an excel sheet, and removed everything related to Service Center so we can focus on Care. I've been through your logs and it would seem that when you access the application locally, you receive a code 200 - OK, while when you access remotely you receive a 302 - Found, which is a temporary redirect URL. I've highlighted the rows in the spreadsheet.

Would this be caused - or could be fixable - by a setting in your elastic IP configuration? What if you access it through the public DNS name? Does it work? I'm pretty sure you already went through it, but check this post on how to do it.

Regarding Service Center not running, I would strongly suggest you to reset IIS, and then restart the OS Services, and if that still doesn't help, access the Agile Platform folder and run the SCInstall command from the command line.

Let us know how it goes.

Regards,

Paulo Tavares
Paulo:

That instance is a write off and in fact, I terminated it after getting my work coppied off.  In fact, I had already made the decision to purchase a Basic Dev instance for use on this application, which while not complex is nonetheless critical to my organizaton,

I am in the process of spinning up that instance this morning.   As soon as I get the volume attached and get the eSpace and data copied back, I'll be in a position to determine what the issue might have been with the clean instance.

BTW - last night I started a new community instance which prompted me to upgragde to 5.1.1.7.  After that upgrade, nothing worked.  Is it possible that there is something wrong w/ that build )at least when running in the cloud)?

I will resist the temptation to upgrade with this new machine, but it begs the question how I should handle upgrades with the purchased cloud going forward.
Hi John,

I am terribly sorry that you had to kill your previous instance. I am definitely not aware that the 5.1.1.7 version does not work in the cloud, but I would not dismiss the possibility of something having gone wrong with the upgrade.

That being said, I was discussing this issue internally, and a colleague of mine - Daniel Lourenço - will get in touch with you in order to assist you throughout this process the best way we can, namely with the upgrade process.

I hope this helps you - and that you have the platform working at the moment.

Do let us know how it goes, and if something else comes up.

Regards, and good luck for your application.

Paulo Tavares
Thanks for the additional help.

I have the new Basic Dev cloud instance up and running, and addressable by elastic ip/dns.  I ported over the data from the other instance, published the application and after adding the hub user to the database, I am able to run the application on the new platformam INTERNALLY.  I am able to connect to ServiceCenter by public address, but not my application.

This tells me that the issue must be in my application, but its not generating anything in the log to indicate a problem, other than the initial error I got (The server principal "hubruntime" is not able to access the database "OneMM" under the current security context.) after which I added that user to my db.

What can I be missing?
Hi John,

I'm happy that you got it all working, so far. Let's see how we can handle that.

The first thing I would ask for would be for IIS logs, after you did these 6 operations consecutively:

- Access Service Center internally;
- Access Service Center remotely by IP;
- Access Service Center remotely by DNS;
- Access CARE internally;
- Access CARE remotely remotely by IP;
- Access CARE remotely remotely by DNS;

As I mentioned, to access by DNS check out this post on how to set it up.

Finally, as weird and remote as it may be, could it be that you have set your application's main flow to be set to "Internal Access Only" as "Yes"?



The symptom would be different, I would hope, but it's worth checking if you have changed it.

Also, could you show us a screenshot of the page that you're shown when you try to access CARE remotely? If you'd rather, you may send me the URL where your application is supposed to be by private message, through my user profile.

Regards, and let us know how it goes!

Paulo Tavares
- Access Service Center internally - OK
- Access Service Center remotely by IP - OK
- Access Service Center remotely by DNS - OK
- Access CARE internally - OK this morning, but not working now
- Access CARE remotely remotely by IP - NO ACCESS
- Access CARE remotely remotely by DNS - NO ACCESS


Sent you the site address by private message.

Hi John,

I have two issues when trying to access your webpage.

One, which is the problem I get is that it times out accessing care/LoginPage.aspx . Could you see in Service Center if there's any error being logged there?

The second, which I find curious, is that you set by default the security to HTTPS. When I access http://SERVERURL/care it redirects me to https://SERVERURL/care/LoginPage.aspx - so, I am reaching the application, and it is trying to access the Login Page. Attached is my HTTP log, from Firebug.

What happens if you don't force it to be HTTPS? Does it work now?

Are you doing any specific logic in your login page that makes the page load slowly? I don't imagine you are, but might be a pointer... Are you trying to connect to some other system - that, in turn, is unreachable, or is under a slower connection?

Let us know - I'm confident we'll get it to work :)

Regards,

Paulo Tavares
"...problem I get is that it times out accessing care/LoginPage.aspx . Could you see in Service Center if there's any error being logged there?" - NOTHING is logged other than the initial db access error I mentiond previously

"...you set by default the security to HTTPS." - I never created a login page for the app, and never planned to use HTTPS.  Its not that critical a site.  If its set that way, it happened automagically thru Studio.

"What happens if you don't force it to be HTTPS?" - How would I change that setting?

Before I started having issues, it loaded very quickly and never prompted for a log in page - it just displayed the opening list of data.

Hi John,

Well, it may be either configured in the application or in IIS.

If it is in the application, you can set it here:



Where it says HTTPSecurity for the Login screen - and, in any case, for ALL screens, it should say none, unless you have purchased an SSL certificate.

Do check if your application has that setting - or not - and how it goes.

Regards,

Paulo Tavares
Well spank me and call me Rosy!

That was it.  When you mentioned that, I had a very vague recollection of making that change, because there was that big yellow sign there.  I sort of assumed that the infrastructure would create a private/local key for that, and wen on my way.

Paulo - I cannot thank you enough for helping me through this.  As I said, tthis is an AWESOME product and I knew the issue had to be something I did, but I didn;t know what I didnt know.

Thanks again.

BTW - if anyone ever questions OS's support, send them in my direction and I'll straighten them out!
Great to hear you got it solved - and thanks for the feedback!

We might well quote you on that, if you don't mind - though we'll probably leave the Rosy part out ;)

Do let us know how it all goes, and good luck with your application.

Regards,

Paulo Tavares