Can mmonit be run on a port other than 8080? - monit

I have another service phpmyadmin running at the port 8080. So when I start mmonit, it doesnt start and it gives this error in error log:
Creating a serversocket at port 8080 -- Address already in use raised in ServerSocket_new at src/net/ServerSocket.c:58
Is it possible to run mmonit at some other port?

In your mmonit config file include a line such as this. There should already be one there, just change the port number:
<Connector address="xxx.xxx.xxx.xxx" port="8081" processors="10" />

Yeah you can run mmonit on another port. In the mmonit config file located here conf/server.xml, you can change the port like this (to listen on 8880)
<Connector address="*" port="8880" processors="10" />
Then restart mmonit

Related

How can I browse my Tomcat localhost from another computer on the network? and how to run Selenium Script on another Computer?

I am trying to access my tomcat LocalHost on another Computer and while accessing it I want my Selenium Script to be run on Another computer .Please Help me regarding this.
(While Running my Selenium code my browser is running on Tomcat Localhost Computer)
By default I think tomcat starts in 0.0.0.0:80
So it is internet address , you can access the server using network ip from another system in the same network
Eg if network ip is 192.168.1.1 , you can access from another system which has ip 192.168.1.2 , as 192.168.1.1:80
( You can see your ip address by typing ifconfig and ipconfig in linux and windows respectively)
Else edit the ip address using config file and bind the server to your 192.168.1.1 ip
Several connectors are configured, and each connector has an optional "address" attribute where you can set the IP address.
Edit tomcat/conf/server.xml.
Specify a bind address for that connector:
<Connector
port="80"
protocol="HTTP/1.1"
address=""
connectionTimeout="20000"
redirectPort="8443"
/>

cKan Failed installation on restarting Apache service

I have installed ckan from this tutorial http://docs.ckan.org/en/latest/maintaining/installing/install-from-package.html
until I came to part 4. Restart Apache and Nginx, I run "sudo service apache2 restart" and got this error:
Restarting web server apache2 (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
Can anyone help me with this out.
Regards,
Sounay
You're telling Apache to serve on port 8080 but get error 'Address already in use'. Sounds like you are running another server on your machine - port 8080 is a pretty common port to use for web apps.
You can see what is running on port 8080 like this:
sudo netstat -plnt | grep :8080
Now you need to move a server to another port number (e.g. 8081) - either the service you discover, or ckan.
To change CKAN's port, edit ckan's apache & nginx config files and replace '8080' everywhere with the new port number.

Suddenly, my server is down without any conf or something

I did not do anything on my server (vps account on linode.com) such as configuration or something. But, suddenly my server is down. When i try to start apache, i saw this error message:
(
Starting web server: apache2(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
failed!
)
I did try to start apache with some way and i face now "Starting web server: apache2 failed!"
Thanks for your help,
Erman
This probably means another server (probably apache itself) is running on same port. If you have shell access to server, try to determine which process is using port 80. (netstat --listen perhaps, do some google) and then kill the process by kill command.
Have you tried linode.com support? This is probably your best bet.
You could also try restarting all of your services (not just Apache, but everything that is available to you to restart).

Running tomcat from another connected pc

I want to test some pages on several machine.
I have tomcat running on one pc lets say PC1 and several pc are connected to PC1. I want other pc to load the one page from PC1. I have tried some alternatives but it is not working
Does anyone know about this??
Thanks
Troubleshooting
From PCX try pinging PC 1: ping PC1
If that succeeds try doing telnet to Tomcat port (default 8080): telnet PC1 8080
That's probably where it will fail, refusing to connect to 8080.
Alternative 1
You have a Firewall blocking the the other PC to access Tomcat port (default 8080).
Alternative 2
Tomcat is binded to localhost only, and you can't access it from another host.
Look for the tomcat/conf/server.xml file and look for some text like:
<Connector
port="8080"
protocol="HTTP/1.1"
address="127.0.0.1"
...
If you find the address attribute, remove it and it should bind to every ip address.

Apache installation on Windows 7

I am a newbie with Apache. I am learning .. after the installation when I tried to start the service I got the following errors.
The Apache service named reported the following error:
Unable to open logs .
The Apache service named reported the following error:
no listening sockets available, shutting down .
The Apache service named reported the following error:
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 .
The Apache service named reported the following error:
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.6 for ServerName .
The following error usually means that some other program is listening on the HTTP port (80).
(OS 10048)Only one usage of each
socket address (protocol/network
address/port) is normally permitted. :
make_sock: could not bind to address
0.0.0.0:80 .
In my experience, IM (chat) clients like to connect to port 80.
From a command prompt, (cmd.exe) run the command:
netstat -an
See if there is a listener on port 80 (Look for a line that says:
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
=== ====
the important thing being TCP and 80. If you find something, you'll need to track it down using something like TcpView
If Skype is your problem and it seems it usually is, alter Skype's port usage.
Click on Tools in Skype,
click on Options,
click Advanced,
click Connections.
In Connection is the option to use another port, I use a high numbered port such as 65432, then un-click the alternative use of port 80 and 443.
Close and restart Skype.
modifying C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd sloved the problem.
If you had installation problems, note that you might experience some errors such “ no services installed ”
if Apache is trying to share port 80 with another web server or application, such as a locally installed
firewall application. To fix this, you can tell Apache to use a different port. Open your httpd.conf file
in the conf subdirectory ( C:\Program Files\Apache Software Foundation\Apache2.2\conf by
default) and locate the following lines:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the < VirtualHost >
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
Change the last line of this block to read:
Listen 8080
skype uses port 80, try logout and shut down the program...
now run apache
if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.
Changing in the config file every occurrence of the path to apache (eg: "C:/Users/xxxx/Desktop/Apache Software Foundation/") to the new location (in case you shifted directory of apache installation by copy paste) solved my problem. Hope it helps you too..
Please note that, not only http port 80, may your ssl port 443 is being used by any other service or software.
I have installed vmware workstation on my PC, so a process which was initiated by Vmware Workstation was using ssl port 443.
In my case, it was vmware-hostd.exe which was utilizing ssl port 443.
Try shutting down vmware-hostd.exe or simply change your ssl-httpd.conf and modify Listen from 443 to 8080 or something else.
While choosing the port number please be sure that you don't enter any port which can be used by any other software on your PC.
just provide the listen address and port in httpd.conf file. that will not show IP related error as
Listen IP_ADDRESS:PORT
If you change port ( not port 80) then port conflict will not occur and server comes up.
Below blog may help you :-
http://apache2-4-9-webserver-installation.blogspot.com/2014/06/how-to-install-apache-http-server.html
Port 80 conflict. There are a number of well-known Windows programs which use
port 80:
IIS
The most likely culprit is Microsoft Internet Information Server. Stop the
service with the command from the command line on Windows 7/Vista:
net stop was /y
If needed start the services again with the command from the command line on
windows /Vista:
net start was /y