Date   

[abacus] Adding metering resource

Piotr Przybylski <piotrp@...>
 

Hi,
I would like to add a new resource, similar to linux-container. What is a
correct way to register that resource ? The resource files are located in
cf-abacus/lib/config/resource/src/resources,
however adding resource file there does not add new resource_id to resource
enumerations (e.g. in cf-abacus/lib/config/resource/src/index.js).

Thank you

Piotr


Re: my app needs to get the number of instances in which its running, (in runtime my app uses this info in my program logic)

Alexander Lomov <alexander.lomov@...>
 

Actually I made a mistake here. The gem you may to use as a API wrapper for Ruby is called cfoundry [1]. While it may not have support for the latest versions of CF, I was able to use it in may projects. For instance this simple app [2].

[1] https://github.com/cloudfoundry-attic/cfoundry
[2] https://github.com/allomov/cf-auto-scaling/blob/master/Gemfile#L6

On Sep 30, 2015, at 8:11 PM, Lomov Alexander <alexander.lomov(a)altoros.com<mailto:alexander.lomov(a)altoros.com>> wrote:

Hey, Sir Zooba. Sorry for the late response.

You can find the description of Cloud Controller API here [1]. You can make requests to your Cloud Controller through Gorouter component adding “api.” before main CF domain. For instance if you have CF deployment to cf-example.com<http://cf-example.com/> domain, then you’ll need to use http://api.cf-example.com<http://api.cf-example.com/> to reach CC.

The better option will be to use API wrappers for the language you work with. For instance for ruby you can choose this one [2].

[1] http://apidocs.cloudfoundry.org/218/
[2] https://github.com/frodenas/cloudfoundry-client

On Sep 30, 2015, at 7:32 PM, zooba Sir <myfakename90(a)gmail.com<mailto:myfakename90(a)gmail.com>> wrote:

Also, please let me know how to call the API in my code.

Thanks.


Re: my app needs to get the number of instances in which its running, (in runtime my app uses this info in my program logic)

Alexander Lomov <alexander.lomov@...>
 

Hey, Sir Zooba. Sorry for the late response.

You can find the description of Cloud Controller API here [1]. You can make requests to your Cloud Controller through Gorouter component adding “api.” before main CF domain. For instance if you have CF deployment to cf-example.com<http://cf-example.com> domain, then you’ll need to use http://api.cf-example.com to reach CC.

The better option will be to use API wrappers for the language you work with. For instance for ruby you can choose this one [2].

[1] http://apidocs.cloudfoundry.org/218/
[2] https://github.com/frodenas/cloudfoundry-client

On Sep 30, 2015, at 7:32 PM, zooba Sir <myfakename90(a)gmail.com<mailto:myfakename90(a)gmail.com>> wrote:

Also, please let me know how to call the API in my code.

Thanks.


Re: CF API for "general statistics"?

Jim Park
 

As far as the available app space available in the system, PWS uses
https://github.com/cloudfoundry/collector/blob/master/lib/collector/handlers/dea.rb#L10
to
ID how much available space is in a deploy for additional apps.

This varz endpoint is populated by
https://github.com/cloudfoundry/dea_ng/blob/b74390b2472a6a929807040f4439a30ecb46e699/lib/dea/bootstrap.rb#L473

You can trace it further back from here.

So the short answer is no, you need to enable monitoring by deploying a
collector.

Thanks,


Jim

On Tue, Sep 29, 2015 at 2:12 PM CF Runtime <cfruntime(a)gmail.com> wrote:

I'd like to add as well that you can configure Bosh's healthmonitor to
send this data to an external dataviz/archival service (we use Datadog for
our various test environments): https://bosh.io/docs/hm-config.html

Zak + Mikhail, CF Release Integration

On Tue, Sep 29, 2015 at 4:58 AM, James Bayer <jbayer(a)pivotal.io> wrote:

if you're using bosh to manage cloud foundry, then the bosh cli has a
command:
bosh vms --vitals

