Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部署問題與錯誤回報 #81

Open
Nebulosa-Cat opened this issue Jan 29, 2024 · 16 comments
Open

部署問題與錯誤回報 #81

Nebulosa-Cat opened this issue Jan 29, 2024 · 16 comments

Comments

@Nebulosa-Cat
Copy link

平台: Raspberry Pi 4b 4g
系統: PiOS
部署方式1: docker-compose
設定檔:

version: "3"
  renewx:
    image: hanhongyong/ms365-e5-renew-x:arm64v8
    restart: always
    volumes:
      - ./opt/E5RenewX-Deploy:/app/Deploy
    environment:
      - adminpwd="32位數包含大小寫英文、數字以及!@#$%^&*"
      - TZ=Asia/Taipei
    ports:
      - "1066:1066" 或 - 172.168.0.1:1066:1066

反代: Caddy localhost:1066 or 172.168.0.1:1066:1066
防火牆設定: ufw allow 1066 (僅做為測試時)(設定後有重啟防火牆避免設定未生效)
路由器端口轉發: 為了測試公開IP:1066因此有轉發1066端口
部署後
問題如下:

  1. 如使用該密碼長度會報錯(會顯示 The "N3" variable is not set. Defaulting to a blank string.)
    解決方法: 我先嘗試使用預設的123456去debug第2項的問題
  2. 不論是使用任意排列組合的端口方案,網頁都會顯示502或是被拒絕連線(caddy應該不會自動阻擋但我也有測試過停止運作caddy反代狀況下測試192.168.x.x:1066和公開ip:1066)

這個問題是否是因為沒有填入信箱收發者相關參數? 因為我手頭實在沒有支援的電郵可以測試

部署方式2:

docker run -d -p 1066:1066 -e TZ=Asia/Taipei--name ms365  hanhongyong/ms365-e5-renew-x:general

問題則是同上502或拒絕連線

想請問是否有人遇到相同情況或是同樣有樹莓派可以測試的

@hongyonghan
Copy link
Owner

你好。第一个方式中,目前没有增加邮件接收的功能。也就是说不会是没有添加邮件导致的。
我这边建议你使用第二个方式进行部署,目前这个支持了更多的版本,并且这个镜像更小,适合在树莓派上使用。
502错误可能是和防火墙、服务器等问题有关。你是用树莓派部署的,可以先试试在内网环境下访问1066端口看看可不可以,然后再去测试公网可不可以,如果内网可以,说明你映射到公网的过程中出了问题。

@Nebulosa-Cat
Copy link
Author

你好。第一个方式中,目前没有增加邮件接收的功能。也就是说不会是没有添加邮件导致的。 我这边建议你使用第二个方式进行部署,目前这个支持了更多的版本,并且这个镜像更小,适合在树莓派上使用。 502错误可能是和防火墙、服务器等问题有关。你是用树莓派部署的,可以先试试在内网环境下访问1066端口看看可不可以,然后再去测试公网可不可以,如果内网可以,说明你映射到公网的过程中出了问题。

我就是內網跟公網都測試過(見"caddy應該不會自動阻擋但我也有測試過停止運作caddy反代狀況下測試192.168.x.x:1066和公開ip:1066"那段)
不論是內網還是公網、透過IP或是透過網址都是502或是拒絕連線,防火牆和端口轉發也確定是開的,就蠻奇怪的

@hongyonghan
Copy link
Owner

先把防火墙关了试试呢?或者说你其他的端口能够正常访问吗

@Nebulosa-Cat
Copy link
Author

先把防火墙关了试试呢?或者说你其他的端口能够正常访问吗

我試試看完全關掉防火牆好了,我現在至少有4個服務在上面跑,其中兩個是透過允許訪問端口兩個是透過caddy做反代都能正常連接,只有這個不行

@Nebulosa-Cat
Copy link
Author

Nebulosa-Cat commented Jan 30, 2024

確定不行,跑的指令:

