简体   繁体   English

quantconnect IBController 需要每隔几个小时重新登录一次,

[英]quantconnect IBController needing to relogin every few hours,

I have updated Ryan Kennedy 's IBConnect Docker image by getting the latest versions from Quantconnect , here is the Docker image I ended up with.我通过从Quantconnect获取最新版本更新了Ryan Kennedy的 IBConnect Docker 镜像,是我最终得到的 Docker 镜像。

Basically the dockerfile contains:基本上 dockerfile 包含:

FROM ubuntu:18.04
MAINTAINER Ryan Kennedy <hello@ryankennedy.io>

RUN  apt-get update \
  && apt-get install -y wget \
  && apt-get install -y unzip \
  && apt-get install -y xvfb \
  && apt-get install -y libxtst6 \
  && apt-get install -y libxrender1 \
  && apt-get install -y libxi6 \
  && apt-get install -y socat \
  && apt-get install -y software-properties-common

# Setup IB TWS
RUN mkdir -p /opt/TWS
WORKDIR /opt/TWS

ENV ibgateway_version x64-v974.4g
ENV ibgateway_script ibgateway-latest-standalone-linux-${ibgateway_version}.sh
ENV ibcontroller_file IBController-QuantConnect-3.2.0.5.zip

# from https://github.com/QuantConnect/Lean/blob/master/DockerfileLeanFoundation
RUN wget http://cdn.quantconnect.com/interactive/${ibgateway_script} && \
    chmod 777 ${ibgateway_script} && \
    ./${ibgateway_script} -q && \
    wget -O ~/Jts/jts.ini http://cdn.quantconnect.com/interactive/ibgateway-latest-standalone-linux-${ibgateway_version}.jts.ini && \
    rm ${ibgateway_script}

# Install IB Controller: Installs to /opt/IBController
RUN wget http://cdn.quantconnect.com/interactive/${ibcontroller_file} && \
    unzip ${ibcontroller_file} -d /opt/IBController && \
    chmod -R 777 /opt/IBController && \
    rm ${ibcontroller_file}

# Install Java 8
RUN \
  echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
  add-apt-repository -y ppa:webupd8team/java && \
  apt-get update && \
  apt-get install -y oracle-java8-installer && \
  rm -rf /var/lib/apt/lists/* && \
  rm -rf /var/cache/oracle-jdk8-installer

WORKDIR /

#CMD yes

# Launch a virtual screen
RUN Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null &
RUN export DISPLAY=:1

ADD runscript.sh runscript.sh
CMD bash runscript.sh

It all works well, except every few hours starts logging:一切正常,除了每隔几个小时开始记录:

05:48:36:462 IBController: detected frame entitled: Connecting to server...; event=Activated
05:51:19:741 IBController: detected dialog entitled: Re-login is required; event=Opened
05:51:19:743 IBController: Let user choose whether to re-login
05:51:19:751 IBController: detected dialog entitled: Re-login is required; event=Activated
05:54:20:608 IBController: detected dialog entitled: Re-login is required; event=Closed
05:54:21:191 IBController: detected dialog entitled: Re-login is required; event=Opened
05:54:21:191 IBController: Let user choose whether to re-login

I guess it loses connection due to any reason, and then there's an unhandled dialog for reconnecting, I'm not sure how to fix this.我想它由于任何原因失去了连接,然后有一个未处理的重新连接对话框,我不知道如何解决这个问题。

IBGateway, IB API C#, and the IBController project versions are all fairly tightly coupled. IBGateway、IB API C# 和 IBController 项目版本都非常紧密地耦合在一起。 They should probably not be used in isolation or you'll have version compatibility issues like this one.它们可能不应该单独使用,否则您会遇到像这样的版本兼容性问题。

LEAN (the open source algorithmic trading project you're extending from) ships with versions of these programs which we've constructed work perfectly together. LEAN (您从中扩展的开源算法交易项目)附带了我们构建的这些程序的版本,它们完美地协同工作。 In total LEAN's deployed and managed more than 50,000 live algorithms so its pretty well battle tested! LEAN 总共部署和管理了 50,000 多个实时算法,因此它经过了很好的实战测试! We've also forked the IBController and maintain a production-ready bug, free version.我们还分叉了 IBController 并维护了一个可用于生产的 bug,免费版本。

I'd recommend using the original LEAN Foundation if you can.如果可以,我建议使用原始的 LEAN Foundation。 It will save you months of headache.它将为您节省数月的头痛。 We have full-time engineers maintain and contributing to the code base ensuring these components remain reliable for the 70,000 quants in the QuantConnect community.我们有专职工程师维护代码库并为其做出贡献,以确保这些组件对于 QuantConnect 社区的 70,000 名量化分析师保持可靠。

-- I'm founder @ QC. ——我是创始人@QC。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Sidekiq 在 docker 中每隔几个小时就会崩溃一次 - Sidekiq crashes every few hours in docker Azure web 服务每隔几个小时更新一次相同的 docker 映像 - Azure web service updating same docker image every few hours 初始化 NVML 失败:几个小时后 Docker 出现未知错误 - Failed to initialize NVML: Unknown Error in Docker after Few hours 几个小时后Tomcat Docker容器日志挂起 - Tomcat docker container logs hangs after few hours 每24小时将Docker容器重置为其初始状态 - reset a docker container to its initial state every 24 hours 如何更新ECR登录令牌而无需每12小时重新生成一次? - How to update ECR login token without regenerate every 12 hours? AWS + Docker + Puma + Rails + S3,上传几个小时后上传中断 - AWS + Docker + Puma + Rails + S3 , broken upload after few hours of uploading 几个小时后棘轮 WebSocket 连接到 mysql 数据库错误 - SQLSTATE[HY000]:一般错误:2006 MySQL 服务器已消失 - Ratchet WebSocket connection to mysql database error after few hours - SQLSTATE[HY000]: General error: 2006 MySQL server has gone away Docker-很少的容器 - Docker - few containers 当还需要 libstdc++ 时,如何使用 bazel 创建 Go docker 图像? - How do I create a Go docker image with bazel when also needing libstdc++?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM