Monday Mar 25, 2013

Troubleshooting GlassFish Update Center

After installing GlassFish and running either the bin/pkg or bin/updatetool commands for the first time you may see a message like this:

 The software needed for this command (updatetool) is not installed.

and you will be asked if you would like to install the software or not. GlassFish distributions do not always contain the full Update Center Toolkit, instead it is downloaded on demand. If you answer "yes" then the software needed to support the command (pkg or updatetool) will be installed on your system. This is commonly referred to as Update Center bootstrapping.

Sometimes during this bootstrap process you may see a message like:

 Could not download application packages. This could be because:
   - a proxy server is needed to access the internet. Please ensure that
     the system proxy server settings in your Internet Options control panel
     (under Connections:LAN Settings) are correct, or set the HTTP_PROXY
     environment variable to the full URL of the proxy server.
   - the package server or network connection is slow.
     If you are getting time out errors you can try setting the
     PKG_CLIENT_CONNECT_TIMEOUT and PKG_CLIENT_READ_TIMEOUT
     environment variables and try again. For example to increase
     the timeouts to 300 seconds set them to 300
   - the package server is down or otherwise inaccessible or it is
     generating invalid data. Please contact the provider of the package
     server.

This is basically saying that there was a problem communicating with the GlassFish package repositories during the bootstrap process. This could be caused by an HTTP proxy setting issue, or a bandwidth issue (causing timeouts) or there could be a problem with the GlassFish package repositories themselves (usually not the case, but it happens).

If you get this message, here are some things to try:

Do you need to set an HTTP Proxy?

In your company, or home, network, do you need to set an HTTP proxy? Depending on the OS platform the Update Center Toolkit will try to automatically pick up your HTTP proxy settings. But sometimes this does not work. If you require an HTTP proxy in your network environment then try setting the HTTP_PROXY environment variable explicitly, and then re-run the command (pkg or updatetool). For example:

Unix (bash):

export http_proxy=http://www-myproxy.com:80

Windows:

set HTTP_PROXY=http://www-myproxy.com:80

Is your network connection to the US slow?

The GlassFish package repositories are currently hosted in the US and not mirrored. If your bandwidth is low, or latency is slow to the US, then the bootstrap process can timeout. To work-around this try setting the following timeouts:

Unix (bash):

export PKG_CLIENT_CONNECT_TIMEOUT=300

export PKG_CLIENT_READ_TIMEOUT=300

Windows:

set PKG_CLIENT_CONNECT_TIMEOUT=300

set PKG_CLIENT_READ_TIMEOUT=300 

Try pkg first, then pkg install updatetool.

Another option is to bootstrap the (smaller) 'pkg' command first, and then use the pkg command to install updatetool (instead of bootstrapping updatetool). For example:

pkg list

Answer 'y' to bootstrap the pkg command. Then:

pkg install updatetool

to install updatetool using the pkg command.



About

jdipol

Search

Archives
« March 2013
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
26
27
28
29
30
31
      
Today