User`s guide
6 Programming Overview
6-56
Could not send Job3.common.mat for job 3:
One of your shell's init files contains a command that is writing to stdout,
interfering with sftp. Access help
com.mathworks.toolbox.distcomp.remote.spi.plugin.SftpExtraBytesFromShellException:
One of your shell's init files contains a command that is writing to stdout,
interfering with sftp.
Find and wrap the command with a conditional test, such as
if ($?TERM != 0) then
if ("$TERM" != "dumb") then
/your command/
endif
endif
: 4: Received message is too long: 1718579037
The telling symptom is the phrase "Received message is too long:" followed by a
very large number.
The sftp server starts a shell, usually bash or tcsh, to set your standard read and write
permissions appropriately before transferring files. The server initializes the shell in
the standard way, calling files like .bashrc and .cshrc. This problem happens if your
shell emits text to standard out when it starts. That text is transferred back to the sftp
client running inside MATLAB, and is interpreted as the size of the sftp server's response
message.
To work around this error, locate the shell startup file code that is emitting the text, and
either remove it or bracket it within if statements to see if the sftp server is starting the
shell:
if ($?TERM != 0) then
if ("$TERM" != "dumb") then
/your command/
endif
endif
You can test this outside of MATLAB with a standard UNIX or Windows sftp command-
line client before trying again in MATLAB. If the problem is not fixed, the error message
persists:
> sftp yourSubmitMachine
Connecting to yourSubmitMachine...
Received message too long 1718579042
If the problem is fixed, you should see:
> sftp yourSubmitMachine
Connecting to yourSubmitMachine...