Amazon ElasticBeanstalk Log File - sql-server

I have recently deployed an ASP.net web server (together with an Database in RDS) into Amazon AWS, and I am facing some erros during a sql query execution. (SqlException)
I would like to be able to print those erros into a log file, which I have not been able to do yet. There is one log file in the Amazon Beanstalk dashboard, I have made many attempts, but my strings never show up there:
I have tried with Console.WriteLine()
Does anyone know some way to print strings into that log file? Or some other way to debug?

In order to see your messages in the log, you first need to log them.
Console.WriteLine() does not write messages into the log but it only prints them in the standard output. You must use some logging framework for this purpose.
Elmah is one option, for example.
Also, it might be useful to read some logging tutorials for APS net: this one seems to cover a lot of use cases.

Related

Logging Errors in GCloud

Im writing a project using python hosted on a local Django server.
This same project is also deployed to GCloud where it's hosted on Google's Cloud server.
But every time it has any issues post-deployment, the GCloud's logging is always a hassle, mainly because its very uninformative.
When I run my project on my local machine, using the 'runserver' command in the command prompt, anytime an issue pops up, I'm able to view it through the command prompt (eg. django.db.utils.IntegrityError at line abc, method xyz )
Is there anything on GCloud that can give me logging akin to that? Especially if its an issue that has happened awhile back? Preferably something that is within the free trial, if possible?
Cause the best thing I could find was the Log Viewer on the project dashboard and the details it gives me is pretty scarce, something along these lines
error: 500
source: /app/submit/
resource.type="gae_app"
resource.labels.module_id="default"
resource.labels.version_id="20201117t191425"
logName=(...)
jsonPayload.trace="5ec93d7a13aac6b28fe5a8134db1691b"
It does not actually explain what causes the Error 500, as well as the details of the error.
And the documentation itself can sometimes have abit too much self-promoting and alot of linkings to broad topics that may(usually not) give me what I can use.

Publish web service - not found

I need publish some web services so I add some pages and codeunits to web services form. Then, I clicked publish checkbox to make it visible for my external program. When I try to visit
http://localhost:7047/DynamicsNAV/WS/Services
it doesn't show my codeunits or pages avaliable. The only exists is SystemService. It doesn't work also when I try to reach it by
http://localhost:7047/DynamicsNAV/WS/<companyname>/Page/<wsname>
Message printed claim that "/Page/" was not found. I don't really know where could be problem and I feel I don't have enough knowledge about Dynamics solution to solve it. Maybe someone of you meet this problem in the past. I don't even know, where to search errors, where logs from publishing should be written. My version of this software is 2009.
Could it perhaps be that you have multiple NAV service tiers running on your machine, and the one in which you are configuring your webservices is not the one listening to port 7047? Just trying to eliminate any possible cause... ;)
More simple checks, just to be sure:
is this the right database? :)
have you specified service name (Latin characters, no spaces etc)?
have you tried restarting NAV Server and Web Services?
are published objects available in the license uploaded to DB?
have you tried publishing standard page like 21 Customer Card?
(Sorry, this is not an answer, but there is no formatting in the comments :)

node.js sql server driver - is it still being actively developed?

The Microsoft node.js sql server driver (https://github.com/Azure/node-sqlserver) has not had any commits for 11 months. Anyone know what's going on with this effort? My company is using it actively, but has run across some issues that led me to the repo and the discovery that it seems to have been abandoned. Lots of open bugs also.
Should we give up on this driver and try another? Any recommendations?
Microsoft, please weigh in here.
I emailed the Microsoft main contributor and he was very helpful, although he did admit that officially MS has never declared one way or the other if they were going to continue support. Guess we'll wait and see.
In regards to my original problem - this info may help someone.
I was using queryRaw and listening for events to build the response. This method allows the user to submit multiple sql queries in one request (just separate them with ;). A large text datatype field was getting truncated and I couldn't figure out why. Turns out that the 'more' parameter that is supplied by the driver means that you must concatinate the return data.
Lots of trial and error when figuring out this driver.

GAE log search is not reliable

I`m running several python (2.7) applications and constantly hit one problem: log search (from dashboard, admin console) is not reliable. it is fine when i searching for recent log entries (they are normally found ok), but after some period (one day for instance) its not possible to find same record with same search query again. just "no results". admin console shows that i have 1 gig of logs spanning 10-12 days, so old record should be here to find, retention/log size limits is not a reason for this.
Specifically i have "cron" request that write stats to log every day (it`s enough for me) and searching for this request always gives me the last entry, not entry-per-day-of-span-period as expected.
Is it expected behaviour (i do not see clear statements about log storage behaviour in docs, for example) or there is something to tune? For example, will it help to log less per request? or may be there is advanced use of query language.
Please advise.
This is a known issue that has already been reported on googleappengine issue tracker.
As an alternative you can consider reading your application logs programmatically using the Log Service API to ingest them in BigQuery, or build your own search index.
Google App Engine Developer Relations delivered a codelab at Google I/O 2012 about App Engine logs ingestion into Big Query.
And Streak released a tool called called Mache and a chrome extension to automate this use case.

Heroku db:push silently hangs on remote connection

I'm trying to get spree deployed onto Heroku, but using heroku db:push is failing. There are no error messages and I don't know where it would keep logs of this: There's no information at the heroku logs. Taps just asks if I want to confirm the action and then nothing. Blackness, for hours. I one time got it to spit out a "SequelConnectionError - Interrupt" after cancelling the task in Git bash. I've been looking for days on the search engines and heroku support without success. Seems like it's finding my local stuff just fine, but hangs off into an infinite loop when trying to connect remotely. I looked in wireshark but couldn't see anything out of the ordinary, though there was lots of noise.
Wondering if:
Anyone knows where taps/sequel/heroku task would keep logs? 'heroku logs' was dry of any attempts to push database.
If this is a recent error? I tried rolling taps back but some dependency wanted it at newest version.
Thanks,
Cameorn Carroll

Resources