阅读背景:

在传输过程中,AWS EC2 Rstudio服务器错误发生。

来源:互联网 

After over a month, I have managed to piece together how to setup an AWS EC2 server. It has been very hard to upload files as there are very conservative (size) limits when done via the upload button in Rstudio Server. The error message when this is attempted is "Unexpected empty response from server".
I am not unique in this respect e.g. Trouble Uploading Large Files to RStudio using Louis Aslett's AMI on EC2

经过一个多月,我已经设法拼凑了如何安装AWS EC2服务器。当通过Rstudio服务器上的上传按钮时,很难上传文件,因为有非常保守的(大小)限制。尝试时的错误消息是“来自服务器的意外的空响应”。我在这方面并不是唯一的,比如在EC2上使用路易斯·阿斯里特的AMI上传大文件到RStudio。

I have managed to use the following commands through putty and this has allowed me to upload files via either filezilla or winscp.

我已经通过putty使用了以下命令,这允许我通过filezilla或winscp上传文件。

sudo chown -R ubuntu /home/rstudio

sudo chown -R ubuntu /home/rstudio。

sudo chmod -R 755 /home/rstudio

sudo chmod - r755 /home/rstudio。

Once I use these commands and log out, I can no longer access rstudio on the instances in future logins. I can relogin to my instances via my browser, but I get the error message: Error Occurred During Transmission

一旦我使用这些命令并注销,我就不能再在以后登录的实例上访问rstudio了。我可以通过浏览器重新登录到我的实例,但是我得到了错误信息:在传输过程中发生错误。

Everything is fine other than once I use Putty I lose browser access to my instances.
I think this is because the command is change of ownership or similar. Should I be using a different command? If I don't use a command I cannot connect between filezilla/winscp and the instance. If anyone is thinking of posting a comment that this should be closed as it is a hardware issue, I don't have a problem with hardware. I am interested in the correct coded commands. Thank you :)

只要我使用Putty,我就会失去浏览器的访问权限。我认为这是因为命令是所有权或类似的变更。我应该使用不同的命令吗?如果我不使用命令,我无法连接filezilla/winscp和实例。如果有人想发表评论,说这应该关闭,因为这是一个硬件问题,我没有硬件问题。我对正确的编码命令感兴趣。谢谢你:)


Ok so eventually I realised what was going on here. The default home directory size for AWS is less than 8-10GB regardless of the size of your instance. As this as trying to upload to home then there was not enough room. An experienced linux user would not have fallen into this trap, but hopefully any other windows users new to this who come across this problem will see this. If you upload into a different drive on the instance then this can be solved. As the Louis Aslett Rstudio AMI is based in this 8-10GB space then you will have to set your working directory outside this, the home directory. Not intuitively apparent from Rstudio server interface. Whilst this is an advanced forum and this is a rookie error I am hoping no one deletes this question as I spent months on this and I think someone else will too.

最终我意识到这里发生了什么。AWS的默认主目录大小小于8-10GB,而不考虑实例的大小。因为这是想上载到家里,所以没有足够的空间。一个有经验的linux用户不会掉进这个陷阱,但是希望其他任何新出现的windows用户都能看到这个问题。如果你在实例上上传不同的驱动器,就可以解决这个问题。当Louis Aslett Rstudio AMI基于这个8-10GB空间时,您将不得不将您的工作目录设置在此之外,即主目录。从Rstudio服务器接口中不能直观地看出。虽然这是一个高级论坛,这是一个新手的错误,我希望没有人删除这个问题,因为我花了几个月的时间在这个问题上,我认为其他人也会。

1 个解决方案

#1


0  

Don't change the rights of /home/rstudio unless you know what you are doing, this may cause unexpected issues (and it actually does cause issues in your case). Instead, copy the files with filezilla or winscp to a temporary file (let say /tmp), then ssh to your instance with putty and move the file to the rstudio directory with sudo (e.g sudo mv /tmp/myfile /home/rstudio).

除非你知道自己在做什么,否则不要改变/home/rstudio的权利,这可能会导致意想不到的问题(而且它确实会在你的案例中引起问题)。相反,将文件与filezilla或winscp复制到一个临时文件(let say /tmp),然后用putty将文件复制到您的实例,然后用sudo将文件移动到rstudio目录(e)。g sudo mv /tmp/myfile /home/rstudio。


分享到: