For example
https://192.168.1.136:8081/ works fine
But if I try to access
https://192.168.1.136/ Error - The site can't be reached.
What are the ways to access it without a port in URL?
Assign port 80 instead of 8081 will work.
Update application.properties in /src/main/resources/ with
server.port=80
Alternatively you may also set server.port as system property using command line option to jvm -Dserver.port=80
Moqui Framework Version : 2.1.3
The Framework runs on the default port 8080 just fine, i would like to change the default ports and i did read https://www.moqui.org/m/docs/framework/Run+and+Deploy#a2.RuntimeDirectoryandMoquiConfigurationXMLFile
which states > "Each of these can be system environment variables (with underscores) or Java properties (with underscores or dots) using the -D command-line argument.
i did find the webapp_ variables are referenced in MoquiDefaultConf.xml as mentioned in the above material and tried using the below start command >
$sudo nohup java -Dwebapp_http_host=localhost -Dwebapp_http_port=9080 -Dwebapp_https_port=9443 -jar moqui.war conf=conf/MoquiDevConf.xml &
However the above command does not seem to change the port, Moqui is still running on default port 8080, What could i be missing?
I also tried the solution to update the webapp tag in MoquiDevConf.xml as mentioned in Running Moqui on Tomcat over SSL (setting http-port and htts-port) - return code 302 with no joy,
Appreciate any pointers, i'm really stuck
The environment variables or Java properties you mention are for setting the ports to use when building URLs. These are the external ports used for accessing your server and if a load balancer or reverse proxy is used may be different from the ports the servlet container is running on. For more information see:
https://moqui.org/m/docs/framework/Run+and+Deploy#EnvironmentVariables
If you are running Moqui with the embedded Jetty server you can specify the port it listens on using the port argument as described in the Executable WAR File section of the Run and Deploy document:
https://moqui.org/m/docs/framework/Run+and+Deploy#a3.ExecutableWARFile
Note that the embedded Jetty server can be used in production but it does not support https and is meant to be used behind a reverse proxy like nginx or Apache httpd that forwards requests to the embedded Jetty server.
If you deploy the WAR file by dropping it in a Servlet Container (ie as an actual WAR file, not treating it as an executable JAR file) then the port configuration would be done with the Servlet Container (Tomcat, Jetty, etc).
I am building an Apache Ignite cluster that uses Static IP Discovery rather than Multicast IP Discovery (its in AWS EC2).
I have configured like so (https://apacheignite.readme.io/docs/cluster-config#static-ip-based-discovery):
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>host1.example.com</value>
<value>host2.example.com</value>
<value>host3.example.com</value>
</list>
</property>
</bean>
</property>
</bean>
</property>
When I start the nodes, I can see the following error:
[15:04:36,385][WARNING][main][TcpDiscoverySpi] Failed to connect to any address from IP finder (make sure IP finder addresses are correct and firewalls are disabled on all host machines): [host1.example.com/10.0.21.223:47501, host2.example.com/10.0.21.207:47501, host3.example.com/10.0.21.191:47501]
From this I can see that Ignite has correctly resolved the hostnames to ip addresses, but it can't connect to form the cluster. These hosts are all in the same subnet in AWS EC2, and I have verified that port 47500 is open between them (I am not sure what the 47501 reference is).
I have also tried used just the ip addresses, rather than the hostnames, but the result is the same.
Am I missing something here?
Please note that Ignite is running as a Docker container on each server. The necessary TCP ports for Ignite are exposed and functional.
Full Log:
[15:55:18,231][INFO][main][IgniteKernal] Config URL: file:/apache-ignite-fabric-1.6.0-bin/config/default-config.xml
[15:55:18,231][INFO][main][IgniteKernal] Daemon mode: off
[15:55:18,231][INFO][main][IgniteKernal] OS: Linux 4.4.19-29.55.amzn1.x86_64 amd64
[15:55:18,231][INFO][main][IgniteKernal] OS user: root
[15:55:18,231][INFO][main][IgniteKernal] Language runtime: Java Platform API Specification ver. 1.8
[15:55:18,232][INFO][main][IgniteKernal] VM information: Java(TM) SE Runtime Environment 1.8.0_131-b11 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.131-b11
[15:55:18,233][INFO][main][IgniteKernal] VM total memory: 3.0GB
[15:55:18,233][INFO][main][IgniteKernal] Remote Management [restart: on, REST: on, JMX (remote: on, port: 49112, auth: off, ssl: off)]
[15:55:18,233][INFO][main][IgniteKernal] IGNITE_HOME=/apache-ignite-fabric-1.6.0-bin
[15:55:18,233][INFO][main][IgniteKernal] VM arguments: [-Xms1g, -Xmx1g, -XX:+AggressiveOpts, -XX:MaxMetaspaceSize=256m, -DIGNITE_QUIET=true, -DIGNITE_SUCCESS_FILE=/apache-ignite-fabric-1.6.0-bin/work/ignite_success_a8723f31-1954-4ea4-b190-762a36088140, -Dcom.sun.management.jmxremote, -Dcom.sun.management.jmxremote.port=49112, -Dcom.sun.management.jmxremote.authenticate=false, -Dcom.sun.management.jmxremote.ssl=false, -DIGNITE_HOME=/apache-ignite-fabric-1.6.0-bin, -DIGNITE_PROG_NAME=/apache-ignite-fabric-1.6.0-bin/bin/ignite.sh, -Xmx3g, -XX:+UseG1GC]
[15:55:18,234][INFO][main][IgniteKernal] Configured caches ['ignite-marshaller-sys-cache', 'ignite-sys-cache', 'ignite-atomics-sys-cache']
[15:55:18,234][WARNING][main][IgniteKernal] Peer class loading is enabled (disable it in production for performance and deployment consistency reasons)
[15:55:18,238][INFO][main][IgniteKernal] 3-rd party licenses can be found at: /apache-ignite-fabric-1.6.0-bin/libs/licenses
[15:55:18,284][INFO][main][IgniteKernal] Non-loopback local IPs: 172.17.0.2, fe80:0:0:0:42:acff:fe11:2%eth0
[15:55:18,284][INFO][main][IgniteKernal] Enabled local MACs: 0242AC110002
[15:55:18,294][INFO][main][IgnitePluginProcessor] Configured plugins:
[15:55:18,295][INFO][main][IgnitePluginProcessor] ^-- None
[15:55:18,295][INFO][main][IgnitePluginProcessor]
[15:55:18,347][INFO][main][TcpCommunicationSpi] IPC shared memory server endpoint started [port=48100, tokDir=/apache-ignite-fabric-1.6.0-bin/work/ipc/shmem/cb41f1a5-d2f5-453d-a1c5-e008c1e12d2a-62]
[15:55:18,348][INFO][main][TcpCommunicationSpi] Successfully bound shared memory communication to TCP port [port=48100, locHost=0.0.0.0/0.0.0.0]
[15:55:18,362][INFO][main][TcpCommunicationSpi] Successfully bound to TCP port [port=47100, locHost=0.0.0.0/0.0.0.0]
[15:55:18,383][WARNING][main][NoopCheckpointSpi] Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
[15:55:18,405][WARNING][main][GridCollisionManager] Collision resolution is disabled (all jobs will be activated upon arrival).
[15:55:18,408][WARNING][main][NoopSwapSpaceSpi] Swap space is disabled. To enable use FileSwapSpaceSpi.
[15:55:18,409][INFO][main][IgniteKernal] Security status [authentication=off, tls/ssl=off]
[15:55:18,652][INFO][main][GridTcpRestProtocol] Command protocol successfully started [name=TCP binary, host=0.0.0.0/0.0.0.0, port=11211]
[15:55:18,719][INFO][main][TcpDiscoverySpi] Successfully bound to TCP port [port=47500, localHost=0.0.0.0/0.0.0.0]
[15:55:21,746][WARNING][main][TcpDiscoverySpi] Failed to connect to any address from IP finder (make sure IP finder addresses are correct and firewalls are disabled on all host machines): [/10.0.21.191:47500, /10.0.21.207:47500, /10.0.21.223:47500]
Default port for ignite is 47500, but in logs as you can see it tries to connect to 47501:
try to specify a port in your address list:
<value>host1.example.com:47500</value>
also checkout this doc: https://apacheignite.readme.io/v2.0/docs/aws-deployment it can be useful in your case.
First of all I would recommend to update Ignite from 1.6 to 1.9.
Second, specify port, as was suggested here.
Run your docker with --net=host, so application inside container will see network interfaces from host. This should help.
Also, it's possible to configure special S3 IpFinder
Inspite of settings in my previous answer if it is not working then it might be because your IP may not be stable.
As per Ignite docs
Node discovery on AWS cloud is usually proven to be more challenging. Amazon EC2, just like most of the other virtual environments, has the following limitations:
Multicast is disabled.
TCP addresses change every time a new image is started.
Although you can use TCP-based discovery in the absence of the Multicast, you still have to deal with constantly changing IP addresses and constantly updating the configuration. This creates a major inconvenience and makes configurations based on static IPs virtually unusable in such environments.
Please refer to this link for Amazon S3 Based Discovery
https://apacheignite.readme.io/v1.1/docs/aws-config#section-amazon-s3-based-discovery
setLocalAddress and setLocalPort on the DiscoverySPI
<!-- Initial local port to listen to. -->
<property name="localPort" value="yourport"/>
<!-- Initial local address for discovery . -->
<property name="localAddress" value="yourhost"/>
<!-- Changing local port range. This is an optional action. -->
<property name="localPortRange" value="20"/>
and use the same port in the Addresslist that you specify on IPFinder.
<bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
<value>yourhost:yourport</value>
<value>otherhost:otherhostport</value>
</list>
</property>
</bean>
Ok all this being done should work with TCPVmIPfinder.
I'm a new technical. My problem is, I have the web application that running on tomcat7. now i want to install and configure mod_jk on windows server to connect apache and tomcat.
Please tell me, how to do that?
Thanks
First of all you must download the correct mod_jk connector binaries depending on your apache httpd version from here:
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/
If your apache is a 2.2 version, choose this:
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.40-windows-i386-httpd-2.2.x.zip
If it is a 2.4, choose one of them depending if you prefer 64 or 32 bit version:
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.40-windows-i386-httpd-2.4.x.zip
http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.40-windows-x86_64-httpd-2.4.x.zip
Download and unzip correct one. Then, extract mod_jk.so from the zip and place it in your apache httpd modules folder, typically [APACHE_HOME]/modules
Once done it, you must create a workers.properties file, typically in apache conf directory or any other inside it (conf.d, extra, etc).
Usually workers.properties file has following content:
worker.list=worker1,jkstatus
#Set properties for worker19 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.ping_timeout=1000
worker.worker1.connect_timeout=10000
worker.worker1.prepost_timeout=10000
worker.worker1.socket_timeout=10
worker.worker1.connection_pool_timeout=60
worker.worker1.connection_pool_size=90
worker.worker1.retries=2
worker.worker1.reply_timeout=300000
# status worker
worker.jkstatus.type=status
You must check that worker.worker1.host and worker.worker1.port have correct values to reach your tomcat's ajp connector. 8009 port is the commonly used, but better check that in your tomcat's server.xml and set the correct one in workers.properties.
Then, in httpd.conf or any other external conf file, add the following:
# Load mod_jk module
LoadModule jk_module modules/tomcat-connector/mod_jk.so
# Add the module (activate this lne for Apache 1.3)
# AddModule mod_jk.c
# Where to find workers.properties
JkWorkersFile conf/extra/workers.properties # Check the path is correct to your workers.properties
# Where to put jk shared memory
JkShmFile logs/mod_jk.shm
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
Once done this, you could try restarting Apache httpd to see if everything already done is correct. If apache starts correctly, now you can start planning how you would redirect matching requests from httpd to tomcat. The easiest way is to redirect every request which matches the context path of your Tomcat webapp.
If your application listens in http://localhost:8080/app-context/ then you could simply add this in httpd.conf or the file where you set the load_module sentences, just after JKLogLevel:
JkMount /app-context/* worker1
Note here that worker1 must match the name you gave to the worker in workers.properties file.
Now, just restart apache httpd, make sure that Tomcat is running and then try in a browser next url:
http://localhost/app-context/
And if you reach your Tomcat webapp, everything is done.
I have a weblogic cluster set up across two machines in a staging environment. I'd like to set up JPDA on at least one of the weblogic instances so I can debug remotely. Generally I use wlst.sh and jython scripts to startup the cluster via:
startNodeManager(...)
nmConnect(...)
nmStart(MyAdminServer)
connect(...) #connect to the admin server
start(...) #start the cluster
Where should I put the -Xdebug Xrunjdwp:transport... incantation so that I can attach to one of the weblogic instances? I had no problem setting this up on a single instance through my domain's startWebLogic.sh, but it doesn't seem to work with the cluster.
From here: https://forums.oracle.com/forums/thread.jspa?threadID=2233816 it looks like I want to put the debug string in startManagedWeblogic.sh but that doesn't seem to work with my jython script either.
Figured it out, from http://docs.oracle.com/cd/E13222_01/wls/docs90/server_start/nodemgr.html#1081870:
4. The Administration Server obtains the domain configuration from its config directory
I checked out the config directory under my domain and there was a suspicious file called config.xml. Within this file is the configuration for the weblogic nodes and where you want to put your JDPA config:
<server>
<name>my-target-machine</name>
...
<server-start>
...
<arguments>(your other config stuff) -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n</arguments>