which you can read about here [1], that does a good job of measuring
infra concerns:

- Vitals: Includes load, CPU, memory, swap, system disk, ephemeral
disk, and persistent disk usage for each VM.


[1] http://bosh.io/docs/sysadmin-commands.html#health

On Tue, Sep 29, 2015 at 2:51 AM, Rafal Radecki <radecki.rafal(a)gmail.com>
wrote:

Hi all :)

I got a task to check the possibility to fetch details such as:
- overall used and available memory/storage usage of cf platform
- list of running warden containers, approximation how many can be
spawned additionally
I looked through https://apidocs.cloudfoundry.org/218/ but did not find
anything similar to whats I am looking for.

Are there any options other than standard os level monitoring?

BR,
Rafal.


--
Thank you,

James Bayer


Re: my app needs to get the number of instances in which its running, (in runtime my app uses this info in my program logic)

Zuba Al
 

Also, please let me know how to call the API in my code.

Thanks.


Re: my app needs to get the number of instances in which its running, (in runtime my app uses this info in my program logic)

Zuba Al
 

will this "instance" attribute gives number of successfully running instances at the moment or just the maximum no of instances for the app as configured in manifest.yml


Re: PHP extension 'gettext' doesn't work?

Daniel Mikusa
 

This looks OK. I'm not seeing any build pack errors. Could you include
your sample PHP code?

See comments inline below.

On Wed, Sep 30, 2015 at 1:44 AM, Hiroaki Ukaji <dt3snow.w(a)gmail.com> wrote:

Hi.
Thanks for your reply.

Yes, I also think the extension is loading in application container,
however, the function (which was able to be activated properly in a local
machine) perhaps doesn't work.
Anyway, I'm sorry about my less information. I'm trying to write details
again.

- what version of PHP are you using?
>>> we're using PHP-5.5.23
(php-buildpack version is v3.2.1, which is default in cf-release
v211. we're operating them on bosh-lite (tree:552dc68696), and using cf-cli
v6.12.0.).
Could you try with the latest build pack? That would rule out any issues
that have been already addressed.



- how are you enabling the extension: options.json or composer.json?
>>> by "PHP_EXTENSION" in .bp-config/options.json.
OK


- what's the full output of `cf push`?
- what's the output of `cf logs` when you try to access a page that uses
`gettext`?
>>> please observe the following.

********** `cf push` **********
$ git clone https://github.com/nota-ja/php-gettext-example
$ cd php-gettext-example/
php-gettext-example$ cf push php-gettext-example
Creating app php-gettext-example in org ukaji / space default as ukaji...
OK

Creating route php-gettext-example.10.244.0.34.xip.io...
OK

Binding php-gettext-example.10.244.0.34.xip.io to php-gettext-example...
OK

Uploading php-gettext-example...
Uploading app files from: /home/ukaji/workspace/php-gettext-example
Uploading 2.8K, 9 files
Done uploading
OK

Starting app php-gettext-example in org ukaji / space default as ukaji...
-----> Downloaded app package (4.0K)
-------> Buildpack version 3.2.1
<snip/>


Installing PHP
PHP 5.5.23
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 5000k 100 5000k 0 0 449M 0 --:--:-- --:--:-- --:--:--
449M
Downloaded
[
https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-5.5.23.tar.gz
]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 8640k 100 8640k 0 0 341M 0 --:--:-- --:--:-- --:--:--
341M
Downloaded
[
https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-fpm-5.5.23.tar.gz
]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 18857 100 18857 0 0 105M 0 --:--:-- --:--:-- --:--:--
105M
Downloaded
[
https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-gettext-5.5.23.tar.gz
]
OK, so the extension is being installed. That's good.


to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 1046k 100 1046k 0 0 297M 0 --:--:-- --:--:-- --:--:--
427M
Downloaded
[
https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-mbstring-5.5.23.tar.gz
]
to [/tmp]
Finished: [2015-09-30 02:14:06.118672]
-----> Uploading droplet (17M)

1 of 1 instances running

