Skip to content

Unable to query recent application logs with CloudFoundryOperations #818

@sworisbreathing

Description

@sworisbreathing

I'm using cf-java-client for https://github.com/jenkinsci/cloudfoundry-plugin. For cf-java-client version 2.15.0.RELEASE (the version we're currently using), we were able to query recent application logs using CloudFoundryOperations like so:

cloudFoundryOperations
  .applications()
  .logs(
    LogsRequest.builder()
      .name(appName)
      .recent(Boolean.TRUE)
      .build()
  )

However it appears that from version 2.17.0.RELEASE onward, the above code fails and logs an UnknownCloudFoundryException.

Digging into the issue (and turning on debug logging for requests and responses), it looks like the old code was requesting recent logs from https://doppler.local.pcfdev.io/apps/:appId/recentlogs while the new (2.17.0.RELEASE and above) code is trying to request logs from https://loggregator.local.pcfdev.io:443/apps/:appId/recentlogs (which returns a 502 status).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions