无法连接到“Jenkins-On-Azure”

时间:2017-12-07 10:53:14

标签: azure jenkins azure-virtual-machine

我在一个新的资源组上在Azure上创建了一个Jenkins linux vm。

我按照这里描述的步骤: Create a Jenkins server on an Azure Linux VM from the Azure portal

所以我在linux vm上运行了命令ssh -L 127.0.0.1:8080:localhost:8080 jenkinsadmin@jenkins2517454.eastus.cloudapp.azure.com (将用户名和dns名称改为我自己的名字),看起来很好(没有错误)。

现在每当我尝试从我自己的计算机(而不是天蓝色)连接到端口8080时,我在linux vm上获得以下消息:channel 2: open failed: administratively prohibited: open failed并且它不允许我登录Jenkins。

如何解决?

谢谢

2 个答案:

答案 0 :(得分:1)

要从外部网络访问,您需要“添加入站端口规则”,如下所示:

enter image description here

有关详细信息,请参阅“Create Jenkins server on an Azure Linux VM from the Azure Portal”。

答案 1 :(得分:1)

这不是NSG问题。您不需要在Azure NSG规则上添加端口8080。

如果您想使用http://localhost:8080/从计算机进行连接,则需要创建SSH tunnel on your local computer。你可以用腻子做。

enter image description here

配置隧道

enter image description here

此外,您可以在Windows上安装Linux。请参考以下步骤:

1.安装Linux on Windows

2.执行bash

时打开Power shell

3.执行sudo -issh -L 127.0.0.1:8080:localhost:8080 jenkinsadmin@jenkins2517454.eastus.cloudapp.azure.com

enter image description here

现在,我可以在我的本地计算机上访问http://localhost:8080/。(默认用户名是admin)。

enter image description here

相关问题