打开Azure Web Job的端口 [英] Opening ports to Azure Web Job

查看:67
本文介绍了打开Azure Web Job的端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需求,我需要在其中托管FTP服务器以及在Azure网站上托管的网站.我们为客户托管此应用的单独实例-每个实例需要一个单独的FTP服务器

I have a requirement where I need to host an FTP server along with a website that is hosted on Azure Web Sites. We host separate instances of this app for our clients - and it needs an separate FTP server per instance

我当前正在尝试的解决方案是使用FubarDev.FtpServer.我的计划是将FTP服务托管在网络作业中.

The solution that I'm trying currently is using the FubarDev.FtpServer. My plan was to host that FTP service in a web job.

启动FTP服务器似乎没问题.启动服务器后,Web作业将在Web作业控制台中打印出一行,该Web作业的状态为正在运行,并且没有异常输出.

Launching the FTP server seems ok. The Web Job prints out a line to web job console after the server is started, status is of the web job is running and no exceptions are output.

现在,尝试连接到FTP失败.我怀疑原因是端口21在保护Azure网站的防火墙上未打开,并且该端口上没有流量转发.有什么办法解决吗?

Now, trying to connect to the FTP fails. I suspect the reason is that the port 21 is not open on the firewall that protects azure websites and no traffic on that port is forwarded. Is there any way around this?

从网站自身连接到作业中托管的FTP服务器时,会出现以下错误:

Connecting from the Website it self to the FTP server hosted in the job gives the following errors:

连接到127.0.0.1时

When connecting to 127.0.0.1

试图以一种禁止其访问的方式访问套接字访问权限127.0.0.1:21

An attempt was made to access a socket in a way forbidden by its access permissions 127.0.0.1:21

在端口21上使用websitename.azurewebsite.net进行连接时(从网站本身,它是在webjob中托管FTP)

When connecting using the websitename.azurewebsite.net on port 21 (from the website itself, that is hosting the FTP inside the webjob)

连接尝试失败,因为被连接方未一段时间后正确响应或建立连接失败,因为连接的主机未能响应xx.xx.xx.xx:21

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xx.xx.xx.xx:21

我想尽可能地坚持使用Azure Web Apps,以避免必须管理虚拟机

I would like to stick to the Azure Web Apps as much as possible to avoid having to manage VMs

任何帮助将不胜感激!我也对解决此问题的潜在替代方法持开放态度.

Any help would be greatly appreciated! I'm also open to the potential alternative approaches to this problem.

推荐答案

Azure Web应用仅支持端口80和443上的传入流量.您将无法通过Web应用托管ftp服务器(内置ftp除外)服务器).您需要将ftp服务器放置在VM角色或web/worker角色(云服务)中.

Azure Web Apps only support incoming traffic on ports 80 and 443. You will not be able to host ftp servers via web apps (aside from the built-in ftp server). You'd need to place the ftp server either in a VM or web/worker role (cloud service).

这篇关于打开Azure Web Job的端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