Worklight Server V6.0 fails when IPv6 is enabled - ibm-mobilefirst

The Known Limitations for Worklight Server 6.2 document gives the following workaround in the last section, Command Line Interface for IBM Worklight Developers fails when IPv6 is enabled.
Open the directory for the Worklight Server, which is /[USER_HOME]/.worklight/.
Move to the directory for the default server, which is /6.2.0/server/wlp/usr/servers/worklight/.
Edit the jvm.options file that is located inside the opened directory.
Add the following option to the end of this file: -Djava.net.preferIPv4Stack=true
Save and close the file.
Start or run the Worklight Server to verify that the problem is fixed.
Does this workaround also apply to earlier versions of Worklight such as 6.0 or 6.1?

It appears that Java 7 attempts to use IPv6 so to make sure the Worklight Server to start with an IPv4 address you have to update your jvm.options file with the following:
-Djava.net.preferIPv4Stack=true
So yes, the workaround http://www-01.ibm.com/support/knowledgecenter/api/content/SSZH4A_6.2.0/com.ibm.worklight.getstart.doc/start/c_known_limitations.html?locale=en will work on previous versions.

Related

XAMPP tomcat service is not starting with error as "Tomcat Started/Stopped with errors, return code: 1"

I have installed XAMPP 7.2.10 on my Win 10 and other services like Apache and MySQL are working fine.
But the Tomcat service is not starting and is throwing an error as:
"Tomcat Started/Stopped with errors, return code: 1,
Make sure you have Java JDK or JRE installed and the required ports are free,
Check the "/xampp/tomcat/logs" folder for more information"
XAMPP Tomcat error image
I have installed Java JDK in "C:\Program Files\Java" and have set the environment variables path.
I have set the "JAVA_HOME" variable path as "C:\Program Files\Java\jdk-10.0.2"
Also, no other program is using the required ports.
When I run the "catalina_start.bat", I get error as:
"ERROR: The system was unable to find the specified registry key or value.
. [XAMPP]: Cannot find current JDK installation!
. [XAMPP]: Cannot set JAVA_HOME. Aborting ..."
What mistakes have I made here?
I had the same problem (XAMPP 7.3.0 / Windows Server 2016 / Java 11). I first checked the environment variables, the java installation - all seemed to be fine.
Sadly the XAMPP error message is not very meaningful, so i looked inside of tomcat installation. To my surprise XAMPP 7.3.0 uses a very old version of Apache Tomcat (7.0.56 from 2014!), that don’t work well with Java 9+. The reason is Tomcat 7.0.56 uses the "-Djava.endorsed.dirs" option, that is no longer supported in Java 9+. Up-to-date Tomcat versions have no problem with java 9+. To solve this you can just stay with Java 8 (if possible for you) or try to fix this on your own by modify Tomcat start-up: Go to your \xampp\tomcat\ folder and see this fix in Tomcat 7.0.73 doesn't work with java 9.
But i would recommend you to install a up-to-date version of tomcat and don’t use the XAMPP one (what i finally did) - at least until XAMPP updates there tomcat version .

Apache Tomcat 8.5 . Error: Service terminated with service specific error incorrect function

