LINUX.ORG.RU

Браузер не видит localhost из vue ui

 , ,


0

1
sudo vue ui
🚀  Starting GUI...
🌠  Ready on http://localhost:8000

не видит в браузере такой адрес Интересно что

 sudo npm run serve

> first@0.1.0 serve /home/anton/first
> vue-cli-service serve

 INFO  Starting development server...
 21% building 92/102 modules 10 active ...ton/first/src/components/HelloWorld.vu 22% building 100/102 modules 2 active ...                                   

 DONE  Compiled successfully in 2657ms                                  12:13:46

 
  App running at:
  - Local:   http://localhost:8080/ 
  - Network: http://10.128.4.91:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

Открывается только как из сети, а как на локалхосте не открывается. при том что правил /etc/hosts
127.0.0.1	localhost
10.128.4.91	localhost
127.0.1.1	anton-VirtualBox

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Ответ на: комментарий от SunDoc
sudo netstat -lnpt
[sudo] пароль для anton: 
Активные соединения с интернетом (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State       PID/Program name    
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      421/systemd-resolve 
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      482/cupsd           
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      2047/node           
tcp6       0      0 ::1:631                 :::*                    LISTEN      482/cupsd  

/etc/default/ufw :

# /etc/default/ufw

#

# Set to yes to apply rules to support IPv6 (no means only IPv6 on loopback

# accepted). You will need to 'disable' and then 'enable' the firewall for

# the changes to take affect.

IPV6=yes

# Set the default input policy to ACCEPT, DROP, or REJECT. Please note that if

# you change this you will most likely want to adjust your rules.

DEFAULT_INPUT_POLICY=«DROP»

# Set the default output policy to ACCEPT, DROP, or REJECT. Please note that if

# you change this you will most likely want to adjust your rules.

DEFAULT_OUTPUT_POLICY=«ACCEPT»

# Set the default forward policy to ACCEPT, DROP or REJECT. Please note that

# if you change this you will most likely want to adjust your rules

DEFAULT_FORWARD_POLICY=«DROP»

# Set the default application policy to ACCEPT, DROP, REJECT or SKIP. Please

# note that setting this to ACCEPT may be a security risk. See 'man ufw' for

# details

DEFAULT_APPLICATION_POLICY=«SKIP»

# By default, ufw only touches its own chains. Set this to 'yes' to have ufw

# manage the built-in chains too. Warning: setting this to 'yes' will break

# non-ufw managed firewall rules

MANAGE_BUILTINS=no

#

# IPT backend

#

# only enable if using iptables backend

IPT_SYSCTL=/etc/ufw/sysctl.conf

# Extra connection tracking modules to load. Complete list can be found in

# net/netfilter/Kconfig of your kernel source. Some common modules:

# nf_conntrack_irc, nf_nat_irc: DCC (Direct Client to Client) support

# nf_conntrack_netbios_ns: NetBIOS (samba) client support

# nf_conntrack_pptp, nf_nat_pptp: PPTP over stateful firewall/NAT

# nf_conntrack_ftp, nf_nat_ftp: active FTP support

# nf_conntrack_tftp, nf_nat_tftp: TFTP support (server side)

IPT_MODULES=«nf_conntrack_ftp nf_nat_ftp nf_conntrack_netbios_ns»

То есть вроде ничего интересного

dwarfadelic
() автор топика
Ответ на: комментарий от SunDoc
anton@anton-VirtualBox:~$ sudo iptables -nvL
Chain INPUT (policy ACCEPT 359 packets, 44894 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 3 packets, 1963 bytes)
 pkts bytes target     prot opt in     out     source               destination 
dwarfadelic
() автор топика
Ответ на: комментарий от SunDoc
$ sudo telnet -d localhost 8000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /
 
HTTP/1.1 200 OK
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Sat, 26 Oct 1985 08:15:00 GMT
ETag: W/"34e-7438674ba0"
Content-Type: text/html; charset=UTF-8
Content-Length: 846
Date: Tue, 12 Feb 2019 06:07:29 GMT
Connection: close

<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" href=/favicon.ico><title>Vue CLI</title><link href=/css/app.c805cf3f.css rel=preload as=style><link href=/css/chunk-vendors.46434be6.css rel=preload as=style><link href=/js/app.43a394f7.js rel=preload as=script><link href=/js/chunk-vendors.12913a25.js rel=preload as=script><link href=/css/chunk-vendors.46434be6.css rel=stylesheet><link href=/css/app.c805cf3f.css rel=stylesheet></head><body><noscript><strong>We're sorry but cli-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.12913a25.js></script><script src=/js/app.43a394f7.js></script></body></html>Connection closed by foreign host.
dwarfadelic
() автор топика

А браузер тоже в виртуалке? Иначе он на localhost:8000 ничего видеть не должен, там и нет ничего.

anonymous
()
Ответ на: комментарий от dwarfadelic

Если у тебя это запускается в виртуалке на localhost, а ты смотришь снаружи - что ты ожидаешь от localhost ? смотреть localhost надо тоже в виртуалке.

SunDoc
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.