1

I have been using salt for a while, and I've recently had a problem setting up oracle-java8-installer in one of my files.

Here is my init.sls file.

oracle-java8-installer:
  pkgrepo.managed:
    - ppa: webupd8team/java
  pkg.installed:
    - require:
    - pkgrepo: oracle-java8-installer
  debconf.set:
    - data:
        'shared/accepted-oracle-license-v1-1': {'type': 'boolean', 'value': True}
    - require_in:
    - pkg: oracle-java8-installer

Here is the output of the fail.

----------

      ID: oracle-java8-installer
Function: pkgrepo.managed
  Result: False
 Comment: Failed to configure repo 'oracle-java8-installer': Error: key retrieval failed: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.iWTPBbRLgo --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --logger-fd 1 --recv-keys 7B2C3B0889BF5709A105D03AC2518248EEA14886
          ?: [fd 4]: read error: Connection reset by peer
          gpgkeys: HTTP fetch error 7: couldn't connect: eof
          gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
          gpg: no valid OpenPGP data found.
          gpg: Total number processed: 0
 Started: 
Duration: 
 Changes:   
----------
      ID: oracle-java8-installer
Function: debconf.set
  Result: True
 Comment: All specified answers are already set
 Started: 
Duration: 
 Changes:   
----------
      ID: oracle-java8-installer
Function: pkg.installed
  Result: False
 Comment: One or more requisite failed
 Started: 
Duration: 
 Changes:   
----------

I'm not sure why it is failing. Java 7 does exist on this system, and I understand that they recommend that it be uninstalled, but that shouldn't be causing the problem.

Any help is appreciated.

trueCamelType
  • 497
  • 1
  • 8
  • 20
  • There's a syntax error in your YAML file; You must indent your `require_in:` items. – Ztyx Sep 08 '15 at 07:00

2 Answers2

1

I don't understand all of what happens in the background, but I will try to explain what is happening.

When you are trying to add the ppa using salt, it tries to access keyserver.ubuntu.com via port 11371. Most corporate firewalls will block strange ports like that. If you are in a corporate network, that is probably the problem.

The way to get around this, is to just use cmd.run 'sudo add-apt-repository ppa:webupd8team/java'

When you use this, it uses the default port 80 that the most common distro's of Linux use.

Most of this information came from here

Slimmons
  • 26
  • 2
0

Sorry this is a bit late but I found this gist to work with Ubuntu 14.04: https://gist.github.com/renoirb/6722890

wrdeman
  • 101