I am having a problem launching my (grails) project to cloud foundry. I have already launched with cf-push, but I keep getting this error
I/O error: Connection reset; nested exception is java.net.SocketException: Connection reset
when I run cf-update.
I also cannot see my log files with cf-crashlogs. I get this in the terminal window:
grails> cf-crashlogs
| Checking for available resources:.....
And if I try to access the page I get a 404 Not Found page.
Did I completely miss something? has anyone else seen this or know how fix this issue?
please check which version of the cf grails plugin were you using. try listing the plugin updates with this command:
grails list-plugin-updates
after that try to get cloud foundry connection info by:
grails cf-info
i suppose you know how to configure the login info, all the configure properties are listed here: http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/guide/3%20Configuration.html
to access your app log, the most commonly used command is
grails cf-logs [destination] [--appname] [--instance] [--stderr] [--stdout] [--startup]
hope that helps.
I was trying to test Cloud Foundry long time ago. Don't remember but also had some issues which I couldn't overcome using default tool.
However then I used the Cloud Foundry Integration.
As I mentioned it was some time ago, so I won't help with the details, but the plugin worked as expected and I was able to deploy. Maybe you will success with it too :)
Related
i have created an application, it works perfectly fine on my system but when i deploy it on azure app service. it doesn't work. it is showing such error.
An error occurred while starting the application.
.NET Core 4.6.27817.03 X86 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.2.0-rtm-35687 | Microsoft Windows 10.0.14393 | Need help?
i have tried to check the azure app service platform, but it is fine.
Also i have tried to check the publish settings on the visual studio.
Under the 'Entity framework Migrations' dropdown in publish settings i see this error:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
You misspelled a built-in dotnet command.
You intended to execute a NET Core program, but dotnet-ef does not exist.
You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Also i have checked everything, it looks fine.
I have tried to create a fresh new .net core 2.2 project and tried to deploy it but that also shows the same issues.
i want it to be deployed on azure and in working condition.
Whoever can, kindly Help.
Please look at the below answer for troubleshooting issue around dot net core 2.2
ASP.NET Core 2.2 App Service hosted on Azure returning 500 without an exception being thrown
This will give you the actual reason of the error which you can use it to resolve.
Additionally , you can enable DetailedErrorsKey in the Program.cs so you can figure it out what's happening.
For startup related exception , you can take look at this link.
The Database Error Page **middleware** captures database-related exceptions that can be resolved by using Entity Framework migrations. When these exceptions occur, an HTML response with details of possible actions to resolve the issue is generated. This page should be enabled only in the Development environment. Enable the page by adding code to Startup.Configure:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-2.2#database-error-page
Hope it helps.
I tried to deploy a Play app to Cloudbees (only via push to git repo from which it is built by jenkins), it compiled and should work but I get a "502 Bad Gateway" error when loading the app. There is no error shown in the console only that it answers "502 Bad Gateway" when trying to access it. But that's what I see in the browser, too.
Cloudbees say that there is no other manipulation necessary, just cloning/pulling the ClickStart-Project, making it you application and pushing it back. The Play project works fine locally.
I am very grateful for any help. Please let me know if I need to provide any other information. Thanks a lot!
Edit: It works fine with Heroku only adding a Procfile. I don't get the problem with Cloudbees...
In this case the error is due to the database needing evolutions to be run before it can start:
[warn] play - Run with -DapplyEvolutions.default=true and -DapplyDownEvolutions.default=true if you want to run them automatically (be careful)
Oops, cannot start the server.
#6eg39l651: Database 'default' needs evolution!
You can see the error in your application console:
https://run.cloudbees.com/a/strehlst#app-manage/logs:strehlst/odzh
or via bees app:tail if you have the bees CLI installed.
You can also deploy direct from your desktop if you like:
play dist
bees app:deploy -t play2 dist/yourapp.zip
And it will push direct to your app (if you don't want a continuous deployment pipeline).
I'm trying to deploy my Grails application to AppFog using CloudFoundry plugin (ver. 1.1) in Spring Source Suites (STS 2.9.2).
I'm using https://api.appfog.com as server address and MYAPPNAME.aws.af.cm for application address when deploying app.
Application is pushed and started, services are bounded but, after that, I recive error saying that:
Communication with server failed: I/O error: Server returned HTTP response code: 405 for URL: https://api.appfog.com/apps/MYAPPNAME/application
Also, when I try to create Caldecott tunnel toward database I recive response "The URIs: caldecott-85393a.appfog.com have already been taken or reserved. (404 Not Found)" which I also saw when (by mistake) treid to deploy application to MYAPPNAME.api.appfog.com (default AF name instead of particular infrastructure adress).
I suppose that CloudFoundry plugin uses default server address to reach application and also trying to create Caldecott tunnel on default server address (caldecott-85393a.appfog.com instead of caldecott-85393a.aws.af.cm)
Does anybody have idea how to circumvent this situation?
BR
Zoran
this doesn't sound like an issue with the plugin itself but the response coming back from AppFog's cloud. I would take this up as an issue with them and clarify you can use that plugin with their cloud.
AppFog had issues recently with their Java deployments that was specifically affecting Grails apps. This has been resolved and should be working seamlessly as expected now. You can always reach out for more information in the active google group as well: https://groups.google.com/forum/#!forum/appfog-users
I developed a Grails app using spring source to deploy it on cloud foundry. It seems that it has been deployed well but the url does not work. Could some one help me!
Thanks,
Reza
To access your log files using the grails plugin, use grails cf-logs.
That will surely show you how your application is behaving.
As the others have pointed out use
grails cf-logs
to see the logging results of your app.
It may also have happend that your application didn't start up properly. So try to restart it by typing:
grails cf-stop
grails cf-start
The Cloud Foundry plugin/Grails console may get stale while starting the app ("Starting app .........") but just keep hitting the deployment URL and as soon it's running you can quit and restart Grails.
This works locally. Set up: Grails 2.0.3. Debain Linux. I've deployed other applications successfully to Cloud Foundry.
Apparently this thing can happen as a consequence of the Spring Security Plugin not being happy with the resources plugin. Removing the resources plugin doesn't cure this.
This is the problem:
Class: java.lang.IllegalStateException
Message: No thread-bound request found: Are you referring to request attributes outside of
an actual web request, or processing a request outside of the originally receiving thread?
If you are actually operating within a web request and still receive this message, your
code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use
RequestContextListener or RequestContextFilter to expose the current request.
Adding the org.springframework.web.context.request.RequestContextListener and its loader to web.xml and importing them into the page doesn't help either.
There is much about this on the web, but in my case it only happens on Cloud Foundry.
Cloud Foundry runs on Java 1.6, like my machine. The logs say the same as the quote above, with stack traces identical to what I've found on the web.
Any ideas? I'm stuck. I've spent the best of two days on this.
Thanks.
Adding compile ":webxml:1.4.1" to the plugins section of BuildConfig.groovy should fix that. Credit to http://support.cloudfoundry.com/entries/21371626-grails-mongodb-deployment-fails