users@glassfish.java.net

Re: FW: pkg-toolkit error

From: Romain Grecourt <romain.grecourt_at_oracle.com>
Date: Wed, 10 Jul 2013 17:44:16 +0200

Can you share the content of this file:
glassfish3/.org.opensolaris,pkg/cfg_cache ?

On 7/10/13 4:29 PM, Manuel Castaneda wrote:
> Hi,
>
> The problem is that I cant from the bundle if I run it
> from glassfish3/bin/pkg I get the following:
>
> /opt/glassfish3/bin/pkg
>
> The software needed for this command (pkg) is not installed.
>
> When this tool interacts with package repositories, some system
> information
> such as your system's IP address and operating system type and version
> is sent to the repository server. For more information please see:
>
> http://wikis.oracle.com/display/updatecenter/UsageMetricsUC2
>
> Once installation is complete you may re-run this command.
>
> Would you like to install this software now (y/n): y
>
> Proxy: Using system proxy settings.
> Unrecognized exception: unknown authority: null
> java.lang.IllegalArgumentException: unknown authority: null
> at com.sun.pkg.client.Image.refreshCatalog(Image.java:1642)
> at com.sun.pkg.bootstrap.Bootstrap._main(Bootstrap.java:224)
> at com.sun.pkg.bootstrap.Bootstrap._main(Bootstrap.java:163)
> at com.sun.pkg.bootstrap.Bootstrap.main(Bootstrap.java:113)
>
> AND I am not behind any firewall.
>
> BTW. your solution did not work either, I still get the same errors.
>
> Thanks
>
> > Date: Tue, 9 Jul 2013 19:22:51 +0200
> > From: romain.grecourt_at_oracle.com
> > To: users_at_glassfish.java.net
> > Subject: Re: pkg-toolkit error
> >
> > Hi,
> >
> > Seems like you are trying to use an external pkg-toolkit.
> > Can you first try using the one bundled with GlassFish
> > (glassfish3/bin/pkg) ? (it will bootstrap itself the first time).
> >
> > IIRC, the toolkit embeds its own version of python.
> >
> > You could try the following (assuming bash shell):
> >
> > PYTHON_HOME=$REPO_TOOLKIT/pkg/python2.4-minimal; export PYTHON_HOME
> > LD_LIBRARY_PATH=$PYTHON_HOME/lib
> > PATH=$REPO_TOOLKIT/pkg/bin:$PYTHON_HOME/bin:$PATH
> > export PATH LD_LIBRARY_PATH PYTHON_HOME
> >
> > Thanks,
> > Romain
> >
> > On 7/8/13 6:48 PM, castaneda.m_at_outlook.com wrote:
> > > Hi,
> > >
> > > I am trying to update Glassfish 3.1 to 3.1.2.2 using
> > > "pkg-toolkit-2.3-b56-linux-i386.zip", I am doing these commands:
> > >
> > > unzip pkg-toolkit-2.3-b56-linux-i386.zip
> > > cd pkg-toolkit-linux-i386
> > > bin/pkg -R /path/to/glassfish/ image-update
> > >
> > > but I get this error:
> > > ---------------------------------------
> > > [ec2-user_at_staging2 pkg-toolkit-linux-i386]$ bin/pkg -R
> /opt/glassfish3/
> > > image-up
> > > date
> > > Traceback (most recent call last):
> > > File "/home/ec2-user/pkg-toolkit-linux-i386/pkg/bin/client.py", line
> > > 2621, in
> > > handle_errors
> > > __ret = func(*args, **kwargs)
> > > File "/home/ec2-user/pkg-toolkit-linux-i386/pkg/bin/client.py", line
> > > 2544, in
> > > main_func
> > > img.load_config()
> > > File
> > >
> "/home/ec2-user/pkg-toolkit-linux-i386/pkg/vendor-packages/pkg/client/i
> > > ma
> > > ge.py", line 265, in
> > > load_config
> > > ic.read(self.imgdir)
> > > File
> > >
> "/home/ec2-user/pkg-toolkit-linux-i386/pkg/vendor-packages/pkg/client/i
> > > ma
> > > geconfig.py", line 212,
> > > in read
> > > self.write(path)
> > > File
> > >
> "/home/ec2-user/pkg-toolkit-linux-i386/pkg/vendor-packages/pkg/client/i
> > > ma
> > > geconfig.py", line 236,
> > > in write
> > > props[p].encode("utf-8"))
> > > AttributeError: 'NoneType' object has no attribute 'encode'
> > >
> > >
> > > pkg: This is an internal error. Please let the developers know about
> > > this
> > > problem by filing a bug at http://defect.opensolaris.org and including
> > > the
> > > above traceback and this message. The version of pkg(5) is
> > > '1.122.2-56.2852'.
> > > -------------------------
> > >
> > > Thanks.....
> >