App started
The app is starting OK, that's good.


OK

App php-gettext-example was started using this command
`$HOME/.bp/bin/start`

Showing health and status for app php-gettext-example in org ukaji / space
default as ukaji...
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: php-gettext-example.10.244.0.34.xip.io
last uploaded: Wed Sep 30 02:13:59 UTC 2015
stack: cflinuxfs2
buildpack: PHP

state since cpu memory disk
details
#0 running 2015-09-30 11:14:12 AM 0.0% 22.6M of 256M 0 of 1G
php-gettext-example$ curl php-gettext-example.10.244.0.34.xip.io

/home/vcap/app/htdocs/locale: hello-world
So, I take it "hello-world" should be replaced with a localized version?


********************

********** `cf logs` when I access a page **********
I don't see any errors in the logs, so that's good. If the extension
failed to load, it should show up here.

Dan



curl
2015-09-30T11:15:28.79+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:15:28 +0000] "GET
/
HTTP/1.1" 200 0 46 "-" "curl/7.35.0" 10.0.2.15:56004
x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:62553a95-d90f-462c-5059-5f66ea826e70
response_time:0.007372778 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:15:28.79+0900 [App/0] OUT 02:15:28 httpd |
192.168.50.1
- - [30/Sep/2015:02:15:28 +0000] "GET / HTTP/1.1" 200 46
vcap_request_id=62553a95-d90f-462c-5059-5f66ea826e70 peer_addr=10.0.2.15

accessing from a browser(google chrome)
2015-09-30T11:16:40.76+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:16:40 +0000] "GET
/
HTTP/1.1" 200 0 46 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.42 Safari/537.36"
10.0.2.15:56760 x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:96c67b24-dfb1-4dfe-7b23-e850ccc75e4b
response_time:0.008837383 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:16:40.78+0900 [App/0] OUT 02:16:40 httpd |
192.168.50.1
- - [30/Sep/2015:02:16:40 +0000] "GET / HTTP/1.1" 200 46
vcap_request_id=96c67b24-dfb1-4dfe-7b23-e850ccc75e4b peer_addr=10.0.2.15
2015-09-30T11:16:40.87+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:16:40 +0000] "GET
/favicon.ico HTTP/1.1" 404 0 209
"http://php-gettext-example.10.244.0.34.xip.io/" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/46.0.2490.42 Safari/537.36" 10.0.2.15:56760
x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:34075545-f921-4597-6564-9249f7586a1b
response_time:0.004353567 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:16:40.88+0900 [App/0] OUT 02:16:40 httpd | [Wed Sep 30
02:16:40.873592 2015] [core:info] [pid 46:tid 139946828056320] [client
192.168.50.1:41285] AH00128: File does not exist:
/home/vcap/app/htdocs/favicon.ico, referer:
http://php-gettext-example.10.244.0.34.xip.io/
2015-09-30T11:16:40.88+0900 [App/0] OUT 02:16:40 httpd |
192.168.50.1
- - [30/Sep/2015:02:16:40 +0000] "GET /favicon.ico HTTP/1.1" 404 209
vcap_request_id=34075545-f921-4597-6564-9249f7586a1b peer_addr=10.0.2.15
********************


I hope these answer your questions.

Thanks.

Hiroaki UKAJI




--
View this message in context:
http://cf-dev.70369.x6.nabble.com/cf-dev-PHP-extension-gettext-doesn-t-work-tp1984p2000.html
Sent from the CF Dev mailing list archive at Nabble.com.


Re: special character in db password

Daniel Mikusa
 

On Tue, Sep 29, 2015 at 11:15 PM, Naga Rakesh <nagarakesh4(a)gmail.com> wrote:

Hello,

I am facing an issue while bounding app to a service instance. The service
instance points to a database which has a '@' (at symbol) in its password
(example : abc(a)def). When I bind this service instance to an existing
app, the app throws up the following error when trying to access the data.
How did you create this service instance? Is it from a service broker? or
is it a user provided service?