i have installed apache tomcat 8.5 one month ago with java 1.8 on Windows Server 2008 and it works ok.
now the service is stopped and i'm not able to restart it from apache configuration or Windows Services . It is always stopped.
i got the following error: "service terminated with service specific error incorrect function".
ther error in Windows Event viewer does not saying nothing more:
even its details tab:
What can i do?
I was trying to install Apache Tomcat/8.5.31 as Windows service and i was also facing the same error.
For me what finally worked was following these steps. Go to Tomcat installation directory's bin folder. You will see two EXEs (tomcat8.exe and tomcat8w.exe). tomcat8w.exe is a GUI application for monitoring and configuring Tomcat services. Double-click it and then go to Java tab
1) Enable the check box for Use default
2) In Java Classpath: section, specify the path to bootstrap.jar and tomcat-juli.jar. These should be present in your tomcat installation's bin directory itself:
<path_to_tomcat_installation>\bin\bootstrap.jar;<path_to_tomcat_installation>\bin\tomcat-juli.jar
To get more help, you may check the log at the following location provided you installed your Tomcat as Windows service using default LogPath option as described in the documentation: %SystemRoot%\System32\LogFiles\Apache
UPDATE: In another recent installation, i noticed that despite having configuration settings exactly similar to another working setup, i was still getting Incorrect function error under System log in Event Viewer. This time, i had to uncheck the Use default option and had to explicitly provide path to jvm.dll as shown below:
Java Classpath setting was still required as explained above.
Currently I have a Windows Server 2012 R2 Datacenter running Tomcat 9 & had the same problem. This happened after I ran Windows updates & restarted the Server.
Error messages below. (The blanked out text is my private data.)
Error showed when attempting to start the service.
Error in System Event Log
The following steps fixed the issue...
Navigate to your tomcat9w.exe Location: \Tomcat9\bin\
Right click your tomcat9w.exe and select Run as administrator.
Select the Java tab. Select Use default, Apply, & OK
Start your service.
Note: I unchecked the "Use default" box after I was able to get the service running correctly. Because I wanted to retain my existing configuration. Going forward the service has continued to work correctly.
Hope this helps!
I was also facing some issue with Tomcat 9 and Java 13 (tried all previously mentioned solutions but nothing worked). When I downgraded it to Java 11 and Pointed the jvm.dll from JDK 11 my issue got fixed (or Use Default if JAVA_HOME is set to Java 11).
In my case the only way I could get it to work, was to go to the "Startup" tab and change "Mode" from "JVM" to "Java". After that, it started fine and was able to confirm that by visiting the localhost.
(Definitely not an expert)
I fixed this issue by (re)installing Java. I was using the Java SDK downloaded by IntelliJ. Although I was able to direct Tomcat to that download during installation, it returned this "error service terminated" message at runtime. Instead I installed Java SDK directly from Oracle, Tomcat found the installation immediately during installation (I didn't need to point it), and this error disappeared.
It's possible the Java installation by IntelliJ was incomplete somehow and is the underlying cause of the problem, but I am definitely not an expert.
I fixed the issue by reinstalling Tomcat:
Search the Command Prompt icon
Right-click on it
Select Run as administrator
Change the folder to the bin folder of Tomcat
Execute appserver uninstall
Execute appserver install
It solved my problem.
I followed the below steps to fix the the above issue. it may help if someone still face the same.
Step 1. opened the installation directory : tomcat9w.exe Location: \Tomcat9\bin\
Step 2. Browsed the Jvm.dll path under "Java Tab" in Tomcat where it has installed
Step 3. Run the service but still faced same.
Step 4. then, Opened ""C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\bin>startup.bat --> entered.
Finally it got fixed .

mobile first platform cli: mfp build... does not create a war file

My setup
MobileFrist Platform foundation 6.3.0.00-20141127-1357
WebSphere Application Server 8.5.5.0 (1.0.3.20130510-0831)
on Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_75-b13 (en_US)
hosted on softlayer
Installed using this knowledge center guide for 6.3
after starting the server I can visit my appcenterconsole fine.
I have 2 issues now that I can't seem to understand:
Firstly, tried to build the Myproject.war file using MFP cli to deploy the server configuration tool. However Mfp build produced all the .wlapps but no war file. Can I build a .war file using mfp build?
Secondly, built the .war file using eclipse on my local machine tried to deploy it using the server config tool and I end up with no runtime found like in the post
So I checked my java version that was fine,
checked app center version seems fine,
and checked the entries in server.xml for duplicates of WL Admin services war, only one exists.
server.xml http://pastebin.com/gXqfVknb
logs too long and paste bin counts as en extra link limited to 2 will post link to logs as comment
Use mfp bd (build & deploy) instead of just build.
It will start a test server to generate the WAR file.

IBM Worklight 6.2. Start eclipse test environment server from command line

If I'm not wrong with each new workspace a new "instance" of Liberty is configured in the folder "WorklightServerConfig" of the workspace.
Is it possible to start the worklight server from command line using those configuration files?
I have not been able to get the right "server start" command.
Thank you.
According to the documentation, you can use wl start to start the server and wl stop to stop it.
If you have installed Worklight Studio, you can also use the Liberty server command directly:
cd WL_STUDIO_INSTALL_DIR/plugins/com.worklight.studio.plugin_*/liberty/wlp/bin
Set the environment variable WLP_USER_DIR to the value defined in the file ../etc/server.env (it may be commented out).
Run the server command with arguments start worklight.
On Unix: env WLP_USER_DIR=ECLIPSE_WORKSPACE/WorklightServerConfig ./server start worklight
On Windows: set WLP_USER_DIR=ECLIPSE_WORKSPACE/WorklightServerConfig
server start worklight

Can't launch JBoss7 from Eclipse Indigo

I can't figure out where I am going wrong. I have Eclipse Indigo, JBoss 7.1, JBoss Tools installed. I have this configuration working on my Windows7 64-bit system. I am attempting to set up a co-worker's Windows XP 32-bit machine with the same configuration but am not able to get the server to launch. I have configured the server but when I attempt to start the server, I get an error indicating that it was unable to start the server but there is no specific error listed.
I am able to start JBoss from the command prompt using the standalone.bat file.
I am able to configure the standalone.xml file from within Eclipse. I have confirmed this by checking the file in the standalone/configuration directory.
When I attempt to publish the project from within Eclipse, it does not publish.
Nothing gets written to server.log
The startup parameters match what I have on my computer.
I can't figure out what I am missing. Any suggestions would be appreciated!
Edit:
I have done some more checking. I am able to publish to the server and I am able to start the server (with the published application) fine from the command prompt. That part works. When I attempt to start the server from within Eclipse it gives me "Server JBoss 7.1 Runtime Server failed to start." It never writes anything to the console tab in Eclipse either so I can't tell why it is failing to start.
Also in the Servers tab, there is an entry called "Server Details". When I expand that entry, it says "Not Connected".
The answer to my problem is that Eclipse had be configured to use the java JDK, not the JRE. As soon as I switched over to use the JDK it started working fine. For some reason JBoss will start under 64-bit windows with the JRE but under 32-bit you need to use the JDK. I found the answer here: https://community.jboss.org/thread/169097