docker run -d -p 1066:1066 -e TZ=Asia/Taipei --name renewx  hanhongyong/ms365-e5-renew-x:general

docker ps:

d1d6e5334ada   hanhongyong/ms365-e5-renew-x:general   "dotnet Microsoft365…"   6 minutes ago   Up Less than a second    0.0.0.0:1066->1066/tcp, :::1066->1066/tcp   renewx

sudo ufw status: Status: inactive

以上操作是我剛剛apt-get update & upgrade後reboot系統,在防火牆關閉下操作的
顯示
無法存取這個網站 192.168.x.xxx 拒絕連線。

@Nebulosa-Cat
Copy link
Author

先把防火墙关了试试呢?或者说你其他的端口能够正常访问吗

今天找時間看了一下 log 顯示 exec /usr/bin/dotnet: exec format error

@hongyonghan
Copy link
Owner

能发给我你的系统的具体的内核版本吗?armv6?

@Nebulosa-Cat
Copy link
Author

能发给我你的系统的具体的内核版本吗?armv6?

Linux Pi-Server 6.1.61-v8+ #1696 SMP PREEMPT Thu Nov 2 16:44:46 GMT 2023 aarch64 GNU/Linux

@hongyonghan
Copy link
Owner

你好,我更新了一版镜像,我发现之前已经支持了arm64v8的,但是我这边编译是通过的。。。你再试一试?如果不行,我单独编译一个arm64v8的给你

@Nebulosa-Cat
Copy link
Author

你好,我更新了一版镜像,我发现之前已经支持了arm64v8的,但是我这边编译是通过的。。。你再试一试?如果不行,我单独编译一个arm64v8的给你

我試試,感謝大佬

@hongyonghan
Copy link
Owner

好的,有问题再联系我

@Nebulosa-Cat
Copy link
Author

好的,有问题再联系我

好的,有问题再联系我

nebulosacat@Pi-Server:~ $ docker pull hanhongyong/ms365-e5-renew-x:general
general: Pulling from hanhongyong/ms365-e5-renew-x
Digest: sha256:d901c003b9edb4f5d02b35d7d668c27742b99739d4601471e63abe8098a9a9da
Status: Image is up to date for hanhongyong/ms365-e5-renew-x:general
docker.io/hanhongyong/ms365-e5-renew-x:general

我看 docker hub 網頁上有更新了,但是拉不下來,這個 digest 跟 general 分支上的任何一個版本雜湊也不同
docker images 看他是 3 weeks ago
你那邊 pull 版本正常嗎? 我在 台灣家寬(樹梅派) 和 甲骨文 VPS (日本東京) pull 都是這個版本 (都是 arm 處理器)
手邊別的庫 (sub-store) 1 hour ago pull 下來是最新的 (1 our ago) ,不確定是不是 docker hub 本身 cache 的問題? 但別的庫 pull 很正常

@hongyonghan
Copy link
Owner

你好啊,我这边是可以的。不过我也重新编译了一下,并且清除了之前的缓存。你再试试看啊?

@Nebulosa-Cat
Copy link
Author

你好啊,我这边是可以的。不过我也重新编译了一下,并且清除了之前的缓存。你再试试看啊?

