Amy Shieh
Amy Shieh

Reputation: 361

unable to start the jenkins service

I'm very new to jenkins. I installed the jenkins by this:

brew install jenkins-lts

whiches was installed in the path of:

/usr/local/Cellar/jenkins-lts/2.204.1/libexec/jenkins.war

then I copied the jenkins.war into Download folder and run the command of java -jar jenkins.war.

when I open the http://localhost:8080, it always shows me the 503 error like this:

Request URL: http://localhost:8080/login?from=%2F
Request Method: GET
Status Code: 503 Service Unavailable
Remote Address: [::1]:8080
Referrer Policy: no-referrer-when-downgrade
Cache-Control: no-cache,no-store,must-revalidate
Content-Encoding: gzip
Content-Length: 483
Content-Type: text/html;charset=utf-8
Date: Fri, 17 Jan 2020 13:20:33 GMT
Expires: 0
Server: Jetty(9.4.z-SNAPSHOT)
X-Content-Type-Options: nosniff
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en
Cache-Control: no-cache
Connection: keep-alive
Cookie: Idea-9162083a=7af35695-da6a-4307-a39e-b0493b0245ba; JSESSIONID.b339e4d1=node06g9kw8xovnem1325lww2jfx880.node0; JSESSIONID.4f333b19=node0dvxpga8oouhul4beqym36aa90.node0; JSESSIONID.5d0d8859=node017xvlsusr2w881dxdwyfw8bhg00.node0
Host: localhost:8080
Pragma: no-cache
Referer: http://localhost:8080/login?from=%2F
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
from: /

the log didn't show any errors.

if I try to run the jenkins by brew, it shows me an error:

Error: Formula `jenkins` is not installed.

the java version is also the latest.

java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

where I did wrong? or should I config anything?

Upvotes: 1

Views: 3317

Answers (2)

Amy Shieh
Amy Shieh

Reputation: 361

I reinstalled the jenkins via brew, and closed the vpn, use the command of

brew services start jenkins-lts

or

java -jar /usr/local/Cellar/jenkins-lts/2.204.1/libexec/jenkins.war

are worked as expect.

thanks for your help.

Upvotes: 1

fredericrous
fredericrous

Reputation: 3028

I feel like using docker + kitematic is a better solution than brew for your use case.

right click on the docker icon in the systray, select kitematic, follow the instructions to install it. Login (or skip), search for jenkins and run it. set a volume on folder /var/lib/jenkins in order to persist your data when you'll upgrade the image

Upvotes: 0

Related Questions