What am I doing wrong?
Download Cruise Control
Unzip it -- Now it's in ~/Downloads/cruisecontrol-bin-2.8.4
Run ./cruisecontrol.sh
I see the server spinning up. The service binds to port 8080. So I wait a moment, then I go over to port 8080 using my browser.
This is what I see:
Error 404 - Not Found.
No context on this server matched or handled this request.
Contexts known to this server are:
/cc-config ---> org.mortbay.jetty.webapp.WebAppContext#519549e{/cc-config,file:/Users/darryl/Downloads/cruisecontrol-bin-2.8.4/webapps/cc-config/}
/cruisecontrol ---> org.mortbay.jetty.webapp.WebAppContext#420253af{/cruisecontrol,file:/Users/darryl/Downloads/cruisecontrol-bin-2.8.4/webapps/cruisecontrol/}
/dashboard ---> org.mortbay.jetty.webapp.WebAppContext#26c42804{/dashboard,file:/Users/darryl/Downloads/cruisecontrol-bin-2.8.4/webapps/dashboard/}
/documentation ---> org.mortbay.jetty.webapp.WebAppContext#181f327e{/documentation,file:/Users/darryl/Downloads/cruisecontrol-bin-2.8.4/webapps/documentation/}
Related
I just started to study docker.I want to run a site on tomcat in docker.i created Dockerfile.
FROM tomcat
ADD . ./webapps
EXPOSE 1234
CMD ["catalina.sh", "run"]
Ran it and everything loaded.
Step 1/5 : FROM tomcat
---> b0e0b0a92cf9
Step 2/5 : WORKDIR usr/local/tomcat/webapps
---> Running in ab6a23f95955
Removing intermediate container ab6a23f95955
---> 08731620b120
Step 3/5 : COPY . .
---> d6fe62efeaaa
Step 4/5 : EXPOSE 1234
---> Running in 18aadc814230
Removing intermediate container 18aadc814230
---> 445c749cb133
Step 5/5 : CMD ["catalina.sh", "run"]
---> Running in a3869dab8657
Removing intermediate container a3869dab8657
---> 6654588fc0f5
Successfully built 6654588fc0f5
Successfully tagged index:2.0
Existing container found: 2b36189ed9e57f8eaeae366485c1dc27acd4773ec18233e4e7b8c695e293e310,
removing...
Creating container...
Container Id: 3d1ee639b064a0ce0c1c38037ecc4b7f3cada03ffc6058b5fc903acb5e3cc519
Container name: 'my-container-2'
Attaching to container 'my-container-2'...
Starting container 'my-container-2'
'my-container-2 Dockerfile: Dockerfile' has been deployed successfully.
Now I want to open the site in a browser. I write url http://192.168.99.100:1234/index
but i get HTTP Status 404.Why?
It's very embarrassing to admit the decision))
The fact is that when I wrote all this, I did not start the container, so of course it did not work for me.You need to start the container in the console.
The way you describe the error sounds strange.
Your dockerfile shows us the script how a container is built. But you did not show how you ran docker build. Especially I do not see that you reconfigured Tomcat to listen on port 1234 - which means it will still be listening on port 8080. After docker build has run, you have a container image on the disk.
Next you do not show that you created and started a container as you would via docker run. Should I assume now there is no container running, or you have a container running that tries to listen to port 8080 and we do not know on which port it would be accessible (`docker run -p 1234:8080).
Not knowing what is listening on 192.168.99.100:1234 it is hard to say why you should get a HTTP error code 404.
Try to give more information about the commands you launched and their response, and tell us what you expect so we can help better.
Finally I know some people think my response should have been a comment. Try to put that much text into comments...
I have set up jenkins on GKE using the official helm chart.
I have also created an nginx-ingress controller installation using helm and I am able to access jenkins via https://112.222.111.22/jenkins where 112.222.111.22 is the static IP I am passing to the load balancer.
I am also able to create jobs.
However, when I try to spin up inbound remote agent:
â–¶ java -jar agent.jar -noCertificateCheck -jnlpUrl https://112.222.111.22/jenkins/computer/My%20Builder%203/slave-agent.jnlp -secret <some_secret>
...
WARNING: Connect timed out
Feb 28, 2020 5:57:18 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: https://112.222.111.22/jenkins/ provided port:50000 is not reachable
java.io.IOException: https://112.222.111.22/jenkins/ provided port:50000 is not reachable
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:303)
at hudson.remoting.Engine.innerRun(Engine.java:527)
at hudson.remoting.Engine.run(Engine.java:488)
Why is that?
I had similar issue. I have solved it enabling the "Use WebSocket". Jenkins Salve/Agent > Configure > Launch Method > Use WebSocket (enable) > Save.
Might be because port 50000 is not open in the Jenkins master.
You can try to open the port by Creating Inbound rule in Jenkins Master's firewall which allows Port 50000 (coming from other machine in this case Agent, hence Inbound rule).
Try following steps:
Go to Master Jenkins.
Open Wiindows Defender Firewall--> Advance setting --> create Inbound Rule allow port 50000
Note: In 1 inbound rule you can allow more than one port as shown in below.
Restart master Jenkins service.
Check if (step is valid only if you have created windows service on agent) agent service is running continuously.
Check Agent status in Jenkins !
looks like port 50000 is not open in the jenkins master. Try to open the port and restart the machine and instance ( i.e jenkins via url ) and see if it helps.
I have a java application running on an openshift remote cluster and I want to debug the app from my local machine with Intellij-Idea. The app is built by a Jenkinsfile on another remote jenkins server (gradle build, docker build and pushed to openshift, where it is automatically deployed).
The Dockerfile exposes port 9009 and therefore my Intellij Remote Debug Config looks like this:
Debug Config
With the localhost in the Debug Config I need openshift port-forwarding:
oc port-forward my-pod 9009
Forwarding from 127.0.0.1:9009 -> 9009
When I start the Debugger I get the following error in Intellij:
Error running 'DTC Remote Debug':
Unable to open debugger port (localhost:9009): java.net.ConnectException "Connection refused: connect"
At the same time the terminal with the port forwarding shows:
Handling connection for 9009
E0927 09:52:33.711817 5996 portforward.go:331] an error occurred forwarding 9009 -> 9009: error forwarding port 9009 to pod ad370...c010, uid : exit status 1: 2019/09/27 03:52:33 socat[129691] E connect(5, AF=2 127.0.0.1:9009, 16): Connection refused
Doing an Nmap scan against the url where I get the index.html of my application I got the following:
nmap -sS my-openshift-url
Starting Nmap 7.80 ( https://nmap.org ) at 2019-09-27 15:01 Mitteleuropõische Sommerzeit
Nmap scan report for my-openshift-url (IP-Address)
Host is up (0.0043s latency).
rDNS record for IP-Address: dispatch-my-domain
Not shown: 997 filtered ports
PORT STATE SERVICE
80/tcp open http
443/tcp open https
9009/tcp closed pichat
Nmap done: 1 IP address (1 host up) scanned in 6.10 seconds
I guess the problem is the closed 9009 port, but I have no clue how I can open that port on my openshift cluster. I already set several environment variables in the openshift web UI (just to be sure):
DEBUG TRUE
DEBUG true
DEBUGGING TRUE
DEBUGGING true
JAVA_DEBUG TRUE
JAVA_DEBUG true
JAVA_DEBUG_PORT 9009
But I can't get it to work. If I switch the port-forwarding to 8080 I can access the index.html via localhost:8080 from my browser. I don't know if I need to change something in the project code (gradle, docker, jenkins, etc.) or if I can just open the port on the deployed service in openshift somehow...
If anything isn't clear or if I missed something just tell me. I'm happy for every piece of advice.
Regards,
Christoph
Adding the following environment variable in openshift did the trick:
JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,address=9009,server=y,suspend=n
All the other environment variables from above are absolete...
i have tried the webservice example mentioned in the below link.
https://codezone4.wordpress.com/2012/11/08/restful-web-services-java-mysql-and-json/.
i build the application with maven deployed in tomcat then clicked on the webservice link in the chrome , not able to access my code.
Now i tried to debug with postman .
I clicked on my webservice class -> then debug -> debug configiuration
then i selected remote application
there values of host and port are
Host : localhost
Port : 8080
then it is showing establishing connection for long time and after that it is showing Failed to connect to remote vm .connection timedout
Can you please guide me how to make deugger working in eclipse to debug the rest api call.
I can find quick solution (In Windows Environment with local host):
1) Download tomcat in your favorite drive (E.g. d: drive)
2) Open startup.bat file under tomcat/bin folder in notepad
3) Replace following line (Which appear at the end of file)
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
with
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
4) Restart your tomcat as it will start with listening port 8000
5) Open Eclipse->"Run"->"Debug configuration"-> Create "Remote Java Application" and provide following information:
Name: sample-name
Project: your project folder
6) Click on Debug button
Note: Make sure Connection properties will have
Host: localhost
Port: 8000
7) Put debug point in your code
8) Open Postman and Hit sample REST API call as you will see the debug point will appear in your code
That's It!
Quoting from your query,
clicked on my webservice class -> then debug -> debug
The project you created requires the restApplication to be deployed on a running server.
Prior To Testing -> check http://localhost:8080 is up or not, and then publish the war into the server.
choose Debug As-> Debug on Server
I'm deploying a Java app that runs on port 8761, and works fine on localhost.
Although when I push to App Engine flexible environment, I get a HTTP 502 server error.
Here is my app.yaml:
runtime: java
env: flex
service: eureka
runtime_config:
jdk: openjdk8
handlers:
- url: /.*
script: ignore
secure: always
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 2
The log from gcloud is fine, server is running, but my request doesn't seems to hit the app at all.
I noticed that if I run on port 8080, it works. For now, it is not a problem change the default port to 8080, but I would like to understand why I'm not able to run it on 8761
I think you need to use the network settings section in the app.yaml config file:
network:
forwarded_ports:
- 8761/tcp
You might also need to set firewall rules in the Cloud Platform Console.