Kibana/Elasticsearch/logstash install issue - elasticsearch

I have an issue installing Kibana/elasticsearch/logstash.
I followed the instructions for the download and the install of each. From the Admin CMD line, I ran the elasticsearch.bat for elasticsearch. The script ran, but just hung and never fully completed. However, when testing on my localhost 9200, it showed ES installed correctly. I did the same with Kibana and had the same result. The script never fully completed, however, I was able to open the web app on port 5601. I also completed the install for logstash – the script never fully completed. When I manually exited each script by exiting the cmd window, I lost connection to the localhost. "This site can't be reached."
Has anyone had this issue or know what might be happening here?

Related

Jenkins Agent can't reconnect

I've been attempting to setup a Windows agent for our Jenkins on Linux to use. Mostly using the instructions from https://www.gdcorner.com/2019/12/30/JenkinsHomeLab-P3-WindowsAgents.html
Only mostly, as those (like EVERY OTHER SET I've found) don't match the current Jenkins screens.)
I got to the point where I ran the curl/java -jar commands on the Agent machine in an Administrator Command window.
It worked, and connected to Jenkins, showed up as running. Though this means it was still running as a normal program in a command window.
While attempting to figure out what was meant by "Click the Launch agent from browser. " - which showed a small window that should then be displayed - which would allow you to install it as a service, I closed the Command window.
I never figured out how to "click the launch agent from browser", so I opened a new admin command window and re-ran the commands. They no longer work. It gets this error every time: (note that "WinDInstaller" is really "Win%2DInstaller")
Sep 28, 2022 10:15:40 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using C:\Enterprise\Agent\remoting as a remoting work directory
Sep 28, 2022 10:15:40 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to C:\Enterprise\Agent\remoting
Failed to obtain http://metrixbld1:8080/computer/WinDInstaller/jenkins-agent.jnlp?encrypt=true
java.io.IOException: Failed to load http://metrixbld1:8080/computer/WinDInstaller/jenkins-agent.jnlp?encrypt=true: 404 Not Found
at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:514)
at hudson.remoting.Launcher.run(Launcher.java:346)
at hudson.remoting.Launcher.main(Launcher.java:297)
Waiting 10 seconds before retry
It seems like it should be possible to get an Agent running on windows as a Service - but so far I've not found a set of instructions that work.
EDIT: Since that agent definition no longer worked, I created a new one and had it just copy the settings from the old one.
Then ran the new java/agent command - and it worked.
Apparently you can only launch a new agent once. If it ever stops you have to re-create it????

Postgresql can't connect application server through PGAdmin4

I installed PostgreSql on my Windows machine.
I can connect to PostgreSql through cmd.
But when I want to launch pgAdmin I am getting this error message.
Failed to connect to the pgAdmin application server. Click here to try again.
I have also Mysql installed on my machine if it can make any complications.
The same problem happened to me today:
And this is how I've solved it:
1) Use a text editor to open the config_distro.py file under the c:\Program Files\pgAdmin 4\v1\web folder. Change the value for SERVER_MODE from True to False, then save the change. (I have run Notepad++ as an Administrator, in order to be able to save in this protected folder.)
2) Go to folder c:\Users\your_name\AppData\Roaming\pgAdmin and make sure there is nothing there (delete all the files, as they are temporary and will be restored after starting pgAdmin)
3) Start pgAdmin
4) This time you will see a white box that sits - at least, on my slow laptop - about 20 seconds. (You may briefly see the original error message, but do not worry).
5) Meanwhile, the temporary files - required for running the application - are created.
6) Once the temporary files process is over, the application starts as expected.
Try starting the pgAdmin as administrator.
My config_distro.py was missing this line:
MINIFY_HTML=False
I added it as in the above steps and it works
In my case, SERVER_MODE was already False in config_distro.py. I then proceeded to start pgadmin4 as an administrator. This also did not work. Finally, I resolved this by restarting postgresql service in services.msc.
postgres service restart
In my case, the problem was non-ascii username.
Find pgAdmin installation and open/create config_local.py in editor, add this:
DATA_DIR = "C:/Data/pgAdmin" # set non-ascii path here
and run setup.py using python interpreter.
You can start the server manually - any errors will echo on the terminal. The windows app seems touchy on timing - this allows the server to take as much time as needed to start up.
Assuming you installed version 3 into "p:\pgAdmin 4" run the following commands"
p:
cd "\pgAdmin 4\v3\web"
set PYTHONPATH=P:\pgAdmin 4\v3\venv\Lib;P:\pgAdmin 4\v3\venv\DLLs
python pgAdmin4.py
When I run that I get the following output:
Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser.
I ran into this today even though the service was running in Windows 10. I just stopped the service, gave it a few seconds, and restarted it. I was able to connect with pgAdmin 4.
In my case the problem was solved by restarting the postgresql service.
Windows-> Service -> find for postgreSQL -> Stop and then Start

