Running SoapUI and HermesJMS on headless Linux Server - linux

I'm trying to get SoapUI and HermesJMS to work with each other on a headless Linux server. And by "headless" I do mean headless; the only account we are authorized to use that has any kind of admin privileges is unable to forward an X-server session.
First, the steps I've done so far:
Unpacked the tar.gz containing SoapUI 4.6.0 into a soapui directory.
Using my own account, which has X-server, I ran the HermesJMS installer.
Set 777 permissions so the admin user could work with the files.
I entered the soapui-config.xml and test.xml files and told them where to find the hermes-config.xml
Independently, they both work. I can run a generic SoapUI test and if I use my X-server to run Hermes, I can see the queues I need to be using.
However, when I try to use the testrunner.sh, I get a NullPointer exception on HermesUtils.addHermesJarsToClasspath.
An error occured [java.lang.NullPointerException], see error log for details java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.addHermesJarsToClasspath(HermesUtils.java:120)
Any ideas on what the issue is? I tried running soapui's GUI the same way I ran Hermes' but I run into a segmentation fault on startup.

Related

Attach to docker remote debug linux module from vs2019 fails to load/install VSDBG on Linux target

I'm attempting to remote debug a linux module running on docker. Following this article works for a simple test project.
https://devblogs.microsoft.com/iotdev/debug-azure-iot-edge-c-remote-linux-module-container-with-visual-studio-2019-version-16-3/
When I attempt to attach to the module that is setup via SSH with root login permissions enabled, I get this output from Visual Studio:
VSDBG is not installed on my linux target so whats failing is the download/setup of VSDBG. I found a related article on installing VSDBG manually that references the //.vs-debugger path but I'm not sure if this is what is needed
https://www.plcnext-community.net/en/hn-makers-blog/464-remote-debugging-of-a-net-core-application-with-vs-code-on-plcnext.html
I noticed when I select the module to debug that the User Name show "nobody" instead of what I think is normal/expected which is "moduleUser". Is this related to the issue?
So I'm looking for help understanding why the download and install of VSDBG is failing. The SSH credentials are using root so I don't think permissions should be a problem. On the other hand, the failure is simple and possibly permission related:
Command 'mkdir -p '//.vs-debugger'' failed with code '1'. "
If there is a manual set of steps I can follow to install VSDBG so my visual studio attach-to-debug works, as shown above, that would be very helpful.

How to debug your application with root permissions on VSCODE?

I'm trying to debug dotnet core web app, however it's not possible to do it without having root permissions.
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.Private.CoreLib.dll: 'Permission denied'
The naive approach would be launching VSCode with root permissions, which is generally not a recommended (and I would like to avoid it).
Is there any way to configure launch.json to execute the debugger with root permissions?
I've tried already creating a pre-launch task executing sudo or sudo su commands.
I tried running the application and trying to attach to the process (also got declined because of insufficient permissions)
For C#:
Locate vsdbg-ui (in my case: ~/.vscode/extensions/ms-dotnettools.csharp-1.23.17/.debugger)
Rename "vsdbg-ui" to "vsdbg-ui2"
Create a new file in the same folder called "vsdbg-ui" with following content:
pkexec [yourhomefolder]/.vscode/extensions/ms-dotnettools.csharp-1.23.17/.debugger/vsdbg-ui2
Make the new file "vsdbg-ui" executable
Launch the debugging session in VSCode. You will get a prompt to enter your sudo password. You are debugging with sudo now.

Command Not Found CentOS | .bat File

Im trying to run a .bat file on my server through php popen command, ive struggled and finally got to the point where all the permissions are set correctly and now i can actually execute the file but i have a problem. In my server logs it displays
foo.bat: line 1: mstsc: command not found, referer: http://dev.example.com
The full code in the file is mstsc /v:192.168.1.1 I know this means that it doesn't recognise the command on centos but im not sure what to do to fix the problem.
The aim of this code is to open RDP for the user who requested it. Bear in mind that this code works perfectly locally on my windows OS using xampp but when i upload it to the server running CENTOS it doesnt work.
My question is
How do i fix this error and allow CENTOS to execute a command that opens an RDP window for the user
MSTSC is a Windows RDP client which is why it works on Windows.
It's not available to run on CentOS, let alone call by executing a Windows batch file! You'll need to use an alternative solution like FreeRDP and use a script like this one if you want to do this from CentOS: https://www.server-world.info/en/note?os=CentOS_7&p=x&f=5
I feel like this is exactly what you're after
http://www.jjclements.co.uk/2010/02/21/rdp-hyperlink/
It allows you run a bat file that opens windows RDP without needing to write a single line of server code. Take a look its pretty good!

