Jenkins Node on Redhat Windows Master jnlp file won't load - java

I have a Jenkins master on Windows server 2016 and a node on RHEL 7. When I try to connect from client to master using Java Web start the jnlp file is downloaded with no problems. The issue happens when javaws opens the file I get the following error : "com.sun.deploy.net.FailedDownloadException: Unable to load resource http://localhost:8080/jnlp.jars/remoting.jar" In the Java Console I used the proxy settings from the master which uses an automated .pac file. I have jdk 8 update 181 on both master and node.

I found someone with a similar issue on Stackoverflow. The issue is with the way the jnlp file gets edited on import and takes out the master hostname and inserts "localhost." Since the file obviously doesn't exist locally the jnlp load fails.

Related

deploy jar on Windows Server AWS EC2

I need to run a jar on a windows server instance.
I would like to build/update/redeploy the jar through a script.
On Linux I know how this works but I cannot seem to find any information how this works on Windows server.
I build the jar somewhere on jenkins.
On linux I can scp (ssh-copy) the jar to the server on a certain location. Then restart it.
In Windows don't even know how to copy the file on to the server without logging in manually via RDP.
I would like a scirpt that I can run in jenkins, that connects to windows server. Stops the running jar and exchanges it for the new one. Starts it up again. (with windows file handles I'd have to stop it before overwriting the jar).
How does CI work on windows server?
PS:The issue is that the jar starts up a process which only runs on windows server in a NON headless mode and thus, I cannot get around windows.

Local jnlp application blocked by java security

I have an HP Proliant remote application card installed in my server, and it uses a java app (jnlp) for KVM access. Due to the incorrect way it's configured, no browser will run the jnlp file it provides; they all just download the file, and then I've just manually run it from my file manager.
Enter Java 8, where medium security is no longer an option. When I try to run the jnlp file, it tells me it's blocked by java security, so how can I run this jnlp file now? I've tried adding localhost and 127.0.0.1 to the exceptions list, but that didn't help.

activemq no "activemq" file in /bin directory

I am using (trying to use) activemq 5 on Ubuntu 10.4 and there are big mismatches between the documentation on Apache.org and what is actually in the install.
I installed it by doing a sudo apt-get install activemq
According to the Apache documentation there should be a file called "activemq" in the bin directory of the install. However, in my folder /usr/share/activemq/bin there is only one file: run.jar which is a symlink. There is no file activemq.
So, I have no way to even start it according to the documentation (http://activemq.apache.org/version-5-getting-started.html#Version5GettingStarted-InstallationProcedureforUnix).
If I try to start a broker using the command activemq console I get the error mkdir: missing operand followed by a long java command line which ends with
-jar "/usr/share/activemq/bin/run.jar" start : not found
which is strange because that exact symlink is on my machine.
If I run sudo activemq console I get similar errors followed by runtime exception,
"Failed to execute start task. Reason blah blah FileNotFoundException:
class path resource [activemq.xml] cannot be opened because it does
not exist. (StartCommand.java:98)"
How can I get past this problem and start activemq?
There is something wrong definitely. You don't need a packet manager.
I advise you to use the official download page:
http://activemq.apache.org/activemq-5151-release.html
Pick the latest or other version then download, extract and start via ./bin/activemq start

How to start the local neo4j server on Windows using PowerShell script?

I have downloaded the zip folder of neo4j community edition version-2.3.1 in order to start connecting the neo4j server through Java code. I want to create graph database for indexing of the data. Followed this link originally.
PROBLEMS
I'm unable to start the neo4j server as the batch file is deprecated and it displays the following message:
Tried using the PowerShell scripts commands also with reference to this link, it just opens the script file. the server is not started with these commands.
Where I am going wrong and what is the right procedure to start the local neo4j server and connect it through Java code to create nodes and relationships of the graph.
The batch file will still work even though it has been deprecated. It appears that the batch file cannot find the Findstr command.
findstr.exe should be in %windir%\system32\
If it is there and you are getting the findstr is not recognized as an internal or external command” error, check that %windir%\system32\ is in your PATH.
Once that works, try the Neo4j.bat file again.
And as Anton mentioned, please explain how the Powershell didn't work and what actions you took.

Deploy java program on Linux

A web application has been developed in C# which hits my Java code through a restful web service which returns a JSON response.This process was working on a local machine with tomcat server. Now my Java application needs to be hosted on an external server in Linux environment.
Using putty, I logged into the particular hostname and as a root admin.
I have installed Java JDK 1.7, Apache tomcat server 7, my Java application as a war file is placed in the webapps folder. I can start the tomcat server too.
My question is:
How do I hit my application from windows. Is it http://x.y.z.k:8080//MYAPPNAME(war file name)/?
How do i check the java logs in the linux env?
Also I have a set of files that I read from my windows folders as in C://uploads//file.txt or C:\DeveloperTool\Pluggins\
I replaced them with the linux structure in my java code. as /home/opt/file.txt
Will this work?
How do I hit my application from windows. Is it
http://x.y.z.k:8080//MYAPPNAME(war file name)/?
If 8080 is the port Tomcat is configured to listen on (I think by default, it is), then that is correct. Bare in mind the web app name is case sensitive. You can configure this setting in $TOMCAT_HOME/conf/server.xml
How do i check the java logs in the linux env?
Since you're using a remote shell over SSH, you will want to use either tail or less to monitor logs in real time. The log files are stored in $TOMCAT_HOME/logs.
Try
$ less +F /path/to/tomcat/logs/catalina.out
catalina.out is the main file when running Tomcat on *nix systems.
Also I have a set of files that I read from my windows folders as in
C://uploads//file.txt or C:\DeveloperTool\Pluggins\
I replaced them with the linux structure in my java code. as
/home/opt/file.txt Will this work?
As Lutz Horn mentioned in the comments, try it. In theory, that should work fine as long as the permissions are setup properly.

Categories

Resources