GUI

2016-04-05 31 views
-1

kullanarak Vagrant kutusundaki Postgres veritabanına erişme PSequel'i yükledim ve PG veritabanımı Rails uygulamasında Vagrant VM'mdeki bir GUI'de görüntülemek için kullanmak istiyorum.GUI

Aşağıdaki resimde olduğu gibi yapılandırdım ancak bağlantı kurmasını sağlayamıyorum. Ben yanlış gidiyorum

OpenSSH_6.9p1, LibreSSL 2.1.8 
debug1: Reading configuration data /Users/neil/.ssh/config 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 21: Applying options for * 
debug1: Connecting to localhost [127.0.0.1] port 22. 
debug1: connect to address 127.0.0.1 port 22: Connection refused 
debug1: Connecting to localhost [::1] port 22. 
debug1: connect to address ::1 port 22: Connection refused 
ssh: connect to host localhost port 22: Connection refused 

bilen var:

enter image description here

hataları PSequel bana edilir veriyor? Benim Vagrantfile

:

VAGRANTFILE_API_VERSION = "2" 

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
    # Every Vagrant virtual environment requires a box to build off of. 
    config.vm.box = "precise64" 

    # Set the hostname to the project here for easy identification 
    config.vm.hostname = "ntsite" 

    # The url from where the 'config.vm.box' box will be fetched if it 
    # doesn't already exist on the user's system. 
    config.vm.box_url = "http://files.vagrantup.com/precise64.box" 

    # Create a forwarded port mapping which allows access to a specific port 
    # within the machine from a port on the host machine. In the example below, 
    # accessing "localhost:8080" will access port 80 on the guest machine. 
    config.vm.network :forwarded_port, guest: 80, host: 8080 

    # Forward rails server port 3000 
    config.vm.network :forwarded_port, guest: 3000, host: 3000 

    # Forward elasticsearch server port 9200 
    config.vm.network :forwarded_port, guest: 9200, host: 9200 

    # If true, then any SSH connections made will enable agent forwarding. 
    config.ssh.forward_agent = true 

    config.ssh.keep_alive = true 

    config.vm.provider :virtualbox do |vb| 
    vb.memory = 512 
    vb.cpus = 1 
    end 

    # config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: ".git/" 

    config.vm.synced_folder "./src", "/vagrant/src", type: "rsync", mount_options: ["dmode=777","fmode=766"], rsync__auto: true, disabled: false 

    # Required for NFS to work, pick any local IP 
    # config.vm.network :private_network, ip: '192.168.50.50' 

    # Use NFS for shared folders for better performance 
    # config.vm.synced_folder "./src", "/vagrant/src", nfs: true 


    # Enable provisioning with Ansible, specifying the location of the playbook. 
    config.vm.provision "ansible" do |ansible| 
     ansible.playbook = "devbox/vagrant.yml" 
     # ansible.verbose = 'vv' 
    end 
end 

vagrant up çalıştırmanın sonucunda: Harici adreslere dinlemek için PostgreSQL'i anlatmak gerekebilir

Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Clearing any previously set forwarded ports... 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
==> default: Forwarding ports... 
    default: 80 => 8080 (adapter 1) 
    default: 3000 => 3000 (adapter 1) 
    default: 9200 => 9200 (adapter 1) 
    default: 22 => 2222 (adapter 1) 
==> default: Running 'pre-boot' VM customizations... 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2222 
    default: SSH username: vagrant 
    default: SSH auth method: private key 
    default: Warning: Connection timeout. Retrying... 
==> default: Machine booted and ready! 
GuestAdditions 5.0.16 running --- OK. 
==> default: Checking for guest additions in VM... 
==> default: Setting hostname... 
==> default: Rsyncing folder: /Volumes/Storage1/Code/ntsite/src/ => /vagrant/src 
==> default: Mounting shared folders... 
    default: /vagrant => /Volumes/Storage1/Code/ntsite 
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision` 
==> default: flag to force provisioning. Provisioners marked to run always will still run. 
+0

Sizin vagrant kutunuz muhtemelen 'localhost' değil. SSH portu localhost'a iletilirse, kesinlikle farklı portlara yönlendirilir. Vagrant'a nasıl bağlanırsın? – Jakuje

+0

Normalde sadece vagrant dosyanızın bulunduğu dizine gidiyorum ve vagrant takiben vagrant takiben çalışır ve beni günlüğe kaydeder. Daha sonra tarayıcımda 3000: localhost'a giderek raylar uygulamasına erişirim? – rctneil

+0

Lütfen "vagrant up" komutunun çıktısının yanı sıra, "Vagrantfile" –

cevap

0

(bu here nasıl yapılacağına ilişkin bağlantı).