Installing SoapUI on Amazon AMI Linux command line

I need to install and run SoapUI on linux OS (Amazon AMI linux).
This is a command line version (no GUI)
I was able to successfully download and unzip SoapUI tar using the below commands
Download SoapUI installation files
wget http://freefr.dl.sourceforge.net/project/soapui/soapui/5.0.0/SoapUI-5.0.0-linux-bin.tar.gz
Extract Contents
tar -xzf SoapUI-5.0.0-linux-bin.tar.gz -C /opt/
Install SoapUI
cd /opt/SoapUI-5.0.0/bin/
After this when i run the following command:
./soapui.sh
I get below exception
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:218)
at com.eviware.soapui.SoapUI.startSoapUI(SoapUI.java:842)
at com.eviware.soapui.SoapUI$SoapUIRunner.run(SoapUI.java:697)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.r...(EventDispatchThread.java:91)
Is there something missing here or any other commands needs to be called ?
SoapUI itself is a graphical tool, and the main application isn't going to like running without a graphics display.
When I've run the SoapUI stuff on a Linux server without X11, it's been the mock service facility that I'm after - I use it to provide substitute SOAP or REST services for automated testing etc.
The mock service runner runs well without an X11 server - you just have to tell java not to look for a graphical user interface.
So you add -Djava.awt.headless=true to the command line:
./mockservicerunner.sh -Djava.awt.headless=true
If you just to that it will give you a 'help' output, because this tool is designed to use an existing SoapUI project file to provide preconfigured responses, rather than for interactive use.
The alternative is to use X-Forwarding, so SoapUI runs on your server, but the UI is displayed on your local workstation. I've never done that (because, as I said, I'm after the standalone interaction for automated testing), but this page has some detail: http://blog.ashwani.co.in/blog/2013-01-10/soapui-mockservicerunner-on-linux-without-x-config/
(it also mentions the 'headless' option for mockservicerunner.sh.
This page has some detail about setting up a project in SoapUI first before using it for one of the automated tools (loadrunner in this case): http://www.soapui.org/load-testing/command-line-execution.html
I just installed and executed SoapUI in AWS (Red Hat) without using any graphical interface:
1.- Download SoapUI directly from soapui.org; search for the latest Linux version, copy the link address and download the software into any Linux directory using the wget command. This should have downloaded an installation script file (for example, SoapUI-x64--5.3.0.sh).
2.- Execute the previous installation script from command line and answer the installation prompts. Once you have finished go to the directory where you elected to install it and verify that you have all the folders and files (bin, lib, etc.).
3.- To run SoapUI from the command prompt, go to your SoapUI home directory and execute an instruction like this:
sh bin/testrunner.sh -s"Your Suite Name" -c"Your Test Case Name" -f/your/output/path/ /your/project/path/your-soapui-project.xml

Unable to run Selenium with htmlSuite on Linux with no GUI

I've created a very basic test using Selenium IDE and converted it into an HTML suite. I've setup a VM running CentOS 5.5 to perform Selenium tests.
When I try to use this command,
java -jar selenium-server-standalone-2.14.0.jar -multiwindow -htmlSuite "*firefox" "http://www.example.com" "login-test-suite.html" "sel-results.html"
I receive the following output with an exception http://pastie.org/2956400
Someone told me that Selenium is not able to find firefox in /usr/lib/firefox and that was correct, so I created a symlink
ln -s /usr/lib64/firefox-3.6 /usr/lib/firefox
But still getting the same error. I don't know how to create a profile in firefox via cli as I'm using SSH. My initial thought was Selenium should create a profile itself and if it can't, then definitely something is wrong.
I'll proceed to develop Selenium test in Python only when I get the simple htmlSuite test running.
I think suite file of your scripts folder, needs to be given folder permission to access by selenium. Hope we can give it in unix. Try to give the permission and try to run one more time. Hope this will help you.
Regards,
Neel

Resources