AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-525658

Kid_Learning_C's questions

Martin Hope
Kid_Learning_C
Asked: 2021-12-17 06:30:57 +0800 CST

dig +trace:我的域无法访问任何服务器?

  • 0

我正在 AWS 中构建我的应用程序。

我已经在 EC2 实例中部署了我的 Reactjs 前端项目。我不想让外部互联网世界的用户直接访问我的 EC2 实例,而是将它放在 AWS API 网关后面。因此,AWS API Gateway 将成为我的应用程序前端和后端服务的单一入口点。这是计划:

外部世界 ---> AWS API Gateway ---> 网络负载均衡器 ---> 我的 VPC 目标组/EC2 实例

这是我所做的:

  1. Reactjs Frontend 项目在 EC2 实例中运行良好;我可以使用 EC2 实例的公共 IP 地址访问网页。

  2. 配置良好的目标组和网络负载均衡器。我通过在浏览器中输入 NLB 的 DNS 名称来确认,即http://myapp-frontend-NLB-c11112esd43524rw.elb.ap-northeast-1.amazonaws.com,它成功加载/打开了我的应用程序的前端网页。

  3. 我创建了新的 AWS API Gateway (REST API) 并为其配置了自定义域名。(在 AWS Certificate Manager 中处理了 https 证书)。

    即自定义域是frontend.myapp.com;API网关域名是d-123sdf1234asd.execute-api.ap-northeast-1.amazonaws.com

    我已经NS在我的 DNS 提供商中为他们创建了新记录,因此frontend.myapp.com指向d-123sdf1234asd.execute-api.ap-northeast-1.amazonaws.com

  4. 我已经按照这个aws文档:https ://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html一步一步配置了VPC链接、API资源、集成类型, ETC。

部署创建的 API 后,当我点击打开 Invoke URL 时,(以 的形式https://123qwe123qe.execute-api.ap-northeast-1.amazonaws.com/[stage]),我可以看到返回的 HTML 代码。


我预计当我frontend.myapp.com在浏览器中访问时,DNS 最终会将流量引导到 API Gateway 的域名d-123sdf1234asd.execute-api.ap-northeast-1.amazonaws.com,然后 API Gateway 会将请求传递给 NLB 等,最终加载网页 / 或返回相同的 HTML 代码。

但是,当我frontend.myapp.com在浏览器中访问时,没有任何响应。我认为 DNS 记录不起作用。dig +trace docloud.iwg-inc.co.jp.给出以下结果:


; <<>> DiG 9.10.6 <<>> +trace frontend.myapp.com.
;; global options: +cmd
.     3240  IN  NS  i.root-servers.net.
.     3240  IN  NS  d.root-servers.net.
.     3240  IN  NS  b.root-servers.net.
.     3240  IN  NS  m.root-servers.net.
.     3240  IN  NS  j.root-servers.net.
.     3240  IN  NS  h.root-servers.net.
.     3240  IN  NS  f.root-servers.net.
.     3240  IN  NS  g.root-servers.net.
.     3240  IN  NS  k.root-servers.net.
.     3240  IN  NS  c.root-servers.net.
.     3240  IN  NS  a.root-servers.net.
.     3240  IN  NS  l.root-servers.net.
.     3240  IN  NS  e.root-servers.net.
;; Received 811 bytes from 240d:1a:6a5:c900:e67e:66ff:fe1f:bf4c#53(240d:1a:6a5:c900:e67e:66ff:fe1f:bf4c) in 29 ms

 
 ...other results...

frontend.myapp.com.  14400 IN  NS  d-123sdf1234asd.execute-api.ap-northeast-1.amazonaws.com.
;; Received 117 bytes from 54.68.111.244#53(ns4.jp-domains.jp) in 131 ms

;; connection timed out; no servers could be reached

如您所见, frontend.myapp.com.确实指向d-123sdf1234asd.execute-api.ap-northeast-1.amazonaws.com.作为NS记录。

但是,它说connection timed out; no servers could be reached。

d-123sdf1234asd.execute-api.ap-northeast-1.amazonaws.com.是我的 API Gateway 的自定义域名,我用调用 URL 测试过,它连接到服务。

为什么会这样说no servers could be reached?

这是什么意思?我该如何解决它并完成流程?

domain-name-system dns-hosting amazon-api-gateway
  • 2 个回答
  • 240 Views
Martin Hope
Kid_Learning_C
Asked: 2020-08-13 01:20:10 +0800 CST

从谷歌云中的快照创建虚拟机后,apt-get 被 mysql 卡住了

  • 0

我正在使用谷歌云,我有一个运行良好的虚拟机(Ubuntu 18.04)。apt-get 命令运行良好,mysql 服务运行良好。我们称它为 vm-1

我需要创建另一个重复的 vm,所以我首先制作了 vm-1 的快照,并使用此快照创建了一个新的 vm,称为 vm-2。

当我在 vm-2 上工作时,我发现简单的命令sudo apt-get install ***会失败并卡在与 mysql-server 相关的步骤中。下面是一个例子:

John@vm-2:~$ sudo apt-get install tree
Reading package lists... Done
Building dependency tree
Reading state information... Done
tree is already the newest version (1.7.0-5).
The following packages were automatically installed and are no longer required:
  libnvidia-common-390 linux-gcp-headers-5.0.0-1033
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 170 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.7 (5.7.30-0ubuntu0.18.04.1) ...
/var/lib/mysql/ibdata1: 14143
ERROR: Database files are locked. Daemon already running?
Warning: Unable to start the server. Please restart MySQL and run mysql_upgrade to ensure the database is ready for use.
/var/lib/mysql/ibdata1: 14143
ERROR: Database files are locked. Daemon already running?
Warning: Unable to start the server.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-08-12 18:11:39 JST; 7ms ago
  Process: 24068 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)
  Process: 24046 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 1711 (code=exited, status=0/SUCCESS)
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
John@vm-2:~$

它一直在说

ERROR: Database files are locked. Daemon already running?
Warning: Unable to start the server. Please restart MySQL and run mysql_upgrade to ensure the database is ready for use.
/var/lib/mysql/ibdata1: 14143
ERROR: Database files are locked. Daemon already running?
Warning: Unable to start the server.

首先 apt-get 与 mysql-server 有什么关系?我一直认为它们是两个独立的软件。

我该如何解决这个问题?除了恢复在原始虚拟机中完全正常工作的快照之外,我什么也没做。一切都一样,怎么apt-get会失败?

mysql virtual-machines apt snapshot gcloud
  • 1 个回答
  • 1049 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve