Hudson: HTTP listener already in use error - windows

I'm trying to setup Hudson on a Windows server.
When I attempt to run Hudson with the command java -jar hudson.war, then I receive an error that the address is already in use for the HTTP listener.
I've confirmed that port 8080 (the default Hudson HTTP port) is not being used. I have also tried starting Hudson on another port (java -jar hudson.war --httpPort=8888) with the same error.
If I browse to http://localhost:8080, then I get an 'It works!' message on the web page. However, if I browse to http://localhost:8080/hudson, I receive a 404 error.
Here is log:
D:\hudson>java -jar hudson.war
Running from: D:\hudson\hudson.war
[Winstone 2010/10/27 11:07:47] - Beginning extraction from war file
hudson home directory: C:\Documents and Settings\scottk\.hudson
[Winstone 2010/10/27 11:07:54] - Error during HTTP listener init or shutdown
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at winstone.HttpListener.getServerSocket(HttpListener.java:102)
at winstone.HttpListener.run(HttpListener.java:116)
at java.lang.Thread.run(Unknown Source)
[Winstone 2010/10/27 11:07:54] - HTTP Listener shutdown successfully
[Winstone 2010/10/27 11:07:54] - AJP13 Listener started: port=8009
Using one-time self-signed certificate
[Winstone 2010/10/27 11:07:54] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
Oct 27, 2010 11:07:55 AM hudson.model.Hudson$4 onAttained
INFO: Started initialization
Oct 27, 2010 11:07:56 AM hudson.model.Hudson$4 onAttained
INFO: Listed all plugins
Oct 27, 2010 11:07:56 AM hudson.model.Hudson$4 onAttained
INFO: Prepared all plugins
Oct 27, 2010 11:07:56 AM hudson.model.Hudson$4 onAttained
INFO: Started all plugins
Oct 27, 2010 11:07:57 AM hudson.model.Hudson$4 onAttained
INFO: Loaded all jobs
Oct 27, 2010 11:08:01 AM hudson.model.Hudson$4 onAttained
INFO: Completed initialization
Oct 27, 2010 11:08:01 AM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 1162
Port 8080 is not being used:
D:\>netstat -o
Active Connections
Proto Local Address Foreign Address State PID
TCP dev1:1038 dev1.GCCU.local:15003 ESTABLISHED 1668
TCP dev1:1142 dev1.GCCU.local:1143 ESTABLISHED 1668
TCP dev1:1143 dev1.GCCU.local:1142 ESTABLISHED 1668
TCP dev1:1144 dev1.GCCU.local:1145 ESTABLISHED 1668
TCP dev1:1145 dev1.GCCU.local:1144 ESTABLISHED 1668
TCP dev1:15003 dev1.GCCU.local:1038 ESTABLISHED 1316
TCP dev1:1081 172.16.1.7:1000 ESTABLISHED 2100
TCP dev1:1127 app1.gccu.local:netbios-ssn ESTABLISHED 4
TCP dev1:1129 gccufs1.gccu.local:microsoft-ds ESTABLISHED 4
TCP dev1:1138 sql1.gccu.local:netbios-ssn ESTABLISHED 4
TCP dev1:1167 dc2.gccu.local:microsoft-ds TIME_WAIT 0
TCP dev1:ms-wbt-server devpc1.gccu.local:54699 ESTABLISHED 2916

I downloaded the latest .war file from http://hudson-ci.org/download/war/, specified port 8888 instead of 8080, and now it works. Looks like there must be something running on port 8080 and the version that I had tried to use earlier than 1.381 had an issue.

Related

WebLogic Server 12c cant log in localhost Exception weblogic.nodemanager.NMConnectException: Connection refused

I use a Oracle WebLogic Server 12c and when I start it on Eclipse it shows this error, it does'nt allow me to log in localhost neither when I try to access it
from another computer in a different domain, in the log appears that the server is not reacheable.
This is the exception that appears in Eclipse.
This Exception occurred at Wed Nov 13 08:11:07 CET 2019.
weblogic.nodemanager.NMConnectException: Connection refused: connect. Could not connect to NodeManager. Check that it is running at localhost/127.0.0.1:5556.
Problem invoking WLST - Traceback (innermost last):
File "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\scripts_manejados\StartBT.wlst", line 1, in ?
File "<iostream>", line 111, in nmConnect
File "<iostream>", line 552, in raiseWLSTException
WLSTException: Error occurred while performing nmConnect : Cannot connect to Node Manager. : Connection refused: connect. Could not connect to NodeManager. Check that it is running at localhost/127.0.0.1:5545.
This is my nodemanager properties:
#Tue Nov 12 09:45:58 CET 2019
#Node manager properties
#Fri Jun 24 14:55:43 CEST 2016
DomainsFile=C\:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain\\nodemanager\\nodemanager.domains
LogLimit=0
PropertiesVersion=12.1.3
AuthenticationEnabled=true
NodeManagerHome=C\:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain\\nodemanager
JavaHome=C\:\\Program Files\\Java\\jdk1.7.0_75
LogLevel=INFO
DomainsFileEnabled=true
StartScriptName=startWebLogic.cmd
ListenAddress=localhost
NativeVersionEnabled=true
ListenPort=5540
LogToStderr=true
SecureListener=false
LogCount=1
StopScriptEnabled=false
QuitEnabled=false
LogAppend=true
StateCheckInterval=500
CrashRecoveryEnabled=false
StartScriptEnabled=true
LogFile=C\:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain\\nodemanager\\nodemanager.log
LogFormatter=weblogic.nodemanager.server.LogFormatter
ListenBacklog=50
And this is my StartBt script file, used to start the server and specify some preferences:
nmConnect('weblogic','AXLWL20040','localhost','5521','base_domain','C:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain','plain')
nmStart('AdminServer')
nmDisconnect()
I want to make it accesible, not only for local.
nmConnect('weblogic','AXLWL20040','localhost',**'5521'**,'base_domain','C:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain','plain')
Port should listen to 5545.
You wrongly configure the ports. Your NodeManager listen on port 5540
ListenPort=5540
You try to connect to 5545
WLSTException:..Could not connect to NodeManager. Check that it is running at localhost/127.0.0.1:5545

Shiny's websockets don't work on port 80 of an AWS EC2 instance

I have set up a licensed Shiny Server Pro on an AWS server. It seems to work basically, but I would like to change the default port from 3838 to 80, and this causes me grief, probably because port 80 doesn't handle the websockets as I expect.
So after installation the server dutifully delivers the default welcome.html page with the two embedded apps hello and rmd and everything works as expected. Bus as soon as I change the port in /etc/shiny-server/shiny-server.conf from 3838 to 80, the two embedded apps won't work anymore. They seem to load, but immediately after loading they are greyed out and a message is displayed on top "Disconnected from the Server / Reload".
I now believe that this is caused by the choice of port 80. The AWS instance's security group has a "Custom TCP rule" on port 3838 and allows all incoming traffic on this port. OTOH, port 80 is of type "HTTP" and I seem to be unable to change this to a "Custom TCP rule" (which makes sense, sort of).
When configuring the Shiny server for port 80 and looking at Chrome's dev console after loading the demo page I see websockets appear on the network tab, when the page is fully loaded. However, they're there only for a few milliseconds. Conversely, when using port 3838, the same websockets are persistent and are not terminated.
At the same time, when using port 80, a message appears on the console tab that the connection has been terminated:
Thu Mar 09 2017 08:47:46 [INF]: Connection opened. http://10.43.190.69/sample-apps/rmd/
Thu Mar 09 2017 08:47:46 [DBG]: Open channel 0
Thu Mar 09 2017 08:47:46 [INF]: Connection closed. Info:{"type":"close","code":4705,"reason":"Unable to open connection","wasClean":true}
Thu Mar 09 2017 08:47:46 [DBG]: SockJS connection closed
This message is absent when using port 3838:
Thu Mar 09 2017 09:09:28 [INF]: Connection opened. http://10.43.190.69:3838/sample-apps/hello/
Thu Mar 09 2017 09:09:28 [DBG]: Open channel 0
Thu Mar 09 2017 09:09:28 [INF]: Connection opened. http://10.43.190.69:3838/sample-apps/rmd/
Thu Mar 09 2017 09:09:28 [DBG]: Open channel 0
Thu Mar 09 2017 09:09:30 [DBG]: Open channel 1
Thu Mar 09 2017 09:09:30 [DBG]: 2 message(s) discarded from buffer
Thu Mar 09 2017 09:09:30 [DBG]: 4 message(s) discarded from buffer
To circumvent this problem I have also tried using nginx and apache2 as a reverse proxy, with very similar results, so I tried to use port 80 without a proxy in the first place.
Edit: netstat output when shiny server on port 3838 (all good):
/home/ubuntu# netstat -tlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:ssh *:* LISTEN 1451/sshd
tcp 0 0 *:4151 *:* LISTEN 6996/shiny-server
tcp 0 0 *:3838 *:* LISTEN 6996/shiny-server
tcp6 0 0 [::]:ssh [::]:* LISTEN 1451/sshd
netstat output when Shiny server on port 80 (embedded apps not working, no websockets):
/home/ubuntu# netstat -tlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:http *:* LISTEN 11116/shiny-server
tcp 0 0 *:ssh *:* LISTEN 1451/sshd
tcp 0 0 *:4151 *:* LISTEN 11116/shiny-server
tcp6 0 0 [::]:ssh [::]:* LISTEN 1451/sshd
So I believe nothing else is listening on port 80.
Can anyone give a hint?
Cheers,
Enno

