Skip to main content

Couldn't resolve host 'pkg.oracle.com' Solaris 11

If you met the same problem when you try to get responce from pkg install on Solaris 11 and getting error

Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
Framework error: code: 6 reason: Couldn't resolve host 'pkg.oracle.com'
URL: 'https://pkg.oracle.com/solaris/support' (happened 4 times)

Here is a procedure that helped me 

1 Checking DNS 

root# svcs |grep dns
online         Apr_06   svc:/network/dns/client:default

root# svccfg -s network/dns/client

svc:/network/dns/client> setprop config/search = astring: ("test.com" "service.test.com")
svc:/network/dns/client> setprop config/nameserver = net_address: (8.8.8.8 8.8.4.4)
svc:/network/dns/client> exit

root# svcadm refresh dns/client
root# svcadm restart dns/client

looking for result

root# more /etc/resolv.conf 

#
# _AUTOGENERATED_FROM_SMF_V1_
#
# WARNING: THIS FILE GENERATED FROM SMF DATA.
#   DO NOT EDIT THIS FILE.  EDITS WILL BE LOST.
# See resolv.conf(4) for details.

domain  solaris.local
search  test.com service.test.com
nameserver      8.8.8.8
nameserver      8.8.8.8

2 TRYING ANOTHER TIME


root# pkg set-publisher -k /var/pkg/ssl/pkg.oracle.com.key.pem -c /var/pkg/ssl/pkg.oracle.com.certificate.pem -g https://pkg.oracle.com/solaris/support/ -G http://pkg.oracle.com/solaris/release/ solaris

pkg set-publisher: The origin URIs for 'solaris' do not appear to point to a valid pkg repository.
Please verify the repository's location and the client's network configuration.
Additional details:

Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
Framework error: code: 6 reason: Couldn't resolve host 'pkg.oracle.com'
URL: 'https://pkg.oracle.com/solaris/support' (happened 4 times)

3 LOOKING FOR CONNECTION


root# host pkg.oracle.com
pkg.oracle.com is an alias for pkg.oraclegha.com.
pkg.oraclegha.com has address 137.254.56.21



root# nslookup pkg.oracle.com
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
pkg.oracle.com  canonical name = pkg.oraclegha.com.
Name:   pkg.oraclegha.com
Address: 137.254.56.21

4 FIXING NSSWITCH


root# svccfg -s system/name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: "files dns"
svc:/system/name-service/switch> exit
root# svcadm refresh name-service/switch
root# svcadm restart name-service/switch

looking for result

root# cat /etc/nsswitch.conf 

#
# _AUTOGENERATED_FROM_SMF_V1_
#
# WARNING: THIS FILE GENERATED FROM SMF DATA.
#   DO NOT EDIT THIS FILE.  EDITS WILL BE LOST.
# See nsswitch.conf(4) for details.

passwd: files
group:  files
hosts:  files dns
ipnodes:        files dns
networks:       files
protocols:      files
rpc:    files
ethers: files
netmasks:       files
bootparams:     files
publickey:      files
netgroup:       files
automount:      files
aliases:        files
services:       files
printers:       user files
project:        files
auth_attr:      files
prof_attr:      files
tnrhtp: files
tnrhdb: files
sudoers:        files


PROFIT


root# pkg set-publisher -k /var/pkg/ssl/pkg.oracle.com.key.pem -c /var/pkg/ssl/pkg.oracle.com.certificate.pem -g https://pkg.oracle.com/solaris/support/ -G http://pkg.oracle.com/solaris/release/ solaris

root# pkg install solaris-desktop
           Packages to install: 367
            Services to change:  13
       Create boot environment:  No
Create backup boot environment: Yes

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
mail/thunderbird                     219/367   40824/48040  423.8/624.7  248k/s

Comments

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle Solaris, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Oracle Solaris. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete
  2. i tried but not working still and i follow all instruction mentioned

    ReplyDelete
    Replies
    1. can you give results of cat /etc/resolv.conf ? This ip's was mine dns servers 172.27.129.4 and 129.5 so you need setprop config/nameserver = net_address: (8.8.8.8 8.8.4.4)

      Delete
  3. I't solved my problems. Thanks!

    ReplyDelete
  4. Worked like a charm. with Solaris 11.4 on VMware. Really helpful.

    ReplyDelete
  5. you can change the nameserver ip. Most likely you should put your gateway IP or host node gateway IP. for me I have given 192.168.1.1 and it worked.Also add domain in the configuration.

    #svccfg -s network/dns/client
    svc:/network/dns/client> setprop config/search = astring: ("test.com" "service.test.com")
    svc:/network/dns/client> setprop config/nameserver = net_address: (192.168.1.1)
    svc:/network/dns/client> setprop config/domain = astring: ("solaris.local")

    And restart the services
    svc:/network/dns/client> exit

    root# svcadm refresh dns/client
    root# svcadm restart dns/client


    ReplyDelete
  6. Thank You and that i have a nifty give: How To Budget House Renovation whole house remodel

    ReplyDelete

Post a Comment

Popular posts from this blog

Solaris. remove unusable scsi lun

Solaris remove unusable or failing scsi lun 1. The removed devices show up as drive not available in the output of the format command: # format Searching for disks...done ................      255. c1t50000974082CCD5Cd249 <drive not available>           /pci@3,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd5c,f9 ................      529. c3t50000974082CCD58d249 <drive not available>           /pci@7,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd58,f9 2. After the LUNs are unmapped Solaris displays the devices as either unusable or failing. # cfgadm -al -o show_SCSI_LUN | grep -i unusable # # cfgadm -al -o show_SCSI_LUN | grep -i failing c1::50000974082ccd5c,249       disk         connected    configured   failing c3::50000974082ccd58,249 ...

memory error detect XSCF uboot

If you see something like this when you poweron you server: memory error detect 80000008, address 000002d0 data 55555555 -> fbefaaaa capture_data hi fbefaaaa lo deadbeef ecc 1b1b capture_attributes 01113001 address 000002d0 memory error detect 80000008, address 000002d4 data aaaaaaaa -> deadbeef capture_data hi fbefaaaa lo deadbeef ecc 1b1b capture_attributes 01113001 address 000002d4 memXSCF uboot  01070000  (Feb  8 2008 - 11:12:19) XSCF uboot  01070000  (Feb  8 2008 - 11:12:19) SCF board boot factor = 7180     DDR Real size: 256 MB     DDR: 224 MB Than your XSCF card is broked. Replace it with new one. After that it will ask you for enter chassis number - located at front of the server XSCF promt to enter your chasses number ( is a S/N of your server ): Please input the chassis serial number : XXXXXXX 1:PANEL Please select the number : 1 Restoring data from PANEL to XSCF#0. Please wait for se...

SPARC OBP cheatsheet

Boot PROM Basics Boot PROM(programmable read only memory): It is a firmware (also known as the monitor program) provides: 1. basic hardware testing & initialization before booting. 2. contains a user interface that provide access to many important functions. 3. enables the system to boot from wide range of devices. It controls the system operation before the kernel becomes available. It provides a user interface and firmware utility commands known as FORTH command set. These commands include the boot commands, the diagnostic commands & the commands for modifying the default configuration. Command to determine the version of the Open Boot PROM on the system: # /usr/platform/'uname -m'/sbin/prtdiag -v (output omitted) System PROM revisions: ---------------------- OBP 4.16.4 2004/12/18 05:21 Sun Blade 1500 (Silver) OBDIAG 4.16.4.2004/12/18 05:21 # prtconf -v OBP 4.16.4 2004/12/18 05:21 Open Boot Architectures Standards: It is based on IEEE standard #1275, accord...