Coder Social home page Coder Social logo

Comments (9)

pplulee avatar pplulee commented on September 28, 2024

只需要部署一个后端(appleauto),如果要做集群,要部署的是selenium而不是appleauto。backend listen ip要填的是0.0.0.0。
提示页面加载失败表示selenium正常,是服务器IP黑了。
WebDriver调用失败就是字面意思,自行检查设置

from appleid_auto.

vonaxs avatar vonaxs commented on September 28, 2024

我现在删除了其他的后端,我的前端安装在服务器A
后端安装在服务器B,按照一键脚本安装的后端:
bash <(curl -Ls https://raw.githubusercontent.com/pplulee/appleid_auto/backend/backend/install_unblocker.sh)
后端如果按照以下2个方法配置,提示接口异常:


ENABLE_API = true
LISTEN_IP = 127.0.0.1
LISTEN_PORT = 3939
API_URL = http://127.0.0.1:3939

ENABLE_API = true
LISTEN_IP = 0.0.0.0
LISTEN_PORT = 3939
API_URL = http://0.0.0.0:3939


后端如果按照以下方法配置,提示正常:


[BACKEND]
ENABLE_API = true
LISTEN_IP = 123.456.789.012
LISTEN_PORT = 3939
API_URL = http://123.456.789.012:3939/


但是前端网站提示:Webdriver调用失败
之前在前后端安装在一个服务器的时候就正常


2023-10-27 14:15:41 [INFO] Press CTRL+C to quit
2023-10-27 14:15:41 [INFO] 从云端获取到10个任务
2023-10-27 14:15:42 [INFO] 部署容器1成功
2023-10-27 14:15:43 [INFO] 部署容器2成功
2023-10-27 14:15:43 [INFO] 部署容器3成功
2023-10-27 14:15:44 [INFO] 部署容器4成功
2023-10-27 14:15:44 [INFO] 部署容器5成功
2023-10-27 14:15:45 [INFO] 部署容器6成功
2023-10-27 14:15:46 [INFO] 部署容器7成功
2023-10-27 14:15:46 [INFO] 部署容器8成功
2023-10-27 14:15:47 [INFO] 部署容器9成功
2023-10-27 14:15:48 [INFO] 部署容器10成功
2023-10-27 14:15:48 [INFO] 同步完成
2023-10-27 14:15:48 [INFO] 同步间隔为15分钟
2023-10-27 14:15:48 [INFO] 启用自动更新

from appleid_auto.

pplulee avatar pplulee commented on September 28, 2024

LISTEN_IP = 0.0.0.0
API_URL = http://后端机器IP:3939

请自行检查WebDriverURL是否正确,WebDriverURL为你安装WebDriver机器的IP:4444,注意放行防火墙

from appleid_auto.

vonaxs avatar vonaxs commented on September 28, 2024

我用宝塔在服务器B上面也安装前端,正常了
然后再卸载服务器B宝塔上面的那些软件PHP,mysql....,并绑定服务器A上面的前端,依然正常。

我感觉不是防火墙的问题,因为之前我在服务器B也安装了宝塔,只是没有安装前端以及软件PHP,mysql..等软件
防火墙,3939 4444端口都是开放的

是因为安装前端的某个步骤影响了WebDriver?

from appleid_auto.

pplulee avatar pplulee commented on September 28, 2024

你填的WebDriverURL能在浏览器访问到吗?

from appleid_auto.

vonaxs avatar vonaxs commented on September 28, 2024

解决了。

之前只会使用这个命令:docker logs appleauto

后来用你教我的:
先docker ps获取容器名字
然后docker logs apple-auto_1

就会出现日志:
2023-10-28 09:30:13 [WARNING] Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fefb00d2da0>: Failed to establish a new connection: [Errno 111] Connection refused')': /session
2023-10-28 09:30:13 [ERROR] Webdriver调用失败

发现好像连接到公网域名有点问题。

最开始我使用的是公网的域名,后来我看到.env的一句注释:
Webdriver地址,末尾不要加斜杠,若公网IP无法使用,请使用docker内网IP

于是我改成这样:
WEBDRIVER = http://172.17.0.6:4444

就解决了!谢谢!

from appleid_auto.

pplulee avatar pplulee commented on September 28, 2024

可能是端口没放行,如果用centos7的话

from appleid_auto.

vonaxs avatar vonaxs commented on September 28, 2024

可能是端口没放行,如果用centos7的话

不是centos7,是ubuntu/debian
我使用了好几台机器测试都不行,而且有的机器我安装了宝塔,放行了3939/4444端口

from appleid_auto.

vonaxs avatar vonaxs commented on September 28, 2024

我傻了。
原来Webdriver地址应该填后端的地址,我一直以为填写前端地址。
Webdriver地址,末尾不要加斜杠,若公网IP无法使用,请使用docker内网IP
WEBDRIVER = http://后端地址:4444

from appleid_auto.

Related Issues (16)

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.