在AWS EC2上找不到HTTP请求的jetty 404页面

时间:2016-07-08 18:44:02

标签: java maven amazon-web-services amazon-ec2 jetty

我有一个用Jetty编写的java Web应用程序。我在AWS EC2服务器上托管应用程序,侦听0.0.0.0:3000上的HTTP请求。

当我ssh到AWS EC2服务器并发出HTTP请求时, 例如curl" http://localhost:3000/users/get",我收到了以下错误

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 </title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
Problem accessing /users/get. Reason:
<pre> Not Found</pre>

<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

我认为该请求被码头拒绝了...... 但是当我在Mac上部署应用程序并在我的Mac上发出相同的请求时。它起作用了......

我是否必须对AWS EC2服务器进行任何其他配置更改?

谢谢。

这是我的安全组: 类型协议端口范围源 HTTP TCP 80 0.0.0.0/0 所有TCP TCP 0 - 65535 0.0.0.0/0

实例不在私有子网中..

这是我跑完后的输出

sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-65000


    Starting Nmap 6.40 ( http://nmap.org ) at 2016-07-08 21:16 UTC
NSE: Loaded 110 scripts for scanning.
NSE: Script Pre-scanning.
Initiating SYN Stealth Scan at 21:16
Scanning localhost (127.0.0.1) [65000 ports]
Discovered open port 80/tcp on 127.0.0.1
Discovered open port 25/tcp on 127.0.0.1
Discovered open port 111/tcp on 127.0.0.1
Discovered open port 8080/tcp on 127.0.0.1
Discovered open port 22/tcp on 127.0.0.1
Discovered open port 38940/tcp on 127.0.0.1
Discovered open port 5006/tcp on 127.0.0.1
Completed SYN Stealth Scan at 21:16, 0.44s elapsed (65000 total ports)
Initiating Service scan at 21:16
Scanning 7 services on localhost (127.0.0.1)
Completed Service scan at 21:16, 6.08s elapsed (7 services on 1 host)
Initiating OS detection (try #1) against localhost (127.0.0.1)
Retrying OS detection (try #2) against localhost (127.0.0.1)
Retrying OS detection (try #3) against localhost (127.0.0.1)
Retrying OS detection (try #4) against localhost (127.0.0.1)
Retrying OS detection (try #5) against localhost (127.0.0.1)
NSE: Script scanning 127.0.0.1.
Initiating NSE at 21:16
Completed NSE at 21:16, 5.04s elapsed
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000025s latency).
Not shown: 64993 closed ports
PORT      STATE SERVICE VERSION
22/tcp    open  ssh     OpenSSH 6.6.1 (protocol 2.0)
| ssh-hostkey: 2048 4f:a3:44:91:06:8d:a3:25:03:d7:8f:37:8f:de:f0:2d (RSA)
|_256 d7:5f:46:f1:67:25:ee:9e:fa:d7:7a:dd:60:b7:e2:0b (ECDSA)
25/tcp    open  smtp    Sendmail 8.14.4/8.14.4
| smtp-commands: ip-172-31-34-184.us-west-2.compute.internal Hello localhost [127.0.0.1], pleased to meet you, ENHANCEDSTATUSCODES, PIPELINING, 8BITMIME, SIZE, DSN, ETRN, DELIVERBY, HELP,
|_ 2.0.0 This is sendmail 2.0.0 Topics: 2.0.0 HELO EHLO MAIL RCPT DATA 2.0.0 RSET NOOP QUIT HELP VRFY 2.0.0 EXPN VERB ETRN DSN AUTH 2.0.0 STARTTLS 2.0.0 For more info use "HELP <topic>". 2.0.0 To report bugs in the implementation see 2.0.0 http://www.sendmail.org/email-addresses.html 2.0.0 For local information send email to Postmaster at your site. 2.0.0 End of HELP info
80/tcp    open  http    Apache httpd 2.4.18 ((Amazon) PHP/5.6.22)
|_http-favicon: Unknown favicon MD5: CF2445DCB53A031C02F9B57E2199BC03
|_http-generator: Drupal 7 (http://drupal.org)
|_http-methods: No Allow or Public header in OPTIONS response (status code 200)
| http-robots.txt: 36 disallowed entries (15 shown)
| /includes/ /misc/ /modules/ /profiles/ /scripts/
| /themes/ /CHANGELOG.txt /cron.php /INSTALL.mysql.txt
| /INSTALL.pgsql.txt /INSTALL.sqlite.txt /install.php /INSTALL.txt
|_/LICENSE.txt /MAINTAINERS.txt
|_http-title: Welcome to ec2-52-10-97-122.us-west-2.compute.amazonaws.com | ...
111/tcp   open  rpcbind 2-4 (RPC #100000)
| rpcinfo:
|   program version   port/proto  service
|   100000  2,3,4        111/tcp  rpcbind
|   100000  2,3,4        111/udp  rpcbind
|   100024  1          38940/tcp  status
|_  100024  1          43083/udp  status
5006/tcp  open  jdwp    Java Debug Wire Protocol (Reference Implementation) version 1.8 1.8.0_60
8080/tcp  open  http    Jetty 9.2.3.v20140905
|_http-methods: No Allow or Public header in OPTIONS response (status code 404)
|_http-title: Error 404
38940/tcp open  status  1 (RPC #100024)
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=6.40%E=4%D=7/8%OT=22%CT=1%CU=33690%PV=N%DS=0%DC=L%G=Y%TM=5780183E
OS:%P=x86_64-redhat-linux-gnu)SEQ(SP=102%GCD=1%ISR=10E%TI=Z%CI=I%II=I%TS=8)
OS:OPS(O1=MFFD7ST11NW7%O2=MFFD7ST11NW7%O3=MFFD7NNT11NW7%O4=MFFD7ST11NW7%O5=
OS:MFFD7ST11NW7%O6=MFFD7ST11)WIN(W1=AAAA%W2=AAAA%W3=AAAA%W4=AAAA%W5=AAAA%W6
OS:=AAAA)ECN(R=Y%DF=Y%T=FF%W=AAAA%O=MFFD7NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=FF%S=
OS:O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=FF%W=0%S=A%A=Z%F=R%O=%RD
OS:=0%Q=)T5(R=Y%DF=Y%T=FF%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=FF%W=0
OS:%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=FF%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1
OS:(R=Y%DF=N%T=FF%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI
OS:=N%T=FF%CD=S)

Uptime guess: 0.108 days (since Fri Jul  8 18:40:45 2016)
Network Distance: 0 hops
TCP Sequence Prediction: Difficulty=258 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: Host: ip-172-31-34-184.us-west-2.compute.internal; OS: Unix

NSE: Script Post-scanning.
Initiating NSE at 21:16
Completed NSE at 21:16, 0.00s elapsed
Read data files from: /usr/bin/../share/nmap
OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 23.46 seconds
           Raw packets sent: 65110 (2.869MB) | Rcvd: 130217 (5.475MB)

0 个答案:

没有答案