GCE:无法ping自己的外部IP地址

时间:2016-08-11 09:50:51

标签: google-compute-engine google-cloud-platform

我无法在GCE计算机内ping我的Google-Compute-Engines的外部ips。 但是当从外部网络(从我的笔记本电脑)尝试时,它能够ping。

从GCE内部vm:

class Product < ActiveRecord::Base
  has_many :special_prices, dependent: :destroy
  has_many :single_orders
  has_many :package_orders_products

  before_save   :upcase_stock_code

  validates :name,        presence: true, length: { maximum: 50 }
  validates :stock_code,  presence: true, length: { maximum: 20 }
  validates :status,      presence: true, length: { maximum: 10 }
  validates :price,       presence: true

  private
    def select_product
      "#{name} - #{price}"
    end

    # Converts stock_code to all upper-case.
    def upcase_stock_code
      self.stock_code = stock_code.upcase
    end
end

来自本地系统(笔记本电脑):

class SingleOrder < ActiveRecord::Base
  belongs_to :order
  belongs_to :product

  validates :order,       presence: true
  validates :product_id,  presence: true
  validates :qty,         presence: true
  validates :price,       presence: true
  validates :ctn_price,   presence: true
end

1 个答案:

答案 0 :(得分:1)

可能是因为防火墙设置。您可能需要添加防火墙规则。我发现了类似的问题:https://stackoverflow.com/a/17904142/4743540