nebulosacat@Pi-Server:~ $ docker pull hanhongyong/ms365-e5-renew-x:general@sha256:14b5888a4126b7b518fe8f02ba94b5c10c73223a2cdf595df64eaa80fe5041b5
docker.io/hanhongyong/ms365-e5-renew-x@sha256:14b5888a4126b7b518fe8f02ba94b5c10c73223a2cdf595df64eaa80fe5041b5: Pulling from hanhongyong/ms365-e5-renew-x
c7c50787e2da: Pull complete
aff359114acb: Pull complete
821dc261e045: Pull complete
3790459d63d5: Pull complete
d9f67e74b01d: Pull complete
c28a95092be1: Pull complete
208cfb120a77: Pull complete
260b7c05f57d: Pull complete
4aecf9acf4a1: Pull complete
Digest: sha256:14b5888a4126b7b518fe8f02ba94b5c10c73223a2cdf595df64eaa80fe5041b5
Status: Downloaded newer image for hanhongyong/ms365-e5-renew-x@sha256:14b5888a4126b7b518fe8f02ba94b5c10c73223a2cdf595df64eaa80fe5041b5
docker.io/hanhongyong/ms365-e5-renew-x:general@sha256:14b5888a4126b7b518fe8f02ba94b5c10c73223a2cdf595df64eaa80fe5041b5
nebulosacat@Pi-Server:~ $ docker run -p 1066:1066 -e TZ=Asia/Taipei --name renewx hanhongyong/ms365-e5-renew-x:general@sha256:14b5888a4126b7b518fe8f02ba94b5c10c73223a2cdf595df64eaa80fe5041b5
exec /usr/bin/dotnet: exec format error

我手動指定 Digest pull 的是 Arm64 版本
這次 pull 下來的 SHA 也對了

有趣的是如果這樣 pull 下來後執行 docker run -p 1066:1066 -e TZ=Asia/Taipei --name renewx hanhongyong/ms365-e5-renew-x:general 會發現他會拉一個新的 image 只有 digest 值和上面拉的不一樣:

nebulosacat@Pi-Server:~ $ docker images --digests
REPOSITORY                     TAG       DIGEST                                                                    IMAGE ID       CREATED             SIZE
hanhongyong/ms365-e5-renew-x   general   sha256:14b5888a4126b7b518fe8f02ba94b5c10c73223a2cdf595df64eaa80fe5041b5   8fc211f7ccbc   About an hour ago   732MB
hanhongyong/ms365-e5-renew-x   general   sha256:e67c8a98af218c4fc66c4e016e6d55f310a5ef259cb22158586ff119e271b6e6   8fc211f7ccbc   About an hour ago   732MB

兩者連 image id 都是相同的,執行結果報錯也是相同的
對這個現象後來去查了一下似乎是正常的
According to [this github comment](https://github.com/docker/hub-feedback/issues/1925#issuecomment-565646445), apparently the CLI when calculating the sha256 digest uses a manifest containing all of the different machine architecture options, while each digest on the DockerHub page is calculated using a manifest with only that specific individual architecture.

所以問題應該還是出在 image 本身上面
我檢查了一下我的系統運作在 64 位元還是 32 位元:

nebulosacat@Pi-Server:~ $ getconf LONG_BIT
64

目前看起來可能是 dot NET 本身的問題,查了一下他似乎是針對不同系統和位元有不同的發行版本,可能是這部分衝突了?

@w-gitc
Copy link

w-gitc commented Feb 7, 2024

我也是树莓派4B。用我的compose试试

version: '3'
services:
  ms365-e5-renew-x:
    container_name: ms365_e5
    hostname: ms365_e5
    image: hanhongyong/ms365-e5-renew-x:arm64v8
    environment:
      - LANG=C.UTF-8
      - TZ=Asia/Shanghai
      # 发送邮件的邮箱
      - sender=131111710@163.com
      # 发送邮箱的授权码
      - pwd=P1F1JS
      # 接收邮件的邮箱
      - receiver=511118@qq.com
      # web界面的登录密码
      - adminpwd=z1119gwm4g
#    volumes:
#      - ./data/:/app/ # 主动挂载没用, 因为挂不出来, 只能自己copy出来
      # 账号信息挂载进去
#      - ./EXAccount.csv:/app/appdata/DataBase/EXAccount.csv
    ports:
      - 1066:1066
    restart: unless-stopped
    # 直接使用已有桥接网桥
    network_mode: bridge

@Chescin
Copy link

Chescin commented May 13, 2024

我也遇到同样的问题,拉取的通用镜像,armv7架构,我用的是玩客云IMG20240514024744.jpg

大佬帮帮忙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants