Giter VIP home page Giter VIP logo

Comments (6)

RayShark avatar RayShark commented on September 26, 2024 1

感谢大神的解答,我最后统一使用VS code Remote和Chrome插件运行前后端,这样就解决了无法从另一个ip访问的问题,在调试阶段已经完全够用了~
image

from rasa_ch_faq.

Dustyposa avatar Dustyposa commented on September 26, 2024

排除思路:

  1. 开启 rasa server 以及 rasa action 之后,使用 curl 直接访问 rasa server 看有没有响应。参考命令:
curl -X POST  \
  'http://localhost:5005/webhooks/rest/webhook' \
 \
  -d '{
    "sender": "xxxxx",
    "message": "你好"
}'

rasa 本身工作 ok
2. 在浏览器打开 F12 查看网络请求是否正常(是否和 curl 一致)

from rasa_ch_faq.

RayShark avatar RayShark commented on September 26, 2024

排除思路:

  1. 开启 rasa server 以及 rasa action 之后,使用 curl 直接访问 rasa server 看有没有响应。参考命令:
curl -X POST  \
  'http://localhost:5005/webhooks/rest/webhook' \
 \
  -d '{
    "sender": "xxxxx",
    "message": "你好"
}'

rasa 本身工作 ok
2. 在浏览器打开 F12 查看网络请求是否正常(是否和 curl 一致)

我测试了一下,rasa server应该是没问题的,curl的结果是有的:
image

然后调试浏览器的时候发现无法获取response,CONNECTION REFUSED,估计是我不是从本机访问导致的。
image

会不会是因为不在本机上访问导致的?
我所有的程序都是部署在服务器上的,前端是用自己的笔记本输入URL打开的,应该是有什么网络配置需要打开(允许外网访问某个端口之类的,或者设置允许的ip,我不太清楚)
我对前端这块实在是不太了解,大神你能说说该怎么解决这个访问限制问题吗。。。
我的服务器系统是Ubuntu 21,内核Linux version 5.11.0-31-generic

from rasa_ch_faq.

Dustyposa avatar Dustyposa commented on September 26, 2024

OK 原因是 ip 不同。 在 这里 更改后端请求地址
前端重新 build 即可

from rasa_ch_faq.

RayShark avatar RayShark commented on September 26, 2024

OK 原因是 ip 不同。 在 这里 更改后端请求地址
前端重新 build 即可

我大概明白了,如果我从自己笔记本的浏览器访问的话,那localhost指向的就是我笔记本的ip,而不是服务器的ip。。。

但是我在后端把ip指定成了服务器的ip之后,console里看ip是对的,可还是无法访问
报错:net::ERR_CONNECTION_TIMED_OUT
image

我所有服务都按顺序重启了好几遍,不知道是啥原因,linux自带的防火墙吗?

from rasa_ch_faq.

Dustyposa avatar Dustyposa commented on September 26, 2024

OK 原因是 ip 不同。 在 这里 更改后端请求地址
前端重新 build 即可

我大概明白了,如果我从自己笔记本的浏览器访问的话,那localhost指向的就是我笔记本的ip,而不是服务器的ip。。。

但是我在后端把ip指定成了服务器的ip之后,console里看ip是对的,可还是无法访问
报错:net::ERR_CONNECTION_TIMED_OUT
image

我所有服务都按顺序重启了好几遍,不知道是啥原因,linux自带的防火墙吗?

这时候你就可以 尝试使用 curl 在前端服务器访问后端服务器进行测试了。 可能是防火墙啥的。

from rasa_ch_faq.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.