*OUT java.net.UnknownHostException: null: unknown error*
*at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method).*

The sample URI in the env formed was "mysql://username:abc(a)def@
1.1.1.1:3306/dbname", as you can see the password was having a '@'
character in it. I believe how it works is it parses the URI as
*drivername://username:password(a)hostname:port/dbname* and in this case as
the password contains @ it is unable to parse the hostname correctly.
That's because the URL is not valid. Your "@" in the password should be
url encoded (the username and password sections should both be urlencoded,
the "@" is just the only character that would change from being
urlencoded).

If you're passing this URL through a user provided service then you need to
manually urlencode it. If you're using a service broker, then that sounds
like a bug with the broker.

Dan


Re: PHP extension 'gettext' doesn't work?

Hiroaki Ukaji <dt3snow.w@...>
 

Hi.
Thanks for your reply.

Yes, I also think the extension is loading in application container,
however, the function (which was able to be activated properly in a local
machine) perhaps doesn't work.
Anyway, I'm sorry about my less information. I'm trying to write details
again.

- what version of PHP are you using?
>>> we're using PHP-5.5.23
(php-buildpack version is v3.2.1, which is default in cf-release
v211. we're operating them on bosh-lite (tree:552dc68696), and using cf-cli
v6.12.0.).

- how are you enabling the extension: options.json or composer.json?
>>> by "PHP_EXTENSION" in .bp-config/options.json.

- what's the full output of `cf push`?
- what's the output of `cf logs` when you try to access a page that uses
`gettext`?
>>> please observe the following.

********** `cf push` **********
$ git clone https://github.com/nota-ja/php-gettext-example
$ cd php-gettext-example/
php-gettext-example$ cf push php-gettext-example
Creating app php-gettext-example in org ukaji / space default as ukaji...
OK

Creating route php-gettext-example.10.244.0.34.xip.io...
OK

Binding php-gettext-example.10.244.0.34.xip.io to php-gettext-example...
OK

Uploading php-gettext-example...
Uploading app files from: /home/ukaji/workspace/php-gettext-example
Uploading 2.8K, 9 files
Done uploading
OK

Starting app php-gettext-example in org ukaji / space default as ukaji...
-----> Downloaded app package (4.0K)
-------> Buildpack version 3.2.1
Installing HTTPD
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 1534k 100 1534k 0 0 226M 0 --:--:-- --:--:-- --:--:--
226M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 14682 100 14682 0 0 127M 0 --:--:-- --:--:-- --:--:--
127M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_unixd-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 19969 100 19969 0 0 247M 0 --:--:-- --:--:-- --:--:--
247M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_setenvif-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 137k 100 137k 0 0 514M 0 --:--:-- --:--:-- --:--:--
514M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_proxy-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 16787 100 16787 0 0 70.5M 0 --:--:-- --:--:-- --:--:--
70.5M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_dir-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 20550 100 20550 0 0 153M 0 --:--:-- --:--:-- --:--:--
153M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_reqtimeout-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 42000 100 42000 0 0 157M 0 --:--:-- --:--:-- --:--:--
157M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_log_config-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 28927 100 28927 0 0 153M 0 --:--:-- --:--:-- --:--:--
153M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_authz_core-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 25276 100 25276 0 0 197M 0 --:--:-- --:--:-- --:--:--
197M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_mime-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 31561 100 31561 0 0 202M 0 --:--:-- --:--:-- --:--:--
202M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_proxy_fcgi-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 17805 100 17805 0 0 106M 0 --:--:-- --:--:-- --:--:--
106M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_remoteip-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 13323 100 13323 0 0 186M 0 --:--:-- --:--:-- --:--:--
186M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_env-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 72297 100 72297 0 0 341M 0 --:--:-- --:--:-- --:--:--
341M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_mpm_event-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 82878 100 82878 0 0 429M 0 --:--:-- --:--:-- --:--:--
429M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_rewrite-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 16145 100 16145 0 0 57.4M 0 --:--:-- --:--:-- --:--:--
57.4M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_authz_host-2.4.12.tar.gz]
to [/tmp]
Installing PHP
PHP 5.5.23
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 5000k 100 5000k 0 0 449M 0 --:--:-- --:--:-- --:--:--
449M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-5.5.23.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 8640k 100 8640k 0 0 341M 0 --:--:-- --:--:-- --:--:--
341M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-fpm-5.5.23.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 18857 100 18857 0 0 105M 0 --:--:-- --:--:-- --:--:--
105M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-gettext-5.5.23.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 1046k 100 1046k 0 0 297M 0 --:--:-- --:--:-- --:--:--
427M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-mbstring-5.5.23.tar.gz]
to [/tmp]
Finished: [2015-09-30 02:14:06.118672]
-----> Uploading droplet (17M)

