Connecting weaviate with langflow across docker containers

题意:在Docker容器之间连接Weaviate与Langflow

问题背景:

I am trying to build a local RAG application using Langflow. For my vectore store, I want to use a local Weaviate instance, hosted in a separate docker container on the same network. Building the Weaviate component in Langflow fails, and throws an error:

Error Building ComponentError building Component Weaviate: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /v1/.well-known/openid-configuration (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb2a2db9fa0>: Failed to establish a new connection: [Errno 111] Connection refused'))

My setup: Docker for Desktop v4.31.1 on Windows Compose file:

version: "3.9"
name: proto_ragservices:langflow:image: langflowai/langflow:1.0-alphaports:- "7860:7860"depends_on:- postgresenvironment:- LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow# This variable defines where the logs, file storage, monitor data and secret keys are stored.- LANGFLOW_CONFIG_DIR=app/langflowvolumes:- langflow-data:/app/langflowpostgres:image: postgres:16environment:POSTGRES_USER: langflowPOSTGRES_PASSWORD: langflowPOSTGRES_DB: langflowports:- "5432:5432"volumes:- langflow-postgres:/var/lib/postgresql/dataweaviate:command:- --host- 0.0.0.0- --port- '8080'- --scheme- httpimage: cr.weaviate.io/semitechnologies/weaviate:1.25.4ports:- 8080:8080- 50051:50051volumes:- weaviate_data:/var/lib/weaviaterestart: on-failure:0environment:    AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'DISABLE_TELEMETRY: 'true'PERSISTENCE_DATA_PATH: '/var/lib/weaviate'DEFAULT_VECTORIZER_MODULE: 'text2vec-ollama'ENABLE_MODULES: 'text2vec-ollama'CLUSTER_HOSTNAME: 'node1'  ollama:volumes:- ollama:/root/.ollamaports:- 11434:11434container_name: ollamaimage: ollama/ollamavolumes:langflow-postgres:langflow-data:ollama:weaviate_data:

My weaviate component in Langflow calls http://localhost:8080 and has the variable "index name" set to "vector_store".

Connecting to ollama on localhost works, so it doesn't seem to be a network problem. However since AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED is set true I can't see a reason why weaviate would refuse the connection.

I tried setting up users and API keys in the compose file and using the key in the langflow component, this had no effect.

[...]AUTHENTICATION_APIKEY_ENABLED: 'true'AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'key206339812'AUTHENTICATION_APIKEY_USERS: 'user206339812'
[...]

I also tried raising the Query limit, which also had no effect.

      QUERY_DEFAULTS_LIMIT: 1000

This thread suggests to use the service/container name for reference instead of localhost, this failed aswell.

问题解决:

Indeed, your error message is consistent with that thread's one. Looks like your Langflow is trying to connect to weaviate at http://localhost:8080.

Considering you are using docker, this is not the place where Langflow will find Weaviate, but http://weaviate:8080

I have used your docker-compose, and was able to ingest data using this simple flow in Langflow:

Let me know if this helps.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/48516.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

KAFKA搭建教程

KAFKA搭建教程 期待您的关注 KAFKA学习笔记 帮助更多人 目录 KAFKA搭建教程 1.下载Kafka并解压 2.添加环境变量 3.修改 server.properties 文件 4.将kafka复制到其它节点 5.修改node1、node2节点的broker.id 6.将master的环境变量同步到node1、 node2 7.启动zookeeper…

SQL中的游标是什么?

在 SQL 中&#xff0c;游标&#xff08;Cursor&#xff09;是一种用于遍历结果集的数据库对象。它允许开发者在 SQL 查询的结果集中逐行或逐批处理数据。 具体来说&#xff0c;SQL 中的游标通常用于以下目的&#xff1a; 遍历结果集&#xff1a;当一个 SQL 查询返回多行结果时…

BDD实践指南:Xcode中的行为驱动开发之道

BDD实践指南&#xff1a;Xcode中的行为驱动开发之道 在软件开发领域&#xff0c;行为驱动开发&#xff08;Behavior Driven Development, BDD&#xff09;是一种鼓励协作和需求理解的敏捷开发方法。BDD专注于用户行为和期望结果&#xff0c;通过具体的用例来指导开发过程。Xco…

Python 热门面试题(七)

Python中如何拷贝对象&#xff1f;浅拷贝和深拷贝的区别是什么&#xff1f; 在Python中&#xff0c;拷贝对象是一个常见的需求&#xff0c;尤其是当你需要修改一个对象但又不想影响原始对象时。Python提供了几种拷贝对象的方法&#xff0c;其中最重要的是浅拷贝&#xff08;sh…

昇思25天学习打卡营第21天|RNN实现情感分类

Mindspore框架循环神经网络RNN模型实现情感分类 Mindspore框架循环神经网络RNN模型实现情感分类|&#xff08;一&#xff09;数据集准备 Mindspore框架循环神经网络RNN模型实现情感分类|&#xff08;二&#xff09;RNN模型 Mindspore框架循环神经网络RNN模型实现情感分类|&…

C++ versions less than C++14/11 are not supported.报错

点个关注吧&#xff01; 安装TFHE遇见以下报错 TFHE报错C versions less than C14 are not supported. 1.进入TFHE文件夹 2.找到并进入src文件夹 3.打开CMAKELists.txt 4.在文件中添加以下两条命令 set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON)

PostgreSQL 中如何解决因大量并发删除和插入操作导致的索引抖动?

&#x1f345;关注博主&#x1f397;️ 带你畅游技术世界&#xff0c;不错过每一次成长机会&#xff01;&#x1f4da;领书&#xff1a;PostgreSQL 入门到精通.pdf 文章目录 PostgreSQL 中如何解决因大量并发删除和插入操作导致的索引抖动一、理解索引抖动二、索引抖动的影响三…

js之深入对象和内置构造函数

这里写目录标题 一级目录二级目录三级目录 一、深入对象1.创建对象三种方式2.构造函数3.实例成员4.静态成员 二、内置构造函数1.Object2.Array3.String4.Number 一级目录 二级目录 三级目录 一、深入对象 1.创建对象三种方式 利用对象字面量创建对象 利用new Object创建对…

obj导入u3d

导入OBJ模型到‌Unity步骤 将无人机/船扫描的模型&#xff0c;生成obj格式&#xff1b; 将文件直接拷贝到asset文件夹&#xff0c;为了后期方便管理&#xff0c;最好起个名字 通过模型直接拖拽到场景即可&#xff1b;坐标系可能不一样&#xff0c;需要特殊处理

SpringBoot应用从jar包部署改为war包部署要做哪些修改

吾名爱妃&#xff0c;性好静亦好动。好编程&#xff0c;常沉浸于代码之世界&#xff0c;思维纵横&#xff0c;力求逻辑之严密&#xff0c;算法之精妙。亦爱篮球&#xff0c;驰骋球场&#xff0c;尽享挥洒汗水之乐。且喜跑步&#xff0c;尤钟马拉松&#xff0c;长途奔袭&#xf…

Ubuntu 20安装JDK17和MySQL8.0

一.jdk 安装JDK 第一步&#xff1a;更新软件包&#xff1a;sudo apt update 第二步&#xff1a;安装JDK&#xff1a;sudo apt install openjdk-17-jdk 第三步&#xff1a;检测JDK: java -version 卸载JDK&#xff1a; 第一步&#xff1a;移除JDK包&#xff1a;apt-get purg…

nginx通过nginx_upstream_check_module实现后端健康检查

1、简介说明 nginx是常用的反向代理和负载均衡服务&#xff0c;具有强大并发能力、稳定性、丰富的功能集、低资源的消耗。 nginx自身是没有针对后端节点健康检查的&#xff0c;但是可以通过默认自带的ngx_http_proxy_module 模块和ngx_http_upstream_module模块中的相关指令来完…

【Langchain大语言模型开发教程】基于文档问答

&#x1f517; LangChain for LLM Application Development - DeepLearning.AI Embedding&#xff1a; https://huggingface.co/BAAI/bge-large-en-v1.5/tree/main 学习目标 1、Embedding and Vector Store 2、RetrievalQA 引包、加载环境变量 import osfrom dotenv import…

Vue中的事件修饰符?

在Vue.js中&#xff0c;事件修饰符提供了一种简洁的方式来处理DOM事件中的常见问题&#xff0c;如阻止事件冒泡、阻止默认行为等。Vue的事件修饰符以.开头&#xff0c;可以串联使用多个修饰符。以下是一些常用的事件修饰符&#xff1a; 1.stop: 阻止事件冒泡。等同于在原生事件…

python多进程库(multiprocessing)

multiprocessing本身是Python的多进程库&#xff0c;用来处理与多进程相关的操作。但是由于进程与进程之间不能直接共享内存和堆栈资源&#xff0c;而且启动新的进程开销也比线程大得多&#xff0c;因此使用多线程来爬取比使用多进程有更多的优势。multiprocessing下面有一个du…

【BUG】已解决:OSError: [Errno 22] Invalid argument

已解决&#xff1a;OSError: [Errno 22] Invalid argument 目录 已解决&#xff1a;OSError: [Errno 22] Invalid argument 【常见模块错误】 错误原因&#xff1a; 解决方法如下&#xff1a; 欢迎来到英杰社区https://bbs.csdn.net/topics/617804998 欢迎来到我的主页&…

240720_图像语义分割中数据集原图与标签对比查漏

240720_图像语义分割中数据集原图与标签对比查漏 核对原图和标签是否一一对应的工作是必要的&#xff0c;不然在训练过程中可能会发生已经训练了好几个epoch了&#xff0c;突然给你报xx.png找不到&#xff0c;然后你去删除掉了对应的jpg&#xff0c;但是在重新运行几个epoch之…

快速认识EA(Enterprise Architecture)

前言 企业架构&#xff0c;英文是&#xff1a;Enterprise Architecture&#xff0c;简称&#xff1a;EA&#xff0c;是承接企业战略规划与IT建设之间的桥梁&#xff0c;是企业信息化的核心&#xff0c;主要包括业务架构和IT架构。 架构的本质是管理和解决系统的复杂性&#x…

06. 截断文本 选择任何链接 :root 和 html 有什么区别

截断文本 对超过一行的文本进行截断,在末尾添加省略号(…)。 使用 overflow: hidden 防止文本超出其尺寸。使用 white-space: nowrap 防止文本超过一行高度。使用 text-overflow: ellipsis 使得如果文本超出其尺寸,将以省略号结尾。为元素指定固定的 width,以确定何时显示省略…

mysql无法启动

总是报错&#xff1a; 1、Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details. 2、ERROR 2002 (HY000): Cant connect to local …