GithubHelp home page GithubHelp logo

cloudfoundry-samples / cf-sample-app-spring Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 142.0 1.22 MB

Introduction to Cloud Foundry app deployment and management concepts.

Groovy 0.41% CSS 3.67% HTML 95.81% JavaScript 0.12%
cloudfoundry

cf-sample-app-spring's People

Contributors

dgodd avatar mpivotal avatar willmurphyscode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cf-sample-app-spring's Issues

Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers

Hello Team,

I was trying out this app, but ended in the following error. Please help or give some guidance to overcome this.
Thank you
vanchin
OUT 2021-02-18 05:07:38.052 INFO 23 --- [nio-8080-exec-4] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms OUT 2021-02-18 05:07:38.339 ERROR 23 --- [nio-8080-exec-4] org.thymeleaf.TemplateEngine : [THYMELEAF][http-nio-8080-exec-4] Exception processing template "index": Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers OUT org.thymeleaf.exceptions.TemplateInputException: Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers OUT at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] OUT at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] OUT at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) [thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] OUT at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) [thymeleaf-3.0.12.RELEASE.jar:3.0.12.RELEASE] OUT at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:366) [thymeleaf-spring5-3.0.12.RELEASE.jar:3.0.12.RELEASE] OUT at org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:190) [thymeleaf-spring5-3.0.12.RELEASE.jar:3.0.12.RELEASE] OUT at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1393) [spring-webmvc-5.3.3.jar:5.3.3] OUT at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1138) [spring-webmvc-5.3.3.jar:5.3.3] OUT at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1077) [spring-webmvc-5.3.3.jar:5.3.3] OUT at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) [spring-webmvc-5.3.3.jar:5.3.3] OUT at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.3.3.jar:5.3.3] OUT at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) [spring-webmvc-5.3.3.jar:5.3.3] OUT at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) [tomcat-embed-core-9.0.41.jar:4.0.FR] OUT at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.3.3.jar:5.3.3] OUT at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) [tomcat-embed-core-9.0.41.jar:4.0.FR] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-embed-websocket-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.3.jar:5.3.3] OUT at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.3.3.jar:5.3.3] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [spring-web-5.3.3.jar:5.3.3] OUT at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.3.3.jar:5.3.3] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.3.jar:5.3.3] OUT at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [spring-web-5.3.3.jar:5.3.3] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.cloudfoundry.router.ClientCertificateMapper.doFilter(ClientCertificateMapper.java:79) [client_certificate_mapper-1.11.0_RELEASE.jar:na] OUT at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.41.jar:9.0.41] OUT at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_282] OUT at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_282] OUT at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.41.jar:9.0.41]

Unable to set PCF health-check invocation-timeout through stream spring boot app

I need to set PCF health-check invocation-timeout through manifest file.

In manifest.yaml file

cloudfoundry.health-check: "HTTP"
cloudfoundry.health-check-http-endpoint: "/actuator/health"
cloudfoundry.health-check-timeout: "130"

cloudfoundry.health-check-invocation-timeout: "10"

In this, first 3 properties are able to set in PCF health-check section through spring boot app . But invocation-timeout is not able to set. Please can you help on this?

How to successfully connect to my local MySQL 8.0 database from my Spring Boot application pushed to my local PCF DEV ?

My app [gs-spring-boot.zip] is unable to connect to the locally running MySQL 8.0 database after carrying out the following configurations as described in various tutorials online.

Please find the errors in the attached log file named [cf_spring_boot_log.txt]

Please find a screenshot of the MySQL account with same credentials as configured below.
Local-MySQL-account

PS C:\WINDOWS\system32> cf login -a https://api.dev.cfdev.sh --skip-ssl-validation -u admin -p admin

PS E:\> cf cups rana-db -p '{\"username\": \"pcfusername\", \"password\": \"pcfpassword\", \"name\": \"world\", \"hostname\": \"127.0.0.1\", \"port\": 3306, \"uri\": \"mysql://pcfusername:[email protected]:3306/world\", \"jdbcUrl\": \"jdbc:mysql://127.0.0.1:3306/world?user=pcfusername&password=pcfpassword\"}'

PS E:\> cf push pcf-people-mgmt -p C:\complete\target\pcf-people-mgmt-1.0-SNAPSHOT.jar

PS E:\> cf bind-service pcf-people-mgmt rana-db

PS E:\> cf restage pcf-people-mgmt

I have spent weeks with no success. Please let me know what I am missing in my configuration.

backup the configuration or application in cloud foundry environment

I have deployed a new jenkins file in cf enviornment using the following command and it is deployed successfully
cf push jenkins_test -o jenkins/jenkins:lts -m 4G

Then i have done CI/CD configuration in jenkins and everything works fine.

Issue:

When i restart or restage the jenkins app all the jenkins configuration got erased, then i need to recreate the configuration from scratch.

Please let me know how to backup the configuration or application in cloud foundry environment.

Health Check Failed?

Going through the PCF sample deployment. Deploy fails due to ERR Timed out after 1m0s: health check never passed.

Ideas?
I downloaded ZIP and did cf push

cf login rejected

I was unable to try out PCF
https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry/introduction

as stopped on step
https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry/deploy-the-sample-app

impossible to login to PCF as login is just rejected
(password is not asked)

$ cf login 
API endpoint: https://api.run.pivotal.io  
Email> [my company email is entered here]


Authenticating...               
Credentials were rejected, please try again.        
Authenticating...                                                                                          
Credentials were rejected, please try again.         
Authenticating...                             
Credentials were rejected, please try again.                                                                                                                                                                      API endpoint:   https://api.run.pivotal.io (API version: 2.134.0)         
Not logged in. Use 'cf login' to log in.  
FAILED          
Unable to authenticate.

Yes, it is not error of the code in this repository,
but as https://pivotal.io/platform Start Free Trial leads here.

I think it would be nice if such issues can be answered in README on the website

The PCF example, which uses this code, fails with "No org and space targeted..."

The code in this repository forms the basis of the example exercise here.

I don't see where to report an issue against the pivotal page, so I'm reporting here in the hope that the loop is closed somewhere behind the curtains.

Here's what happens when I follow that exercise:

[russell]$ cf version
cf version 6.26.0+9c9a261.2017-04-06

[russell]$ git clone https://github.com/cloudfoundry-samples/cf-sample-app-spring.git
Cloning into 'cf-sample-app-spring'...
remote: Counting objects: 73, done.
remote: Total 73 (delta 0), reused 0 (delta 0), pack-reused 73
Unpacking objects: 100% (73/73), done.
Checking connectivity... done.

[russell]$ cd cf-sample-app-spring/

[russell]$ cf login -a https://api.run.pivotal.io
API endpoint: https://api.run.pivotal.io

Email> <redacted>

Password>
Authenticating...
OK

API endpoint: https://api.run.pivotal.io (API version: 2.78.0)
User: <redacted>
No org or space targeted, use 'cf target -o ORG -s SPACE'

[russell]$ cf push
FAILED
No org and space targeted, use 'cf target -o ORG -s SPACE' to target an org and space

[russell]$ cf orgs
Getting orgs as <redacted>...
name
No orgs found

No org and space targeted

From your tutorial on the wepage https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry/deploy-the-sample-app

.....

Password>
Authenticating...
OK

API endpoint: https://api.run.pivotal.io (API version: 2.68.0)
User: [email protected]
No org or space targeted, use 'cf target -o ORG -s SPACE'
PS C:\workspace\cf-sample-app-spring> cf push
FAILED
No org and space targeted, use 'cf target -o ORG -s SPACE' to target an org and space

Please update the getting started tutorial, it's very frustrating for new developers that wanna check what's going on there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.