1 of 1 instances running

App started


OK

App php-gettext-example was started using this command `$HOME/.bp/bin/start`

Showing health and status for app php-gettext-example in org ukaji / space
default as ukaji...
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: php-gettext-example.10.244.0.34.xip.io
last uploaded: Wed Sep 30 02:13:59 UTC 2015
stack: cflinuxfs2
buildpack: PHP

state since cpu memory disk
details
#0 running 2015-09-30 11:14:12 AM 0.0% 22.6M of 256M 0 of 1G
php-gettext-example$ curl php-gettext-example.10.244.0.34.xip.io
/home/vcap/app/htdocs/locale: hello-world
********************

********** `cf logs` when I access a page **********
curl
2015-09-30T11:15:28.79+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:15:28 +0000] "GET /
HTTP/1.1" 200 0 46 "-" "curl/7.35.0" 10.0.2.15:56004
x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:62553a95-d90f-462c-5059-5f66ea826e70
response_time:0.007372778 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:15:28.79+0900 [App/0] OUT 02:15:28 httpd | 192.168.50.1
- - [30/Sep/2015:02:15:28 +0000] "GET / HTTP/1.1" 200 46
vcap_request_id=62553a95-d90f-462c-5059-5f66ea826e70 peer_addr=10.0.2.15

accessing from a browser(google chrome)
2015-09-30T11:16:40.76+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:16:40 +0000] "GET /
HTTP/1.1" 200 0 46 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.42 Safari/537.36"
10.0.2.15:56760 x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:96c67b24-dfb1-4dfe-7b23-e850ccc75e4b
response_time:0.008837383 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:16:40.78+0900 [App/0] OUT 02:16:40 httpd | 192.168.50.1
- - [30/Sep/2015:02:16:40 +0000] "GET / HTTP/1.1" 200 46
vcap_request_id=96c67b24-dfb1-4dfe-7b23-e850ccc75e4b peer_addr=10.0.2.15
2015-09-30T11:16:40.87+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:16:40 +0000] "GET
/favicon.ico HTTP/1.1" 404 0 209
"http://php-gettext-example.10.244.0.34.xip.io/" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/46.0.2490.42 Safari/537.36" 10.0.2.15:56760
x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:34075545-f921-4597-6564-9249f7586a1b
response_time:0.004353567 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:16:40.88+0900 [App/0] OUT 02:16:40 httpd | [Wed Sep 30
02:16:40.873592 2015] [core:info] [pid 46:tid 139946828056320] [client
192.168.50.1:41285] AH00128: File does not exist:
/home/vcap/app/htdocs/favicon.ico, referer:
http://php-gettext-example.10.244.0.34.xip.io/
2015-09-30T11:16:40.88+0900 [App/0] OUT 02:16:40 httpd | 192.168.50.1
- - [30/Sep/2015:02:16:40 +0000] "GET /favicon.ico HTTP/1.1" 404 209
vcap_request_id=34075545-f921-4597-6564-9249f7586a1b peer_addr=10.0.2.15
********************


I hope these answer your questions.

Thanks.

Hiroaki UKAJI