Unable to access Couldera Manager 5 web console after installation

I am setting up a hadoop cluster(2.6) on CentOS 7 machine with three nodes, cluster is running fine now. However, I am not able to access the Cloudera manager(5.6) web console after completing the CM installation though its services seems to be running.
Below are my findings, please help me what could be the possible reasons:
All process are up and running !
[root#vm-txxxxxx1 ~]# jps
27978 ResourceManager
15368 Main
27052 Jps
27400 DataNode
27639 SecondaryNameNode
28106 NodeManager
27258 NameNode
Firewall stopped
[root#vm-txxxxx1 ~]# service iptables stop
Redirecting to /bin/systemctl stop iptables.service
[root#vm-txxxxxx1 ~]# service iptabes status
Redirecting to /bin/systemctl status iptabes.service
iptabes.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Mar 24 19:24:05 vm-txxxxx1 systemd[1]: Stopped IPv4 firewall with iptables.
Listening on port 7180 and tested the same locally
[root#vm-txxxxxx1 ~]# netstat -tulpn | grep 7180
tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN 15368/java
[root#vm-txxxxx1 ~]# telnet localhost 7180
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SELINUX Disabled:
[root#vm-txxxxxx1 ~]# getenforce
Disabled
Hostfile entries
[root#vm-txxxxxx1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4
172.16.xx.x1 vm-txxxxxx1
172.16.xx.x2 vm-xxxxxxx2
172.16.xx.x4 del1-vm-poc04
Verify if Cloudera Manager is running:
[root#vm-txxxxxx1 ~]# service cloudera-scm-server status
cloudera-scm-server.service - LSB: Cloudera SCM Server
Loaded: loaded (/etc/rc.d/init.d/cloudera-scm-server)
Active: active (exited) since Tue 2016-03-22 17:09:55 IST; 2 days ago
Process: 15344 ExecStart=/etc/rc.d/init.d/cloudera-scm-server start (code=exited, status=0/SUCCESS)
Mar 22 17:09:50 vm-txxxxxx1 systemd[1]: Starting LSB: Cloudera SCM Server...
Mar 22 17:09:50 vm-txxxxx1 su[15366]: (to cloudera-scm) root on none
Mar 22 17:09:55 vm-txxxxxx1 cloudera-scm-server[15344]: Starting cloudera-scm-server:...]
Mar 22 17:09:55 vm-txxxxxx1 systemd[1]: Started LSB: Cloudera SCM Server.
Hint: Some lines were ellipsized, use -l to show in full.
Below are the lines from Cloudera servers logs
[root#vm-txxxxx1 ~]# tail -f /var/log/cloudera-scm-server/cloudera-scm-server.log
2016-03-24 18:21:00,398 INFO StaleEntityEviction:com.cloudera.server.cmf.StaleEntityEvictionThread: Reaped total of 0 deleted commands
2016-03-24 18:21:00,400 INFO StaleEntityEviction:com.cloudera.server.cmf.StaleEntityEvictionThread: Found no commands older than 2014-03-25T12:51:00.399Z to reap.
2016-03-24 18:21:00,400 INFO StaleEntityEviction:com.cloudera.server.cmf.StaleEntityEvictionThread: Wizard is active, not reaping scanners or configurators
I am accessing the Cloudera Manager page http://172.16.xx.1x:7180
at the end it says "The connection has timeout", it looks like my http request is not able to reach out to the server, that's why nothing comes up in the logs. Please suggest if I am missing something.
Thanks in advance!
#Havnar: Thanks for the suggestion, I am confirming SSL is not enabled now
and sharing the curl result.
[root#vm-txxxx1 ~]# curl -i -u 'admin:admin' http://localhost:7180/api/v1/tools/echo
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Set-Cookie: CLOUDERA_MANAGER_SESSIONID=1etaj5o42vprlndf43ua7rbaf;Path=/;HttpOnly
Content-Type: application/json
Date: Fri, 25 Mar 2016 05:50:36 GMT
Transfer-Encoding: chunked
Server: Jetty(6.1.26.cloudera.4)
{
"message" : "Hello, World!"
I tried stop and restarted the cloudera service, nothing find suspicious, there was one warning which is looking little bit suspicious, search them google, nothing looks relevant.
[root#vm-txxxxx1 ~]# vi /var/log/cloudera-scm-server/cloudera-scm-server.log
2016-03-24 20:22:29,002 WARN main:org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory: HHH020003: Could not find a specific ehcache configuration for cache named [org.hibernate.cache.internal.StandardQueryCache]; using defaults.
2016-03-24 20:22:28,581 INFO main:org.hibernate.engine.jdbc.internal.LobCreatorBuilder: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
#Havnar : I didn't get what do you meant by "try a cat on the machine running the CM", let me know if anything else need to be checked.
Thanks

default virtualhost overlap on port 19000. Oracle OHS server failed to start

I am working on enable ssl for Oralce EPM11121 OHS server.
While after configuration, want to restart the OHS server. Found it can not be start and got below error message from ohs_component.log
[2015-08-26T11:13:51.3062+08:00] [OHS] [INCIDENT_ERROR:32] [OHS-9999] [worker.c] [host_id: vmhkhypirdv1] [host_addr: 172.23.18.212] [pid: 21253] [tid: 47937310527456] [user: hyperion] [VirtualHost: main] (98)Address already in use: make_sock: could not bind to address 0.0.0.0:19000
[2015-08-26T11:13:51.3063+08:00] [OHS] [INCIDENT_ERROR:20] [OHS-9999] [worker.c] [host_id: vmhkhypirdv1] [host_addr: 172.23.18.212] [pid: 21253] [tid: 47937310527456] [user: hyperion] [VirtualHost: main] no listening sockets available, shutting down
[2015-08-26T11:13:51.3063+08:00] [OHS] [ERROR:32] [OHS-9999] [core.c] [host_id: vmhkhypirdv1] [host_addr: 172.23.18.212] [pid: 21253] [tid: 47937310527456] [user: hyperion] [VirtualHost: main] Unable to open logs
And OHS server failed to start. console~OHS~1.log have below error message
[Wed Aug 26 11:13:51 2015] [crit] (20014)Internal error: WL SSL Init failed for server: (null) on 0
[Wed Aug 26 11:13:51 2015] [warn] _default_ VirtualHost overlap on port 19000, the first has precedence
[Wed Aug 26 11:13:51 2015] [warn] Errors will be logged into /u01/app/Middleware/user_projects/epmsystem1/httpConfig/ohs/diagnostics/logs/OHS/ohs_component/ohs_component.log
Anyone know how to find the overlap one listen 19000? And make OHS server can be startup?
I already tried >lsof -i :19000 but it returns nothing. Any other method that can find the configuration might listen to 19000?
Finally find out where the wrong configuration.
I carelessly commented out 'Listen 19000' in file {EPM_ORALCE_INSTANCE}/httpConfig/ohs/config/OHS/ohs_component/ssl.conf
Should comment Listen.
# OHS Listen Port
# Listen 19000

Handshaking not happening between master and slave in jenkins

How to solve this error? Error occurred since I make master ip to public and assign DNS.
Jul 27, 2012 12:44:17 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Hudson agent is running in headless mode.
Jul 27, 2012 12:44:17 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://10.10.1.162:8080/jenkins/, http://dem
Jul 27, 2012 12:44:38 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to demo.sigmainfo.in:8050
Jul 27, 2012 12:44:38 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Jul 27, 2012 12:44:58 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: The server rejected the connection:
java.lang.Exception: The server rejected the connection:
at hudson.remoting.Engine.onConnectionRejected(Engine.java:258)
at hudson.remoting.Engine.run(Engine.java:233)
I have seen so many thread regarding this, but didn't get any answer properly.
I connected using headless slave agent and put HOST:PORT in advanced setting of configuration of slave. Master is linux and slave is windows 7.
From Comments:
=================================
Since you are having problems with the public IP & DNS, can you make sure that routing for the public IP and DNS is allowed on your network. Just to be sure this is not a firewall issue. Are you on a corporate network? In that case, your corporate firewall may be blocking certain ports on all IP addresses.

Resources