Can't run simple Node Express App in Eclipse using Nodeclipse. Get Console message of "<terminated, exit value: 0>Node.js Process" - nodeclipse

Can't run simple Node Express App in Eclipse using Nodeclipse. Get Console message of "Node.js Process"
Fresh install. Any suggestions
New>Project>Node Express
Right Click App.js Run As Node Application
Eclipse Version for JAVA and Reporting: Luna Service Release 1 (4.4.1)
Nodeclipse Core and Node.js 0.17.0.201409260936
MAC OSX 10.10.1 (14B25) 64bit
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

When Nodeclipse creates a new Express project (with express version >4.0) it misses to start the server so it listens to a certain port (that's why it finishes without any error).
In order for it to work you should add at the end of your app.js file this:
app.listen(3000, function () {
console.log('App listening on port 3000!');
});
In the previous versions of express the equivalent is:
http.createServer(app).listen(app.get('port'), function(){
console.log('Express server listening on port ' + app.get('port'));
});

Related

Can't Connect to Minecraft Server When Remote Debugging With IntelliJ

The remote debugging is working, but when I have IntelliJ open and the remote debugging profile active, I'm not able to join the Minecraft server with my actual player at all (via localhost). When connecting, it simply says "Disconnected" and shows nothing in the console. I can, however, join the server before loading IntelliJ and using Remote JVM Debug afterwards but when I disconnect, I'm not able to log in again (other servers work fine). The server will not poll after IntelliJ has launched with the profile active (doesn't have to be debugging). I see no other errors anywhere.
Here's what I've tried:
Running JDK19 on server and client
Switching ports and using 127.0.0.1 instead
Using JAR Application configuration
Using Remote JVM Debug configuration
Disabling MacOS Firewall (since been re-enabled)
Other stuff I copied... might be useful:
IntelliJ Versions:
IntelliJ IDEA 2022.3 (Community Edition)
Runtime version: 17.0.5+1-b653.14 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Server Info/Device Info:
Connected to the target VM, address: '127.0.0.1:55637', transport: 'socket'
Starting org.bukkit.craftbukkit.Main
System Info: Java 19 (OpenJDK 64-Bit Server VM 19.0.1+10-21) Host: Mac OS X 13.1 (aarch64)
2023-01-28 16:21:45,022 ServerMain WARN Advanced terminal features are not available in this environment
Server Version:
[16:21:49 INFO]: This server is running Paper version git-Paper-381 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT) (Git: 42fecd0)
Minecraft Client Log:
[15:32:04] [Render thread/INFO]: Connecting to localhost, 25565
[15:32:13] [Render thread/INFO]: Connecting to localhost, 25565
[15:33:29] [Render thread/INFO]: Connecting to localhost, 25565
Screenshot
I figured it out. For whatever reason, the "built-in server debugger" was already set to 25565. Not sure if I set that, but changing it to 25560 fixed the problem!
Settings > Build, Execution, Deployment > Debugger...Built-in Server

spring boot app not launching on Azure Linux VM

I have a spring boot app that is running well on AWS Linux VM. Now, I am trying to run it on Azure Linux VM.
I am launching the application using this command (just like I am doing on AWS):
java -Dspring.profiles.active=prod -jar /home/azureuser/myapp/myapp-server.jar
But nothing happens after this. It doesn't exit but there is no output/log message at all. Ideally, I should see output generated on the shell but it prints nothing. There is no error/exception stack trace.
The same jar is working fine on AWS Linux VM.
The only difference in my AWS and Azure VMs is that on AWS, I have Java 16:
openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment Corretto-16.0.2.7.1 (build 16.0.2+7)
OpenJDK 64-Bit Server VM Corretto-16.0.2.7.1 (build 16.0.2+7, mixed mode, sharing)
while on Azure VM, I have Java 17:
openjdk version "17.0.4.1" 2022-08-12 LTS
OpenJDK Runtime Environment Microsoft-40354 (build 17.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM Microsoft-40354 (build 17.0.4.1+1-LTS, mixed mode, sharing)
But I have tested the jar on my local windows machine on Java 17 and it works fine.
Any idea what might be the issue? Is the output going somewhere else that I don't know about?
It is working. I launched the application and then got busy with something else. When I checked back on the window after 10-15 minutes, I saw the output.
The issue was that Azure VM is a lot slower/underpowered than AWS VM. Since the app starts up in a few seconds on AWS, I never imagined that it would be that slow on Azure. It is taking more than one minute for the first line of output to show and more than 5 minutes for the app to finish start up.

Cannot reconnect to Apache Derby (Embedded) server Ubuntu 20.04 Eclipse

New to this site so bear with me.. I'm developing web project on JVM, generated by Maven and coded in Eclipse I2E. Whenever I want to change server side code (add/delete/modify), I stop the Apache Tomcat server in the Eclipse 'servers' tab, applly changes and then restart the server. This procedure works fine on Windows 10, however, on Ubuntu 20.04 I get : 'Failed to start database [dbname] with classloader..' exception in this line:
this.connection = DriverManager.getConnection(DB.dbURL); //DB.dbURL = jdbc:derby:C:/final_project/ClientsDB;create=true
If I delete the databse and start over, it works fine.
I'm using Eclipse I2E on Ubuntu 20.04, Tomcat 9, Derby 10 and fire up eclispe using sudo -H eclipse

Powershell call works on server but returns error through jenkins

We recently got some new Windows Server 2019 machines and I want to add them to our Jenkins setup. The problem is:
executing any external program causes an error. docker login, git status, java -version all give an error like this
[TestPowershell] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\XXX~1\AppData\Local\Temp\3\jenkins1416755497082623783.ps1'"
java : java version "1.8.0_101"
At C:\Users\XXX-sa\AppData\Local\Temp\3\jenkins1416755497082623783.ps1:1 char:1
+ java -version
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (java version "1.8.0_101":String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Java(TM) SE Runtime Environment (build 1.8.0_101-b13
)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Notifying upstream projects of job completion
Finished: SUCCESS
Tried it on the server itself, works fine. All the setup is the same as our 2016 servers, which dont present this issue
EDIT: I setup a vanilla master on VM 2019 and it works without this error, still presents the error with a 2016 master.
For some reason, it seems that this is related to dotnet 4.8. Windows 2019 1809 ships with 4.7 which presents this strange error, not only does it happen on java -version, but git clone , npm install and ng build to name a few also cause the same error. Installing dotnet framework 4.8 fixes it.. in case anyone is having the same issue we were..
Per default jenkins-slave service runs under the SYSTEM user, under which e.g. git operations will fail, since the user credentials are missing.
In the Windows service control manager change the user of the jenkins-slave-service (properties - log on) the an user profile that has appropriate permissions.
Hope that helps.

Weblogic server could not start and could not configure domain

I just installed a fresh copy of weblogic server and OSB.
After the successful installation of weblogic 10.3.6 on the quick start screen I tried to configure domain. however the screen doesn't processed any further giving the error in the screenshot below.
Also, in eclipse, when i try to add the server, It prompts me to create a domain, but that doesn't work either.
The error am getting in the console is:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=128m; support was removed in 8.0
Unrecognized VM option 'UseSpinning'
It looks like Java 8 is being picked up elsewhere on your system.
Check to see if you have Java 8 installed and look at you path environment variable.
That warning you are getting is from Java 8. 10.3.6 would use Java 5 or 6...

Resources