--
View this message in context: http://cf-dev.70369.x6.nabble.com/cf-dev-PHP-extension-gettext-doesn-t-work-tp1984p2000.html
Sent from the CF Dev mailing list archive at Nabble.com.


special character in db password

Naga Rakesh
 

Hello,

I am facing an issue while bounding app to a service instance. The service
instance points to a database which has a '@' (at symbol) in its password
(example : abc(a)def). When I bind this service instance to an existing app,
the app throws up the following error when trying to access the data.

*OUT java.net.UnknownHostException: null: unknown error*
*at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method).*

The sample URI in the env formed was "mysql://username:abc(a)def@
1.1.1.1:3306/dbname", as you can see the password was having a '@'
character in it. I believe how it works is it parses the URI as
*drivername://username:password(a)hostname:port/dbname* and in this case as
the password contains @ it is unable to parse the hostname correctly. Let
me know if I am missing something and also if there is any way to solve
this issue.

Thanks,
Rakesh


future changes to etcd configuration in cf-release

Amit Kumar Gupta
 

Hi all,

Just wanted to give the community advance notice that we will be
introducing a change to the etcd configuration in cf-release, probably
within the week (probably cf v220+, we are currently on v218).

etcd can be configured to require ssl communication amongst servers, and
between servers and clients. Currently this defaults to false, but we will
be changing the default to true. We will include documentation on how to
generate certs, and where to put them in your stubs if you are using the
spiff tooling to generate deployment manifests. The BOSH-Lite dev
manifests will include certs by default, to make the dev workflow
especially easy.

Cheers,

Amit Gupta
Cloud Foundry PM, OSS Release Integration team


proposed stemcell network performance tuning

Amit Kumar Gupta
 

Hi all,

I'd like to propose tuning a couple kernel parameters related to tcp
performance:

# TCP_FIN_TIMEOUT
# This setting determines the time that must elapse before TCP/IP can
release a closed connection and reuse
# its resources. During this TIME_WAIT state, reopening the connection to
the client costs less than establishing
# a new connection. By reducing the value of this entry, TCP/IP can release
closed connections faster, making more
# resources available for new connections. Adjust this in the presence of
many connections sitting in the
# TIME_WAIT state:

echo 5 > /proc/sys/net/ipv4/tcp_fin_timeout

# TCP_TW_REUSE
# This allows reusing sockets in TIME_WAIT state for new connections when
it is safe from protocol viewpoint.
# Default value is 0 (disabled). It is generally a safer alternative to
tcp_tw_recycle

echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse

Currently, these parameters are set by certain jobs in cf-release,
diego-release, and perhaps others. Any VM needing to establish a high
number of incoming/outgoing tcp connections in a short period of time will
be unable to establish new connections without changing these parameters.

We believe these parameters are safe to change across the board, and will
be generally beneficial. The existing defaults made sense for much older
networks, but can be greatly optimized for modern systems.

Please share with the mailing lists if you have any questions or feedback
about this proposal. If you maintain a bosh release and would like to see
how these changes would affect your release, you can create a job which
simply does the above in its startup scripts, and colocate that job with
all the other jobs in a deployment of your release.

Thanks,

Amit Gupta
Cloud Foundry PM, OSS Release Integration team


Magnesium Metal, Ferro Phosphorus, Calcium Ferrite

Alexander Yang <alexanderjoe2@...>
 

Dear Sir,
 
Currently, we could supply you with the cargo as below.
 
1. Magnesium ingot,alloy and powder
 
2. Ferro Phosphorus
 
3. Calcium Ferrite
 
 
If you have demand, please let me know.
 
Yours sincerely,
Alexander Yang
 
 
++++++++++++++++++++++++++++++++++++++++++++++++++++
 

Mobile      : +86-18608554433
 
Tel           : +86-855- 8589919
Fax          : +86-855-8589919
 
 
Email        : alexanderjoe6@... d.suns@...
 
Skype       : dualsuns1
 
++++++++++++++++++++++++++++++++++++++++++++++++++++
 


Re: CF API for "general statistics"?

