Trying to install TestBox. Installation failed.

CommandBox:commandbox-jre-win64-3.5.0> install testbox-be

Installing package [forgebox:testbox-be]
Verifying package ‘testbox-be’ in ForgeBox, please wait…

Aww man, ForgeBox isn’t feeling well.
Uh-oh, ForgeBox returned something other than JSON. Run “system-log | open” to
see the full response. GET https://www.forgebox.io/api/v1/entry/testbox-be
Unknown host: sun.security.validator.ValidatorException: PKIX path building fail
ed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find v
alid certification path to requested target
Connection Failure. Status code unavailable.
We’re going to look in your local artifacts cache and see if one of those versio
ns will work.
No satisfying version found for [stable]. Well, we tried as hard as we can. For
geBox is unreachable and you don’t have a usable version in your local artifacts
cache. Please try another version.
CommandBox:commandbox-jre-win64-3.5.0>

That error message sounds like your version of Java, your OS, or possibly a networking application/proxy at your org is incompatible with the SSL cert in use by Cloudflare. Can you try the same operation from another computer or at your house?

That said, when I run the same command I get the message “The ForgeBox entry [TestBox BDD/xUnit Bleeding Edge] is inactive.” which is true. The proper way to install the bleeding edge version of TestBox is:

install testbox@be

And that command works fine for me. If you still get the same error, can you check what version of Java CommandBox is running on. This shows up when you run the “info” command. You may have and old version and/or an outdated list of trusted certs.

Thanks!

~Brad

Hi Brad,

I have verify the version of java :
CommandBox Version: 3.5.0+00600

Java Version: 1.8.0_102 (Oracle Corporation).

Also tried it on another PC in our organization.

For Certificate sni205803.cloudflaressl.com .

I added the Cloudflare Origin CA — RSA Root and Cloudflare Origin CA — ECC Root.

And again try to install testbox.

But it shows same error which i post previously.

Is there any proxy issue with our organization?

If your org uses a proxy, you would need to configure it with CommandBox, but I would expect a different error message in that case.
https://ortus.gitbooks.io/commandbox-documentation/content/config_settings/proxy_settings.html

When happens when you hit the URL in your browser?

Hi Brad,

when i hit the URL https://www.forgebox.io/api/v1/entry/testbox , It retured JSON response.

like,
“downloadURL”:“http://downloads.ortussolutions.com/ortussolutions/testbox/2.4.0/testbox-2.4.0.zip"},“avgRating”:“0.0000”,“changelogFormat”:“text”,“installs”:12300,“title”:“TestBox”,“summary”:"A BDD and xUnit testing framework with Mocking Goodness”},“error”:false,“messages”:[],“errorcode”:“0”}.

Thanks,
Trushana

For some reason, it seems the root cert is not installed then. I don’t know why though. That error is all over the internet, but everyone says it happens when using a self-signed cert which we’re not doing and your version of Java should be new enough to include any recent root cert additions.

When you said you installed a cert earlier, where and how did you install it?

For this I refer the links,

And

ColdFusion / Java: PKIX path building failed: java.security.cert.CertPathBuilderException: Could not build a validated path | Hass - IT Consulting.

I added this certification in commandbox folder.

And again try to install testbox.

*> I added this certification in commandbox folder.*

Can you be more specific? What commandbox folder did you add it to?
Firstly, where is your java home? If you don't know, run this command from
CommandBox to find out:

repl 'createObject( "java", "java.lang.System" ).getProperty( "java.home" )'

Once you find your Java home, can you check and see if the root cert used
by Cloudflare is there?

keytool -list -keystore "C:\your\path\to\jre\lib\security\cacerts"

Thanks!

~Brad

*Developer Advocate*
*Ortus Solutions, Corp *

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Java Home location : D:\Softwares\commandbox-jre-win64-3.5.0\jre for commandbox

For import certificate

at the location D:\Softwares\commandbox-jre-win64-3.5.0 I create files cloudflarerootca_ecc.pem and cloudflarerootca_rsa.pem.

I execute the command,

C:\ColdFusion11\jre\bin>keytool -import -alias “cloudflarerootca_ecc” -keystore
“C:\ColdFusion11\jre\lib\security\cacerts” -file D:\Softwares\commandbox-jre-win
64-3.5.0\cloudflarerootca_ecc.pem

C:\ColdFusion11\jre\bin>keytool -import -alias “cloudflarerootca_rsa” -keystore
“C:\ColdFusion11\jre\lib\security\cacerts” -file D:\Softwares\commandbox-jre-win
64-3.5.0\cloudflarerootca_rsa.pem

And the verify the certificate,

keytool -list -keystore "C:\ColdFusion10\jre\lib\security\cacerts" at this place

The certificate are there.

I have added the proxy settings https://ortus.gitbooks.io/commandbox-documentation/content/config_settings/proxy_settings.html from this referal link.

And tried to install testbox.

Then I ll receive the error as,

CommandBox:test> install testbox@be

Installing package [forgebox:testbox@be]
Verifying package ‘testbox’ in ForgeBox, please wait…

Aww man, ForgeBox isn’t feeling well.
Uh-oh, ForgeBox returned something other than JSON. Run “system-log | open” to
see the full response. GET https://www.forgebox.io/api/v1/entry/testbox

408 Request Time-out
We’re going to look in your local artifacts cache and see if one of those versio
ns will work.
No satisfying version found for [be]. Well, we tried as hard as we can. ForgeBo
x is unreachable and you don’t have a usable version in your local artifacts cac
he. Please try another version.
CommandBox:test>

Wait, you imported the cert into the wrong java home! You need to import the cert into the actual version of Java used by CommandBox. I don’t know why you’re doing it in your CF11’s Java installation.

The fact that you placed the pem files in the commandbox folder prior to importing them is irrelevant. They could be in a temp folder for all Java cares-- your commands specifies the cacerts file to import them into and it needs to be the cacerts file in the Java home used by CommandBox. Note, CommandBox is its own Java app internally that runs as a completely separate and unrelated process to any Adobe CF servers you may be using.

I would remove the proxy settings. I don’t know what you added, but I’m guess they were wrong. Did you ask your network administrator if a proxy was actually necessary to access the internet?