前提・実現したいこと
GitLab CIを使いサーバーへ自動デプロイを行おうとしています。
発生している問題・エラーメッセージ
サーバーへpingは送れているんですが、ftp接続時にRemote host has closed the connection.
が発生し接続できません。
ftp
、lftp
も試しましたが同じ状況です。
ローカル環境(Mac)、VirtualBox(centos/7)、Docker(centos:7)からは正常にftp接続できておりお手上げ状態です。
Docker(centos:7)にて実行したログです。
bash
1$ yum install -y epel-release 2$ yum install -y ncftp --enablerepo=epel 3 4$ HOST=xxxxxxxx 5$ USERNAME=xxxxx 6$ PASSWORD=xxx 7$ echo "set;quit"|ncftp -u $USERNAME -p $PASSWORD $HOST 8NcFTP 3.2.5 (Feb 02, 2011) by Mike Gleason (http://www.NcFTP.com/contact/). 9Connecting to xxxxxxxx... 10FTP Server ready. 11Logging in... 12User xxxxxxxx logged in. 13Logged in to xxxxxxxx. 14anon-password NcFTP@ 15auto-ascii |.txt|.asc|.html|.htm|.css|.xml|.ini|.pl|.hqx|.cfg|.c|.h|.cpp|.hpp|.bat|.m3u|.pls| 16auto-resume yes 17autosave-bookmark-changes no 18confirm-close no 19connect-timeout 20 20control-timeout 135 21logsize 10240 22pager more 23passive optional 24progress-meter 2 (statbar) 25redial-delay 20 26save-passwords ask 27show-status-in-xterm-titlebar no 28so-bufsize 0 (use system default) 29xfer-timeout 3600 30yes-i-know-about-NcFTPd no
該当のソースコード
variablesはダミーに差し替えています。
yml
1variables: 2 HOST: "xxxxxxxx" 3 USERNAME: "xxxxx" 4 PASSWORD: "xxx" 5 6before_script: 7 - yum install -y epel-release 8 - yum install -y ncftp --enablerepo=epel 9 10build: 11 image: centos:7 12 script: 13 - ping $HOST -c 1 14 - echo "set;quit"|ncftp -u $USERNAME -p $PASSWORD $HOST 15 only: 16 - test
ftp サーバー側のログには、なにか出ていたりしないでしょうか?
また、GitLab CI は、どのサーバーで動かしているのでしょうか?
あなたの回答
tips
プレビュー