Posts by: Dr. Xiujiao Gao 高秀娇
What can you do when your app timeout connecting to your log server in your CF deployment? The following error occurred when I pushed my app to CF in AWS. timeout connecting to log server, no log will be shown Starting app cf-env in org codex / space cf-app-testing as admin… FAILED Error restarting application:
When cf push failed to push my APP to CF in AWS, I got the following error. Using manifest file /home/user/cf-env/manifest.yml Updating app cf-env in org codex / space cf-app-testing as admin… OK Uploading cf-env… FAILED Error processing app files: Error uploading application. Server error, status code: 500, error code: 10001, message: An unknown error
我在AWS上部署CF的时候,在Go Router 前面设置了AWS ELB来对传入流量进行均衡。部署完毕,所有的虚拟机开始运行。可是在Amazon Console的网络界面中,EC2服务下的ELB实例却显示一个Go Router失效了(Out of Service)。 解决这个问题,我从以下三方面着手: 1)检查ELB 2)检查Go Router 3)检查ELB和Go Router之间的网络通信设置 首先curl ELB 没什么问题,并且另外一个Go Router在ELB的可用实例中正常运行,所以ELB本身应该没什么问题。 其次,我运行bosh vms查看Go Router虚拟机在正常运行,然后ssh远程登录到Go Router虚拟机,使用monit summary看到一切作业进程也都运行正常。 这些快速的调试技巧让我锁定了第三种可能。我看到ELB在Availability Zones中没有设置失效Go Router所在的子网,而为了使ELB能够路由流量到某个特定的子网或者Availability Zone,我们必须在ELB的实例中的Availability Zones进行设置添加那个子网。 接下来的工作很简单,登录AWS Console,去AWS的页面左上角点击Services会看到下拉菜单,选择EC2,进入了EC2管理页面后,点击Load Balancers选项,选择要设置的ELB,点击Instances一项就可以看到Edit Availability Zones,点击添加失效Go Router所在的子网段,点击保存。失效的Go Router开始作为ELB的实例运行了! To read the English version, please click:Handling GoRouter Is "Out of Service" for AWS ELB.
When I deployed CF in AWS, I put an ELB in front of my two Go Routers to balance the incoming traffic. After the CF deployment completes all the VMs are running. However, one of the Go Router is showed as out of service in the Instances tab in the ELB dashboard. To debug this
当你的应用没有正常运行时,你该怎么办? 拜读此篇博客! Stark & Wayne 团队总结了一些在Cloud Foundry (CF) 中调试应用的经验。 日志 日志通常是最好的入手点。应用的任何标准输出或者错误都会在cf log 的输出中得到显示。如果你在cf log输出中没有看到应用的日志,请确保你使用标准输出而不是输出到日志文件。 cf logs <APP> –recent 事件 应用的容器瘫痪,停止工作,重启等都会触发事件。事件在帮助你和日志中的一些内容进行关联方面很有用。 cf events <APP> 在此链接中有几个CF调试的命令行Troubleshooting Application Deployment and Health. 远程登录到 Diego 容器 如果容器开起了SSH特性(可以通过命令行开启),你可以远程登录到Diego容器进行调试。如果你直接进行Docker容器推送(而不是依靠buildpacks), 你可以任意添加你想要的诊断工具,比如strace, lsof, jconsol 等等。 cf ssh <APP> 监控 安装类似MQTT等可以接收度量和日志数的工具会很有用处。比如它可以告诉你当内存在按照一定速率持续增长,不加以处理最重会使容器崩溃。你也可以安装一些应用级别的监控系统,比如DATADOG 和 New Relic。 HTTP跟踪 当你只需要知道应用的CLI与远程的API通信的状况,HTTP跟踪也是一个可用的调试方式。 我们实现了一个叫做gotcha的应用工具,它可以作为一个MiTM代理放在测试单元和远程HTTP终端之间使用。工具本身可以在 starkandwayne/gotcha找到, 如何使用这款工具可以在博客capture-http-requests-to-your-cloud-foundry中找到。 调试不同类型应用的技巧 你运行的应用类型是什么?什么语言?什么架构? 你可能会发现下面的工具很有用。 Java和Ruby 应用 如果你使用Eclipse写Java或者Ruby应用,你可能会在
What will you do when your apps are not working?Read this blog! S&W team has summarized some useful tips for debugging apps in Cloud Foundry. Logs Logs are usually the best bet. Anything the application prints to standard output or standard error will show up in the cf logs output for that application. If you
I am lucky to have the opportunity to work at Stark & Wayne while earning my PhD in Computer Science and Engineering at the University at Buffalo. Stark & Wayne has lots of customers using Cloud Foundry, including GE, Intel, Swisscom, Zipcar, SAP and others. I myself have been working on various Pivotal Cloud Foundry
Using Cloud Config enables you to remove a lot out of your BOSH manifests to simplify them. However, it’s an all-or-nothing approach. You either use it for all your deployments on a director, or none. When Concourse CI hit the magic 1.0.0, they switched over to using a lot of the BOSH 2.0 features, including
This blog will describe how to use Concourse to build a Docker Image through a simple example. The easiest and cheapest way to get a Concourse instance going is to use a pre-built Vagrant box. We will use Vagrant with VirtualBox, since it is built-in to Vagrant and free. You can easily install them by