CF Runtime
 

I'd like to add as well that you can configure Bosh's healthmonitor to send
this data to an external dataviz/archival service (we use Datadog for our
various test environments): https://bosh.io/docs/hm-config.html

Zak + Mikhail, CF Release Integration

On Tue, Sep 29, 2015 at 4:58 AM, James Bayer <jbayer(a)pivotal.io> wrote:

if you're using bosh to manage cloud foundry, then the bosh cli has a
command:
bosh vms --vitals

which you can read about here [1], that does a good job of measuring infra
concerns:

- Vitals: Includes load, CPU, memory, swap, system disk, ephemeral
disk, and persistent disk usage for each VM.


[1] http://bosh.io/docs/sysadmin-commands.html#health

On Tue, Sep 29, 2015 at 2:51 AM, Rafal Radecki <radecki.rafal(a)gmail.com>
wrote:

Hi all :)

I got a task to check the possibility to fetch details such as:
- overall used and available memory/storage usage of cf platform
- list of running warden containers, approximation how many can be
spawned additionally
I looked through https://apidocs.cloudfoundry.org/218/ but did not find
anything similar to whats I am looking for.

Are there any options other than standard os level monitoring?

BR,
Rafal.


--
Thank you,

James Bayer


Re: Making your landscape trust a certain certificate authority

Daniel Mikusa
 

A couple options...

1.) If you only need the cert for one or a couple apps and / or you don't
want to manage a fork, you can package the CA cert with the application.
Then add a `.profile.d` script [1] that sets up the certificate that you
packaged with the app. I don't have an example off-hand, but the
.profile.d script could call keytool and import your ca cert or just move a
keystore containing your ca cert from the app files and overwrite the JVM
default.

2.) Write your application so that it can utilize it's own truststore.
It's a little more work, but most things that use a truststore in the JVM
allow you to customize the behavior specifying your own truststore. If the
app were to do this, it could then expose a configuration option through
which it's users could set their own truststore. Then users wouldn't need
to depend on what certs are installed by default.

Dan


[1] - https://devcenter.heroku.com/articles/profiled (CF honors them too)

On Tue, Sep 29, 2015 at 4:50 PM, Mathias Essenpreis <esse(a)gmx.de> wrote:

Hi,
we want to make the apps on our landscape trust a certain ca certificate
of a ca we run internally. I came across the instructions on how to do this
for the JRE buildpack:
https://github.com/cloudfoundry/java-buildpack/blob/master/docs/jre-open_jdk_jre.md#custom-ca-certificates

I understand doing this once in the JRE buildpack will directly make all
the java apps that of course need to make use of the JRE buildpack trusting
our internal ca. Is that correct or do I need to change other buildpacks as
well?

However this implies performing a fork of the JRE buildpack. A fork means
that we always need to synchronize manually with the newer versions of the
build pack.

How do you approach this problem in your organization? I suppose you also
have internal certificate authorities that need to be trusted, right?

Also I am asking myself whether there is a way to enhance the default
buildpack allowing an application (instead of the buildpack) to bring their
own, additional certificates?

thx
Mathias


Making your landscape trust a certain certificate authority

Mathias Essenpreis <esse@...>
 

Hi,
we want to make the apps on our landscape trust a certain ca certificate of a ca we run internally. I came across the instructions on how to do this for the JRE buildpack: https://github.com/cloudfoundry/java-buildpack/blob/master/docs/jre-open_jdk_jre.md#custom-ca-certificates

I understand doing this once in the JRE buildpack will directly make all the java apps that of course need to make use of the JRE buildpack trusting our internal ca. Is that correct or do I need to change other buildpacks as well?

However this implies performing a fork of the JRE buildpack. A fork means that we always need to synchronize manually with the newer versions of the build pack.

How do you approach this problem in your organization? I suppose you also have internal certificate authorities that need to be trusted, right?

Also I am asking myself whether there is a way to enhance the default buildpack allowing an application (instead of the buildpack) to bring their own, additional certificates?

