Junos Space Store – HTTP Code : 500, Reason: Internal Server Error, Connection failed/Connection timed out.

When you want to use new feature in Junos Space Network Managment Platform version 18.2R1.4 called Juno Space Store and after attempting installation Service Now or Security Director you got error like below:

“Stage 2. HTTP Code : 500 , Reason: Internal Server Error, Connection failed/Connection timed out.” – stop at the point “Download Application”

You can/must apply workaround to use this feature.

Workaround:

  • Log into Junos Space Network Management Platfporm to physical (eth0) address via SSH.
  • Run below comands – this simple trick add hash (#) on designated place and also add word ‘my’ – perl virable .
cp /var/cache/jboss/jmp/appstore/common/downloadScript.pl /var/cache/jboss/jmp/appstore/common/downloadScript_old.pl
sed -i '257,264{s/^/#/}' /var/cache/jboss/jmp/appstore/common/downloadScript.pl
sed -i '267,267{s/^/my /}' /var/cache/jboss/jmp/appstore/common/downloadScript.pl
  • Run following comands – those commands modify URL and change checksum after that we can download proper version of Junos Securit Director.
cp /var/cache/jboss/jmp/appstore/SD/app.xml /var/cache/jboss/jmp/appstore/SD/app_old.xml
sed -i -e 's/https:\/\/webdownload.juniper.net\/swdl\/dl\/secure\/site\/1\/record\/77516.html/https:\/\/webdownload.juniper.net\/swdl\/dl\/secure\/site\/1\/record\/79722.html/g' /var/cache/jboss/jmp/appstore/SD/app.xml
sed -i -e 's/712b30b0d224ab00e7c317a02d0be563995ef7d868bdc1fdaaa7ddaad4d14c4f/f2500ba66ffe6b62f16b69f52d7d709516e1983615ad23e66b2c628b1f6c1294/g' /var/cache/jboss/jmp/appstore/SD/app.xml
  • You cant now install all Application from Junos Space Store.

 

Diff:

[root@space-000c294d2598 common]# diff downloadScript_old.pl /tmp/downloadScript.pl

257,264c257,264
< my $request = POST( $SAML_CHALLENGE_URL, [ 'SAMLRequest' => $SAMLToken ] );
< $response = $ua->request($request);
< $status_code = $response->code;
< if ( $status_code != 200 ) {
< my $errMsg = errorMsgParser($status_code);
< print "Stage 2. HTTP Code <b>: $status_code </b>, Reason: $errMsg";
< return $status;
< }
---
> # my $request = POST( $SAML_CHALLENGE_URL, [ 'SAMLRequest' => $SAMLToken ] );
> # $response = $ua->request($request);
> # $status_code = $response->code;
> # if ( $status_code != 200 ) {
> # my $errMsg = errorMsgParser($status_code);
> # print "Stage 2. HTTP Code <b>: $status_code </b>, Reason: $errMsg";
> # return $status;
> # }
267c267
< $request = POST($SAML_AUTH_SUBMIT_URL,
---
> my $request = POST($SAML_AUTH_SUBMIT_URL,
[root@space-ba962fb8f806 SD]# diff app.xml app_old.xml
15,16c15,16
< <path>https://webdownload.juniper.net/swdl/dl/secure/site/1/record/79722.html</path>
< <sha-256>f2500ba66ffe6b62f16b69f52d7d709516e1983615ad23e66b2c628b1f6c1294</sha-256>
---
> <path>https://webdownload.juniper.net/swdl/dl/secure/site/1/record/77516.html</path>
> <sha-256>712b30b0d224ab00e7c317a02d0be563995ef7d868bdc1fdaaa7ddaad4d14c4f</sha-256>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.