Pivotal Knowledge Base

Follow

How to test the Loggregator connection for Apps Manager

Environment

Product Version
Pivotal Cloud Foundry® (PCF) 1.6.x

Purpose

Recent logs and events aren’t appearing in the Apps Manager. Current logs are visible in the Apps Manager and recent logs are visible when tailing them in the CLI.  This article will explain how to test the Loggregator connection.

Cause

Current logs are sent to the Apps Manager via WebSockets; recent logs and events are sent via HTTP. This could be the external Load Balancer, a proxy, a firewall, or just that blocked HTTP connections are blocked in the environment.

Procedure

To get started, we will check to see if we can connect to the Loggregator component over HTTP:

After performing the `curl` command above, you will more than likely see the command hang. If it's not hanging and instead you have received a 404 response, then your loggregator connection is good and your issue is being caused by something else. Since the command is probably hung, continue troubleshooting following the steps below:

  • Make sure you’re logged in as the UAA admin per the instructions earlier and target the apps-manager space. You will also need the CF_LOGGREGATOR_HTTP_URL from earlier.
  • Run `cf app <RUNNING APPS MANAGER> --guid` to get the running Apps Manager guid. Save this guid.
  • Run `cf oauth-token` to get the OAuth token for your current session. You will need this for the next step.
  • Run `cf ssh <RUNNING APPS MANAGER>` to ssh into your Apps Manager container.
  • Run `curl -H ‘Authorization: <cf oauth-token OUTPUT HERE>’ -vv http://loggregator.system.deschutes.mini.pez.pivotal.io/recent?app=<app-guid>`
  • If you see entries that look like logs, then you have a HTTP Loggregator connection. If you don’t, then your Apps Manager does not have a connection to the Loggregator.
    • Example of output:
healthcheck passed�ꬼ��۸("$14407c52-966d-4341-abd3-aa01d86f1c1420BHEALTH
--d804777b9d088c0ea297de2753bc69de6fa2cd50860987a649b1e2d7ffb6

Exit status 0��Ͽ��۸("$14407c52-966d-4341-abd3-aa01d86f1c1420BHEALTH --d804777b9d088c0ea297de2753bc69de6fa2cd50860987a649b1e2d7ffb6
.Successful remote access by 10.64.37.253:34330������۸("$14407c52-966d-4341-abd3-aa01d86f1c1420BSSH --d804777b9d088c0ea297de2753bc69de6fa2cd50860987a649b1e2d7ffb6

 If your output looks like that, then the loggregator is working. However, the connection to the apps manager is being blocked, which is why recent logs aren’t appearing in Apps manager but do when you run `cf logs` in the CLI.

Comments

Powered by Zendesk