thx
Mathias


Re: cloud_controller_ng performance degrades slowly over time

Mike Youngstrom
 

We don't have the same performance numbers since we don't use New Relic.
However, for the last 6 months or so after 3-4 weeks our smoke tests begin
failing randomly with 500 errors doing basic things like creating routes.
If we restart the CC(s) then everything works great for another 3-4 weeks.

Mike

On Tue, Sep 29, 2015 at 1:08 PM, Matt Cholick <cholick(a)gmail.com> wrote:

This is a pretty tricky one, as it takes a long time to manifest. After a
while without a restart, cloud_controller_ng take a long time listing org
users. For example, in an org with 350 users, before restart `cf org-users
ORG` took 1:20. After restart, the call took 0:07. We've only notice this
twice, both times after the cloud controller had been running for a couple
weeks without a restart.

Looking in New Relic, the breakdown of an individual call to
organization/guid/managers shows the majority of the call externally:

[image: Inline image 1]

Though uaa itself isn't the issue, as things are fine immediately after
restarting cloud_controller_ng (and restarting uaa has no affect).

Have other Cloud Foundry operators seen this degraded performance? Is
there other information we could provide to turn this into a workable bug
report?

-Matt Cholick



cloud_controller_ng performance degrades slowly over time

Matt Cholick
 

This is a pretty tricky one, as it takes a long time to manifest. After a
while without a restart, cloud_controller_ng take a long time listing org
users. For example, in an org with 350 users, before restart `cf org-users
ORG` took 1:20. After restart, the call took 0:07. We've only notice this
twice, both times after the cloud controller had been running for a couple
weeks without a restart.

Looking in New Relic, the breakdown of an individual call to
organization/guid/managers shows the majority of the call externally:

[image: Inline image 1]

Though uaa itself isn't the issue, as things are fine immediately after
restarting cloud_controller_ng (and restarting uaa has no affect).

Have other Cloud Foundry operators seen this degraded performance? Is there
other information we could provide to turn this into a workable bug report?

-Matt Cholick


Re: [ann] Subway - how to scale out any Cloud Foundry service

Dr Nic Williams
 

Subway is now also available as a bosh release; and works nicely collocated on a now-scalable bosh deployment https://blog.starkandwayne.com/2015/09/29/deploying-subway-broker-with-bosh/

On Mon, Sep 21, 2015 at 4:27 PM, Dr Nic Williams <drnic(a)starkandwayne.com>
wrote:

Quicky links:
* https://github.com/cloudfoundry-community/cf-subway
*
https://blog.starkandwayne.com/2015/09/21/how-to-scale-out-any-cloud-foundry-service/
We've been using Ferdy's Docker BOSH release since he created it, and have
published new docker images, new wrapper BOSH releases and more. But it
still doesn't scale horizontally (yes it has docker swarm support but no
that can't do persistent storage on volumes).
So we created Subway - a broker that allows you to run a fleet of
single-server service brokers such as Docker BOSH release, or
cf-redis-boshrelease.
I'll write up/create a video soon to walk-thru upgrading your existing
in-production single-server services to use Subway.
Have fun!
Nic
--
Dr Nic Williams
Stark & Wayne LLC - consultancy for Cloud Foundry users
http://drnicwilliams.com
http://starkandwayne.com
cell +1 (415) 860-2185
twitter @drnic


Using the cf-dev list for CF Abacus dev discussions

Jean-Sebastien Delfino
 

Hi all,

We've been making pretty good progress with the CF Abacus (incubating)
project recently.

So far, we've been using a mix of Gitter, Slack and Github issues for all
our detailed dev discussions but with the increased momentum in the project
I'm thinking that it's probably be a good time to start moving these dev
discussions to the cf-dev list instead.

I'm hoping that the mailing list will help organize our Abacus dev
discussions a bit better, and it should give others on the list more
opportunities to follow and participate as well.

If there's no objection I'll start posting here in a day or so.

-- Jean-Sebastien

7401 - 7420 of 9422