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.

    - ppa: webupd8team/java
    - require:
    - pkgrepo: oracle-java8-installer
    - 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
      ID: oracle-java8-installer
Function: debconf.set
  Result: True
 Comment: All specified answers are already set
      ID: oracle-java8-installer
Function: pkg.installed
  Result: False
 Comment: One or more requisite failed

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.

  • There's a syntax error in your YAML file; You must indent your require_in: items.
    – Ztyx
    Sep 8, 2015 at 7:00

2 Answers 2


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


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

  • Could you please explain how this answers the question?
    – suspectus
    Apr 18, 2015 at 19:24
  • Apologies for the brevity, the gist is a salt state that sets up java-8. It sorts out all the oracle package repo.
    – wrdeman
    Apr 18, 2015 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.