“Jenkins jobs are missing on Win 10”

huangapple go评论108阅读模式
英文:

Jenkins jobs are missing on Win 10

问题

我在 Windows 10 上安装了 Jenkins。我通常通过控制台使用命令 java -jar jenkins.war --httpPort=9090 来运行它,因为涉及到端口号。我在 Jenkins 中创建了一些作业。今天,我决定在 jenkins.xml 中更改端口设置,以便我可以将其自动设置为 Windows 服务。当我在服务窗口中将 Jenkins 以 Win 服务的形式启动时,一切看起来都正常,但是所有的作业都不见了。如果我停止服务,然后通过控制台命令重新运行 Jenkins,所有的作业都会恢复正常。我不理解。在 Users/xy/.jenkins/jobs 下有一个文件夹,我可以在其中看到所有创建的作业。那么为什么服务看不到它们呢?我在这个问题周围还注意到的另一个问题是,服务调用的是 jenkins.exe,而控制台调用的是 jenkins.war。有人知道发生了什么吗?

英文:

I have a Jenkins installation on win 10. I always run it via console with command java -jar jenkins.war --httpPort=9090 because of port number. And I have some jobs created in there. Today I decided to change settings in jenkins.xml for port so I can run it automatically as Windows service. When I started Jenkins as Win service in services window everything looks ok BUT all jobs are missing. If I stop the service and rerun Jenkins via console command all jobs are ok. I don'd understand. There is a folder Users/xy/.jenkins/jobs where I can see all the jobs created. So why the service dont see them? Another think I noticed around this problem is the service calls jenkins.exe and console calls jenkins.war. Does anybody knows what is going on?

答案1

得分: 1

确保您首先备份了所有内容。

您基本上有两个安装,指向不同的文件夹。您可以在两个安装中定义一个作业,该作业输出环境(您需要知道Jenkins的主目录和工作空间路径)。之后,您可以将旧文件夹的内容复制(而不是移动)到新文件夹。

英文:

Make sure you backup-ed everything first.

You have basically two installations pointing to different folders. You can define in both installations a job that outputs the environment (you need to know the jenkins home & workspace paths). After that you can copy (not move) the old folder content to the new one.

答案2

得分: 0

当您将Jenkins作为服务运行时,您是否指定其作为您的用户帐户运行,还是作为系统运行?Jenkins将信息存储在其用户目录中,通常服务要么作为System运行,要么作为其自己的专用账户运行。

英文:

When you run jenkins as a service did you specify it to run as your user account or as System? Jenkins stores information in its user directory and usually services either run as System or in their own dedicated account

huangapple
  • 本文由 发表于 2020年3月4日 04:00:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/60514637.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定