Headless testing display error

Background
I am running a set of selenium tests using a Maven and Jenkins with Testng. I had them working fine headlessly up until a week ago. Jenkins sits on the server accessible with port 8080. The tests also run fine through eclipse.
Software Versions
I have read lots about Firefox being incomparable with selenium so here is a list of software and versions that I am using.
Firefox: 39
Maven: 3.3.3
Java: 1.7.0_79
Selenium: 2.46 & 2.47(currently 2.47)
Jenkins: 1.622
Xvnc: 1.3.9
ubuntu 14
Error
After I run the tests and the fail I check the console through Jenkins. The error I am getting makes me think it's a problem with Xvnc and firefox but I can't pin point it. I get a NotConnectedException. The firefox console error has changed a few times here is a list of different errors the console has shown me.
Error: cannot open display: :87
firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :46.
firefox: Fatal IO error 2 (No such file or directory) on X server :78.
Research
I've been on bugzilla but cant find a conclusive answer to the problem.
I've also looked around SO but found no fixes.
Conclution
From what I have gathered it is something to do with Xvnc, Could running
sudo apt-get update
make changes to how Xvnc operates? I have updated the packages some time last week but our testers didn't check Jenkins properly when adding new tests and as such I've wasted and entire day trying to pin point when and what the problem is.
Question
What would cause Jenkins to return errors like this, how can I fix them and how can I prevent something doing this again?
EDIT 1
The display variable seems to be the issue, upon typing the command
echo $DISPLAY
There is no response just an empty line.
EDIT 2
running the command
export DISPLAY=:0.10
no gives the result
:0.10
when I echo $DISPLAY
I think the DISPLAY varibale is not functioning as expected and hence firefox is unable to connect to it. To know more about the $DISPLAY refer this link https://askubuntu.com/questions/432255/what-is-display-environment-variable
Try to run this command on the slave node where the job runs, this should give you the required setting for the tests to connect and run.
nohup /usr/bin/Xvfb :2 –screen 0 1024x768x24 > /dev/null 2>&1 &

mongodb : listen() attempts to access socket in a forbidden way

I downloaded 64-bit zipped version of mongodb for windows, created '/data/db' as instructed.
Now, when I run "mongod" command, I am getting the following error & the mongodb server shuts down automatically.
"ERROR : listen() failed error-10013. An attempt was made to access socket in a way forbidden by its access permissions. "
Please help me to clear the firewall settings in windows to prevent this error & run mongodb.
I was able to fix the error by using the following command : "mongod --bind_ip="127.0.0.1". :)
This error also seems to happen when mongod is already running. On Windows 10, mongod will be listed under Background Processes in the Task Manager if it is running. If it is already running, ending the task should allow you to run mongod again without this error occurring. Also check that it is not running as a service; it may be set to restart automatically.
Also, if you have a docker container running mongodb, you also get this error. If you stop your container(s) running mongodb, then it should start up.
I was able to fix this issue by allowing access for Mongo Db Server Application under firewall settings in my antivirus settings.
After you did the above step,open the cmd as administrator and go to the bin path of mongodb application in your system.
Then run the below command.
mongod
Note : try the above steps only after you tried the below steps
1) https://docs.mongodb.com/manual/tutorial/configure-windows-netsh-firewall/
2)https://www.tomshardware.com/news/how-to-open-firewall-ports-in-windows-10,36451.html
I ran across a similar error which is why I ended up on this thread. For me, my solution was that McAfee Antivirus was blocking MongoDB.
The initial error basically showed that access was denied for mongo:
mongo error
I was able to do a search on the internet and found steps to allow MongoDB to run under McAfee Antivirus software by changing the setting for the app directly.
mcaffee settings
When I located MongoDB in the apps requesting internet access, it was initially set to blocked. I selected the app, clicked on edit and changed it to 'Designated ports'.
mongodb settings changed
Now, I am able to run mongo whether the mongod service is started automatically or if I start it manually in a hyper terminal window.

Hudson Running as a Service not Starting

I downloaded Hudson, and am trying to install it as a service. I followed the steps from this page, but when I try to start the service, it always fails. I'm not really getting any defined error codes either. If I try to run the service from the command line (using net start) I get the following (unhelpful) message:
The hudson service could not be started.
The service did not report an error.
The install process seemed to work fine, as the hudson service is installed, and all the files are in the new directory, but the service won't start. Has anyone else run into this problem?
As documented on that page, they have a note of...
If a restart fails for some reason, check the output from Hudson, which is stored in the installation directory that you specified.
Is there anything to denote further errors?

Resources