Auto-upload uploads an empty file
Hi all,
I set up remote deployment to an EC2 server via SFTP, and set up automatic deployment on command+s. Deploying files manually always works, but automatic deployment sometimes uploads an empty file. Sometimes it works correctly, but more often than not it doesn't, and the file on the remote is just an empty file. I've included logs for both a manual deployment and an automatic deployment that uploaded an empty file.
Manual deployment
2017-11-03 16:19:24,592 [185303467] DEBUG - t.connections.RemoteConnection - Opening connection to sftp://<remote IP>:22/ in @1104184d
2017-11-03 16:19:24,597 [185303472] DEBUG - t.connections.RemoteConnection - Added connection to pool ofsftp://<remote IP>:22/ in @1104184d; 1 connections exists
2017-11-03 16:19:24,598 [185303473] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>"
2017-11-03 16:19:24,709 [185303584] DEBUG - ins.plugins.webDeployment.sftp - drwxr-x--- 1203 1203 4096 Fri Nov 03 14:29:15 PDT 2017, mtime 1,509,744,555
2017-11-03 16:19:24,709 [185303584] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>/<filename>"
2017-11-03 16:19:24,819 [185303694] DEBUG - ins.plugins.webDeployment.sftp - -rw-rw-rw- 1203 1203 2209 Fri Nov 03 16:19:17 PDT 2017, mtime 1,509,751,157
2017-11-03 16:19:24,819 [185303694] DEBUG - ins.webDeployment.TransferTask - Starting server-side modification
2017-11-03 16:19:24,820 [185303695] DEBUG - ins.webDeployment.TransferTask - Publish config:
<State autoUpload="On explicit save action" promptOnRemoteOverwrite="NONE" serverName="<server name>" stopOnFirstError="false" overwriteAll="true" preserveTimestamps="true" deleteMissingItems="false" createEmptyFolders="false" traceLevel="DETAILS" promptOnLocalOverwrite="true" persistUploadOnCheckin="true" exclude=".svn;.cvs;.idea;.DS_Store;.git;.hg" filePermissions="438" folderPermissions="511" autoUploadExternalChanges="true" notifyRemoteChanges="false" compareModeInSync="CONTENT" showEqualInSync="false" showDifferentInSync="true" showNewOnSourceInSync="true" showNewOnTargetInSync="true" showExcludedInSync="false">
<servers />
<serverData>
<paths name="<server name>">
<serverdata>
<mappings>
<mapping deploy="<a remote mapping>" local="<a local mapping>" web="/" />
<mapping deploy="<another remote mapping>" local="<another local mapping>" web="/" />
</mappings>
<excludedPaths />
</serverdata>
</paths>
</serverData>
<option name="myUploadOnCheckinName" />
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
</State>
2017-11-03 16:19:24,820 [185303695] DEBUG - ins.webDeployment.TransferTask - Server config:
<ServerPasswordSafeDeployable />
2017-11-03 16:19:24,820 [185303695] DEBUG - ins.plugins.webDeployment.sftp - put "<remote directory>/<filename>"
2017-11-03 16:19:25,262 [185304137] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>/<filename>"
2017-11-03 16:19:25,372 [185304247] DEBUG - ins.plugins.webDeployment.sftp - -rw-rw-rw- 1203 1203 2209 Fri Nov 03 16:19:25 PDT 2017, mtime 1,509,751,165
2017-11-03 16:19:25,372 [185304247] DEBUG - ebDeployment.TransferOperation - Changing permissions of sftp://<remote IP>/<remote directory>/<filename> to rw-rw-rw- (666)
2017-11-03 16:19:25,372 [185304247] DEBUG - ins.plugins.webDeployment.sftp - chmod "<remote directory>/<filename>", 438
2017-11-03 16:19:25,594 [185304469] DEBUG - ins.plugins.webDeployment.sftp - setStat "<remote directory>/<filename>", -rw-rw-rw- 1203 1203 2209 Fri Nov 03 16:19:17 PDT 2017, mtime 1,509,751,157
2017-11-03 16:19:25,708 [185304583] DEBUG - ebDeployment.TransferOperation - Transferred: <local directory>/<filename>
2017-11-03 16:19:25,708 [185304583] DEBUG - ins.webDeployment.TransferTask - finished
2017-11-03 16:19:25,710 [185304585] DEBUG - t.connections.RemoteConnection - Releasing one of the connections to sftp://<remote IP>:22/ in @1104184d; connections left 0
Automatic deployment
2017-11-03 16:18:30,622 [185249497] DEBUG - t.connections.RemoteConnection - Opening connection to sftp://<remote IP>:22/ in @75398bf8
2017-11-03 16:18:30,625 [185249500] DEBUG - t.connections.RemoteConnection - Added connection to pool ofsftp://<remote IP>:22/ in @75398bf8; 1 connections exists
2017-11-03 16:18:30,625 [185249500] DEBUG - ins.webDeployment.TransferTask - Starting server-side modification
2017-11-03 16:18:30,625 [185249500] DEBUG - ins.webDeployment.TransferTask - Publish config:
<State autoUpload="Always" promptOnRemoteOverwrite="NONE" serverName="<server name>" stopOnFirstError="false" overwriteAll="true" preserveTimestamps="true" deleteMissingItems="false" createEmptyFolders="false" traceLevel="BRIEF" promptOnLocalOverwrite="true" persistUploadOnCheckin="true" exclude=".svn;.cvs;.idea;.DS_Store;.git;.hg" filePermissions="-1" folderPermissions="-1" autoUploadExternalChanges="true" notifyRemoteChanges="false" compareModeInSync="CONTENT" showEqualInSync="false" showDifferentInSync="true" showNewOnSourceInSync="true" showNewOnTargetInSync="true" showExcludedInSync="false">
<servers />
<serverData>
<paths name="<server name>">
<serverdata>
<mappings>
<mapping deploy="<a remote mapping>" local="<a local mapping>" web="" />
<mapping deploy="<another remote mapping>" local="<another local mapping>" />
</mappings>
<excludedPaths />
</serverdata>
</paths>
</serverData>
<option name="myUploadOnCheckinName" />
<option name="myAutoUpload" value="ALWAYS" />
</State>
2017-11-03 16:18:30,626 [185249501] DEBUG - ins.webDeployment.TransferTask - Server config:
<ServerPasswordSafeDeployable />
2017-11-03 16:18:30,632 [185249507] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>"
2017-11-03 16:18:30,741 [185249616] DEBUG - ins.plugins.webDeployment.sftp - drwxr-x--- 1203 1203 4096 Fri Nov 03 14:29:15 PDT 2017, mtime 1,509,744,555
2017-11-03 16:18:30,741 [185249616] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>/<filename>"
2017-11-03 16:18:30,892 [185249767] DEBUG - ins.plugins.webDeployment.sftp - -rw-rw-rw- 1203 1203 2209 Fri Nov 03 16:17:52 PDT 2017, mtime 1,509,751,072
2017-11-03 16:18:30,893 [185249768] DEBUG - ins.plugins.webDeployment.sftp - put "<remote directory>/<filename>"
2017-11-03 16:18:30,957 [185249832] DEBUG - Deployment.AutoUploadComponent - Checking for related changes File Watchers
2017-11-03 16:18:30,994 [185249869] DEBUG - t.connections.RemoteConnection - Opening connection to sftp://<remote IP>:22/ in @1104184d
2017-11-03 16:18:31,000 [185249875] DEBUG - t.connections.RemoteConnection - Added connection to pool ofsftp://<remote IP>:22/ in @1104184d; 1 connections exists
2017-11-03 16:18:31,000 [185249875] DEBUG - ins.webDeployment.TransferTask - Starting server-side modification
2017-11-03 16:18:31,000 [185249875] DEBUG - ins.webDeployment.TransferTask - Publish config:
<State autoUpload="On explicit save action" promptOnRemoteOverwrite="NONE" serverName="<server name>" stopOnFirstError="false" overwriteAll="true" preserveTimestamps="true" deleteMissingItems="false" createEmptyFolders="false" traceLevel="DETAILS" promptOnLocalOverwrite="true" persistUploadOnCheckin="true" exclude=".svn;.cvs;.idea;.DS_Store;.git;.hg" filePermissions="438" folderPermissions="511" autoUploadExternalChanges="true" notifyRemoteChanges="false" compareModeInSync="CONTENT" showEqualInSync="false" showDifferentInSync="true" showNewOnSourceInSync="true" showNewOnTargetInSync="true" showExcludedInSync="false">
<servers />
<serverData>
<paths name="<server name>">
<serverdata>
<mappings>
<mapping deploy="<a remote mapping>" local="<a local mapping>" web="/" />
<mapping deploy="<another remote mapping>" local="<another local mapping>" web="/" />
</mappings>
<excludedPaths />
</serverdata>
</paths>
</serverData>
<option name="myUploadOnCheckinName" />
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
</State>
2017-11-03 16:18:31,000 [185249875] DEBUG - ins.webDeployment.TransferTask - Server config:
<ServerPasswordSafeDeployable />
2017-11-03 16:18:31,000 [185249875] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>"
2017-11-03 16:18:31,119 [185249994] DEBUG - ins.plugins.webDeployment.sftp - drwxr-x--- 1203 1203 4096 Fri Nov 03 14:29:15 PDT 2017, mtime 1,509,744,555
2017-11-03 16:18:31,120 [185249995] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>/<filename>"
2017-11-03 16:18:31,234 [185250109] DEBUG - ins.plugins.webDeployment.sftp - -rw-rw-rw- 1203 1203 0 Fri Nov 03 16:18:31 PDT 2017, mtime 1,509,751,111
2017-11-03 16:18:31,234 [185250109] DEBUG - ins.plugins.webDeployment.sftp - put "<remote directory>/<filename>"
2017-11-03 16:18:31,351 [185250226] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>/<filename>"
2017-11-03 16:18:31,460 [185250335] DEBUG - ins.plugins.webDeployment.sftp - -rw-rw-rw- 1203 1203 0 Fri Nov 03 16:18:31 PDT 2017, mtime 1,509,751,111
2017-11-03 16:18:31,460 [185250335] DEBUG - ins.plugins.webDeployment.sftp - setStat "<remote directory>/<filename>", -rw-rw-rw- 1203 1203 0 Fri Nov 03 16:18:30 PDT 2017, mtime 1,509,751,110
2017-11-03 16:18:31,574 [185250449] DEBUG - ebDeployment.TransferOperation - Transferred: <local directory>/<filename>
2017-11-03 16:18:31,574 [185250449] DEBUG - ins.webDeployment.TransferTask - finished
2017-11-03 16:18:31,575 [185250450] DEBUG - t.connections.RemoteConnection - Releasing one of the connections to sftp://<remote IP>:22/ in @75398bf8; connections left 0
2017-11-03 16:18:31,685 [185250560] DEBUG - ins.plugins.webDeployment.sftp - stat "<remote directory>/<filename>"
2017-11-03 16:18:31,797 [185250672] DEBUG - ins.plugins.webDeployment.sftp - -rw-rw-rw- 1203 1203 0 Fri Nov 03 16:18:30 PDT 2017, mtime 1,509,751,110
2017-11-03 16:18:31,797 [185250672] DEBUG - ebDeployment.TransferOperation - Changing permissions of sftp://<remote IP>/<remote directory>/<filename> to rw-rw-rw- (666)
2017-11-03 16:18:31,797 [185250672] DEBUG - ins.plugins.webDeployment.sftp - chmod "<remote directory>/<filename>", 438
2017-11-03 16:18:32,015 [185250890] DEBUG - ins.plugins.webDeployment.sftp - setStat "<remote directory>/<filename>", -rw-rw-rw- 1203 1203 0 Fri Nov 03 16:18:30 PDT 2017, mtime 1,509,751,110
2017-11-03 16:18:32,138 [185251013] DEBUG - ebDeployment.TransferOperation - Transferred: <local directory>/<filename>
2017-11-03 16:18:32,138 [185251013] DEBUG - ins.webDeployment.TransferTask - finished
2017-11-03 16:18:32,139 [185251014] DEBUG - t.connections.RemoteConnection - Releasing one of the connections to sftp://<remote IP>:22/ in @1104184d; connections left 0
I suspect it may be a permissions issue, but I'm not well-versed enough in that to make a diagnosis beyond that. Any thoughts?
Please sign in to leave a comment.
I have the same issue... ugh.
@Ryan, if your issue happens in the latest version 2023.1.2, would you mind submitting a bug report to https://youtrack.jetbrains.com ?