I am trying to run tests with on a remote m/c using grid 2. So I have a Hub running on my computer and a Node running on a Remote m/c and I can run my tests without any issues. However, to smoothen the experience I want to run the hub and the node as a windows service. This way i can manage the hub and node in the code. So I installed the Hub as a service on the server and Node as a service on the Remote m/c using srvany as shown below
C:\Program Files\Resource Kit\Instsrv.exe RunHub C:\Program Files\Resource Kit\Srvany.exe
C:\Program Files\Resource Kit\Instsrv.exe RunNode C:\Program Files\Resource Kit\Srvany.exe (where RunHub and RunNode are batch files)
I also made the necessary changes in the registry.
The issue I'm facing is that when I run the node as a windows service in the remote m/c, it is not registering itself correctly to the hub. When I look at the grid overview(http://localhost:4444/grid/console) i do not see the node there. However, if I run the same bat file manually and not as a service everything works fine. Can someone please let me know what I'm doing wrong? Or what's the best way to troubleshoot this?
thanks,
Ok I figured this out myself. There was a reference to a file in a different directory in the bat files. This file could not be accessed when running it as a service. I moved the file to the correct dir and now i can run the Node service
Related
Runing the Build and Run Iot Edge Solution in Simulator stopped working suddenly, and the log builds the containers and stops at this message Network azure-iot-edge-dev is external, skipping Everything was working fine 5mins ago, tried rebooting, restarting docker, iotedgehubdev, but in vain. Do you know how can I get more logs and/or resolve this problem ?
This is a generic error that is thrown for a variety of reasons.
Possible causes can be:
Proxy blocking pulling images of edgeHub and edgeAgent
A problem in the deployment.template.json (or debug template), e.g. missing brackets
Ports of edgeHub that are in use
Docker configured for Windows containers when targeting Linux or visa-versa
The Build output or IoT hub output in Visual Studio usually gives a bit more information.
Do you know how can I get more logs and/or resolve this problem ?
Are you trying to debug/simulate it locally on windows 10 machine?
When you need to gather logs from an IoT Edge device, the most convenient way is to use the support-bundle command. By default, this command collects module, IoT Edge security manager and container engine logs, iotedge check JSON output, and other useful debug information. It compresses them into a single file for easy sharing. The support-bundle command is available in release 1.0.9 and later.
Run the support-bundle command with the --since flag to specify how long from the past you want to get logs. For example 6h will get logs since the last six hours, 6d since the last six days, 6m since the last six minutes and so on. Include the --help flag to see a complete list of options.
sudo iotedge support-bundle --since 6h
By default, the support-bundle command creates a zip file called support_bundle.zip in the directory where the command is called. Use the flag --output to specify a different path or file name for the output.
Incase if you are looking to debug the modules locally on VS2019, VS Code below documentations will be useful.
Use Visual Studio 2019 to develop and debug modules for Azure IoT Edge and
Use Visual Studio Code to develop and debug modules for Azure IoT Edge
Please share the complete logs if the above doesn't help.
I have this issue when trying to start a project from within Visual Studio when it's not running in administrator mode. I always forget and end up with this error. Same goes for if I run "iotedgehubdev.exe setup" from a command prompt. It only works when the command prompt is running in administrator mode.
I would like to run GaphDB in Windows as a service to hide the log events and makes sure it will start automatically when the server is restarted.
What is the best/easy way to start GraphDB as a Service?
Tks
The easiest way to register GraphDB as windows service (as mentioned above) is :
Download the latest release of NSSM - http://nssm.cc/download .
Unzip it .
Open command prompt ( right click cmd - run as administrator).
Go to nssm's folder ( e.g. C:\Users\onto\Downloads\nssm-2.24\nssm-2.24\win64 ).
Run nssm install your_desired_service_name . This will open GUI, when you are able to point to graphdb.cmd file .
Now you are able to control graphdb through windows service console .
You could try creating a service out of it using NSSM which has a bunch of options when setting up the service.
Im trying to setup Jenkins to run tests on a Virtual Machine but im not to sure how to proceed.
What id like to be able to do is to get Jenkins to build the environment on the vm and then have Jenkins execute the test scripts on the vm environment. After the tests have passed/failed id then like Jenkins to clean the database and pull down the virtual environment.
Server box - Windows 7
Virtaul Machine - VMWare
So what im looking for is some information or tutorials on how to implement the above. It would also be helpful if you could recommend what Jenkins plugins I can use to implement the above or if you want to go above and beyond can you outline the steps needed to achieve the above.
Any help would be appreciated.
I'm doing just that in my environment using the vSphere Cloud Plugin. Here's a basic step-by-step guide:
Install the plugin
Configure your ESX/ESXi server as a new "vSphere Cloud"
Create a new Jenkins node, of type "Slave virtual computer running under vSphere Cloud" (which becomes available after Installing the plugin).
When configuring the new node, optionally specify a snapshot name. This will revert the VM to this snapshot when the node launches.
Use the node in a pipeline script: node("node-name-or-label") { ...your code here... }
I use the method above with about 10 Windows nodes, reverting each to a "Clean" snapshot to start each build with a known state.
Currently we are running the selenium grid on a Windows 7 vm and we have about 10 other win 7 vms for the nodes. We periodically run into some problems where the node stops working and just needs to be restarted. We also would like a periodic restart. I am curious how others are managing/ monitoring the nodes to see when something fails. Not sure if there is a way to monitor with something like Nagios?
I thought for restarting that I could try to build the node jar as a reservice and just have a schedule to reboot it once a month. Thoughts? Do I need to elaborate some more? Thanks
You can try selenium-grid-extras. Its been open sourced by groupon, I believe. From their git hub page:
This project is designed to help you manage your Selenium Grid installation by giving you control over the Grid Hub machine and Grid Node machine. This is very useful in cases when Internet Explorer Driver crashes, and you need to kill the iedriver.exe so that next test can start and not fail.
Link to the page - https://github.com/groupon/Selenium-Grid-Extras
I have just been tasked with upgrading our build system to selenium grid 1.0.7 from 1.0.3. I did not create the original instance of our selenium grid.
My problem is this: our 1.0.3 installation has a windows service running that cruise control can use. In addition, there are extra folders in our selenium-grid-1.0.3 folders such as /bin /conf that do not exist in my selenium-grid-1.0.7 folder that I just downloaded. Does anyone know how I can somehow build selenium grid so that I can run it on our Windows server 2008 machine? I notice that our bin folder for 1.0.3 has a wrapper.exe in it that calls a wrapper.conf file in our 1.0.3/conf directory. I don't have either of those in my 1.0.7 folder and I'm assuming there is some other binary I must download, but have no idea where to get it from. Anyone know how I can get the selenium grid hub service to work with 1.0.7? Thanks.
Looks like the previous developer simply used Java Service Wrapper to create a service around the Selenium java files, thanks.