Edit JVM Arguments outside from CF Admin Panel - ColdFusion 9 - coldfusion

I made a change in JVM Arguments and now the application server won't start. Can I edit the JVM arguments manually outside from the CF administrator and if yes, how? If a "manuall override" is not possible how can I remove the last entry that I added to the JVM in order to be able to start my app server again?
P.S: I am on a Win-Server machine.

Check for the file jvm.config in the bin directory from where you start the server. It contains the JVM arguments to be set for the server.

Related

Django Application and Apache Server with ERR_CONNECTION_RESET on AWS

I have a Django application running on two AWS EC2 instances with a load balancer. I am using Apache as a web application server.
As you can see below, if I run logistic regression on MagicStat using those 8 parameters and the banking.csv file, everything runs fine after clicking the Analyze button. If I use one more parameter, i.e. 9 parameters, I end up with ERR_CONNECTION_RESET error. Even when I run the application directly inside the server using the same Apache (http://localhost), it doesn't work either. Note that I make AJAX calls in each request such as selecting the model and clicking the Analyze button.
Interestingly, that doesn't happen, i.e. it works with those 9 parameters, if I run my Django application from local Apache server (http://localhost).
.
I don't know what is happening? Any suggestions?
Note: Running 9 parameters with the banking.csv file crashes my apache server, so that's the reason why I didn't share the data file here.
Okay, I've finally figured it out after almost 2 weeks of frustrating work. It was an AWS ec2 issue (t3.large). After I installed new ec2 instances (t2.large), it worked. I think something was wrong with the configurations of those ec2 instances.

Starting a Tomcat 8.5 localhost through C++? What is the best practice?

I am attempting to create a small C++ Visual Studio Forms (via CPPCLR_WinformsProjekt) application that is essentially a browser but it also starts a local Tomcat 8.5 server with a WAR file in its web apps folder and redirects you to the localhost page. I am working on Windows.
My question precisely is - what is the best way to start the Tomcat server through C++ libraries?
Edit: The way I started solving this is by simply having the tomcat folder with the WAR file zipped within the Visual Studio project. On execution, the file gets unzipped, and I am thinking of having a system(*start tomcat command*).
NB: I know I can start Tomcat through the cmd but I need to get it working via C++.
[I am assuming you are under Windows, but on Unix-es similar ways are available.]
In a C++ program you can execute all commands that a shell can, so the easiest way to start Tomcat would be to use CreateProcess to execute catalina.bat (or startup.bat). The is also the most easily configurable way: a user can adapt setenv.bat to its needs.
Of course, if you want to omit the *.bat files you can:
either instantiate a JVM using java.exe with the appropriate parameters: you need at least bin/bootstrap.jar in the system classpath (and usually bin/tomcat-juli.jar) and call the main method of org.apache.catalina.startup.Bootstrap with a parameter of start.
or instantiate a JVM using jvm.dll through the Invocation API in a similar way as it is done by procrun.
I don't believe these methods give you any advantage over the *.bat scripts. To stop a modern Tomcat just send the kill signal.
Edit: If you plan to start only one specific web application a full-fledged Tomcat might be overkill. You might instead:
either use Tomcat Embedded, which boils up to writing on class and calling its main method instead of Boostrap#start. The advantage is, you just need to distribute a bunch of jar files and your WAR and you don't need a traditional Tomcat installation directory structure,
or user use Spring Boot.

coldfusion 10 application server service not starting

I added in Coldfusion administrator => Java and jvm => JVM arguments -Dfile.encoding=UTF8 and application server service not starting.
Here is the error. So is there a way to undo what I have done. Because there is no way access to the Administrator panel.
For those, who would encounter the same problem,
open the ColdFusion10\cfusion\bin\jvm.config file as you would see the JVM arguments which you have added. I deleted the Dfile.encoding=UTF8 and service begin running again.

ColdFusion 11 console doesn't use Windows service wrapper to start app server

I have a ColdFusion11 environment with two app servers defined. The default cfusion server was created with a Windows system service wrapper to go along with it; the second app server, for some reason, was not.
The SC tool was later used to create a Windows service wrapper for the second app server; however, when the 2nd app server is controlled within the cfusion Enterprise Manager instance, it does not use the Windows Service wrapper to control it. Is there a configuration file I can amend that will instruct CF to invoke the Windows service wrapper to control this second service? This is particularly important as this 2nd server instance has a logon identity that must be used at startup, but if the server is restarted within the CF console, the identity is obviously not used.
In effect, I need to tell the cfusion enterprise manager to use the Windows service wrapper to control the 2nd app server instance, not to just control it directly. I'm assuming there is a configuration setting buried deep within the bowels of CF that would allow me to specify this.
I've tried searching the XML configuration files, looking for a non-obvious setting within them that might point to a startup configuration parameter, but so far have found nothing. Something must control how a secondary app server is managed, so I thought I'd ask here for some insight.
For the sake of anyone else who might encounter this situation, I've discovered the answer. It has nothing to do with changing the configuration of the application server itself.
When the ColdFusion11 administrator console is told to start an instance of another application server within the Enterprise Manager, it first queries the Windows Service Control database for a defined service of the exact name "ColdFusion 11 Application Server [AppServerName]" (without the brackets). If it finds such a service, CF automatically invokes the service wrapper and starts it. Absent that, a direct invocation of the CF instance commences.
The solution to the issue for an app server created without a Windows service wrapper is, when the 'sc' utility is invoked to create the service, to provide a service name that exactly matches the format above.

New ColdFusion 10 Server Instance Won't Start

I have a previously installed ColdFusion 10 Multi-server installation that is up and running well. When I create a new instance, via the ColdFusion Administrator, with "Create Windows Service" checked, all seems to go well; the new instance shows up in the Administrator and the new directory structure is created on the server, but the new instance won't start. If I go to the Windows Services panel, on the server, and try to manually start the new service, I get:
Windows could not start the ColdFusion 10 Application Server newServer on Local
Computer. For more information, review the System Event Log. If this is a
non-Microsoft service, contact the service vendor and refer to the service
specific error code 2.
The Windows System Event log contains the following:
The ColdFusion Application Server newServer service terminated with non-specific
error. The system cannot find the file specified.
I have searched both the web and the Adobe site for a solution, but have come up empty handed. I would appreciate any insight.
Thanks in advance.
Update from the comments
Starting the service from the command prompt I see this error:
C:\ColdFusion10\newServer\bin>coldfusion.exe -start -console
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize,
TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197):
No transports initialized [../. ./../src/share/back/debugInit.c:741]
FATAL ERROR in native method: JDWP No transports initialized,
jvmtiError=AGENT_E RROR_TRANSPORT_INIT(197)
It could be a port conflict issue. You can check the Event Viewer logs. Try the following:-
Stop ColdFusion service
Launch Command prompt as Administrator
Browse to cf_root\cfusion\bin and run the following command coldfusion.exe -start -console
Try to access the CF admin, once the services are started.
In case it gives an error message, please share the same.
This error was actually caused by conflicting port numbers in the debugger. Reference ColdFusion Administrator interface ==> Debugging and Logging ==> Debugger Settings. The Debugger Port must be set to a unique value for each server instance. If two or more instances are set to the same value, a port conflict results.
This worked for me. First, if you are in a windows environment use
netstat -ano
to get a list of ports in use. Then, open
c:\ColdFusion11{instancename}\bin\jvm.config and find the port address in your JVM arguments, if the port isn't unique, change it to one that is. Then fire up CF from the command line like this:
c:\coldfusion11{instancename}\bin\coldfusion.exe -start -console
Should now start properly or indicate if there is still a problem.
This happened to my local Dev install after a system update. I just tried changing the default port from 8500 to 8501 and it worked.
Maybe I can save someone else from the frustration I faced with some update I didn't explicitly authorize.... this was the cause and fix for my scenario...
JRE version On PC was updated and out of sync with CF settings JRE version...
JRE on PC and CF Settings out of sync...
Solution: updated the jvm.config file to have the same JRE version number as the version on my PC, started CF services, and Bob's your uncle.