How can i access CrateDB Admin UI on Ubuntu server 18.04 across the LAN? - cratedb

I installed CrateDB on an Ubuntu server 18.04 across the LAN. But I am not able to access the Admin-UI and I get the following message:
Firefox can’t establish a connection to the server at 192.168.1.102:4200.
How can i solve this problem?
CrateDB is running on the server and this is the status:
sudo systemctl status crate.service
crate.service - CrateDB Server
Loaded: loaded (/lib/systemd/system/crate.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-06-30 14:15:38 +04; 18min ago
Docs: https://crate.io/docs/
Main PID: 17614 (java)
Tasks: 35 (limit: 4649)
CGroup: /system.slice/crate.service
└─17614 java -Xms512m -Xmx512m -Djava.awt.headless=true -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+U
...

per default cratedb binds itself to local which means that you can't access it from the outside.
you need to set network.host to something like _site_.
https://crate.io/docs/crate/reference/en/latest/config/node.html#hosts
you need to make sure all the bootstrap checks pass: https://crate.io/docs/crate/guide/en/latest/admin/bootstrap-checks.html

Solution 1
And in addition to what #Johannes Moser has replied, that first you need to add your machine's IP in crate.yml file, against network.host.
Then optionally you can specify psql.port, which defaults to 5432, and then you can access Crate from outside like:
l.oc.al.ip/PSQL_PORT
Solution 2
Use nGROK
ngrok exposes local servers behind NATs and firewalls to the public
internet over secure tunnels.

Related

cannot connect to X.X.X.X:10514: Connection refused

Configuring a ELK stack version 8.1, based on two virtual machine which both run Oracle linux 8. I need to send logs from a VM to the other using rsyslog. On the recieving machine logs will be acquired using FileBeat. The file rsyslog.conf has been configured on the sending machine, adding target machine parameters. The file filebeat.yml has been configured to recieve logs from rsyslog like this:
- type: syslog
enabled: true
format: auto
protocol.tcp:
host: "X.X.X.X:10514"
The firewalld on the receiving machine has been configured opening the port 10514.
Since the reboot after configuration, the only thing I can get is the error:
cannot connect to X.X.X.X:10514: Connection refused
How can I solve this problem?

Artemis running on WSL2 not accessible from Windows

This is a specific question. I am running an Artemis MQ service on WSL2. I would like to access the service from an app running on the Windows side, but I got the following exception:
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ219007: Cannot connect to server(s). Tried with all available servers.]
When I run both Artemis and the app on the same "side" (both on WSL or both on Windows, but not at the same time), they work correctly.
Before I installed artemis on WSL, the app running on Linux was able to access the MQ on Windows, so my guess is the problem connected to Artemis being installed on both platform. (However, I checked and no service is running automatically.) Because artemis is not "installed", but unzipped and a broker is created, uninstalling is not possible.
Any idea where the two install is interfering each other?
Note: The web console is also unavailable:
UPDATE 1
Some more information:
I tried to find out any port issue (changed the ports, for example), and to find any reference about port forwarding, but the only info I've found (on the official WSL FAQ), that the ports are shared and we can't talk about forwarding, because they are technically the same (that's why the two instances are conflicting when starting at the same time).
Also, the fact, that earlier (when there were only the Win version installed) I was able to access the Windows version from WSL, indicates some strange behavior other than a port forwarding issue. (And my collegues use this setup (Win -> WSL) at the moment without problem.)
I've even uninstalled (deleted, because Artemis is simply unzipped, not installed) the Windows version, but it didn't solve the problem.
Well, running some extra circles, I've found a solution for the problem, thanks to the suggestion of Justin Bertram.
Once a day, when connection (starting a bash) to WSL, it prints some statistics:
Welcome to Ubuntu 20.04 LTS (GNU/Linux 4.19.104-microsoft-standard x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Thu Jul 16 08:58:33 CEST 2020
System load: 0.0 Processes: 8
Usage of /: 3.6% of 250.98GB Users logged in: 0
Memory usage: 0% IPv4 address for eth0: 172.20.246.243
Swap usage: 0%
Here I noticed a local IP address, which was different from the Windows IP address. When I changed my connection from localhost to this address, I was able to access the MQ.
This solved my initial problem. On the other hand, some questions still hold: What is this address? Why it is defined on this machine and not on my other? How could I get rid of this redirection of eth0?
UPDATE 1:
I've found some of the answers (although it brings up other questions). At the PC the connection worked by localhost, my Ubuntu uses the shares the IP of eth0 and Windows:
>ip addr
6: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 group default qlen 1
link/ether 10:7b:44:1b:1c:d8
inet 192.168.1.128/24 brd 192.168.1.255 scope global dynamic
valid_lft 86394sec preferred_lft 86394sec
(The address 192.168.1.128 is a static DHCP assigned address to the host Windows.)
On the other computer, where localhost doesn't work, the eth0 interface gets a different IP address.
The (new) question: why and how to make Ubuntu to share IP?

I cannot start Apache Web Server using XAMPP 7.2.26-0 on MacOS Mojave Version 10.14.5

I could install successfully XAMPP 7.2.26-0 on MacOS Mojave Version 10.14.5. The problem is that I cannot start Apache:
In the server events, I see this:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Stopping all servers...
Stopping MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql stopped
Restarting all servers...
Starting MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql started at port 3306
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting ProFTPD...
Exit code: 8
Stdout:
Checking syntax of configuration file
proftpd config test fails, aborting
Stderr:
2020-01-07 11:33:11,210 Jaimes-MacBook-Pro.local proftpd[24257]: warning: unable to determine IP address of 'Jaimes-MacBook-Pro.local'
2020-01-07 11:33:11,211 Jaimes-MacBook-Pro.local proftpd[24257]: error: no valid servers configured
2020-01-07 11:33:11,211 Jaimes-MacBook-Pro.local proftpd[24257]: fatal: error processing configuration file '/Applications/XAMPP/xamppfiles/etc/proftpd.conf'
Do think think this is caused by an IP address conflict or something else?
UPDATE 1
Since I am not interested in ProFTPD, I am only trying to start Apache Web Server and this is what I see in the server events:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
That would make me think that Apache Web Server started successfully. Nonetheless, I still see its status as "Stopped".
UPDATE 2
See below the configurations that I have for Apache Web Server. I have not changed anything. I am using the default configurations.
Add to your hosts file:
127.0.0.1 Jaimes-MacBook-Pro.local
I installed Uniform Server Zero (a Portable WAMP Server) on Windows instead. Thank you.

How to run Tomcat on Linux (which has glassfish on port 8080)

I am trying to run to tomcat on linux where glassfish is already running on port 8080 ( you can check here - vhost2.cs.rit.edu:8080 . So i changed the tomcat port to 8181 by editing the server.xml file. NOw with the command startup.sh and i get the following output
Using CATALINA_BASE: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_HOME: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_TMPDIR: /home/krs8785/apache-tomcat-7.0.54/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/krs8785/apache-tomcat-7.0.54/bin/bootstrap.jar:/home/krs8785/apache-tomcat-7.0.54/bin/tomcat-juli.jar
Tomcat started.
I am assuming that tomcat is now working. Now when i test the server by - vhost3.cs.rit.edu:8181 I get
No data received on the browser.
What is the problem here and how do i solve it?
The problem may be unrelated to tomcat. I think your first step should be to exclude networking issues.
I have assumed you are accessing vhost3.cs.rit.edu:8181 from another machine. If that is the case, try to access localhost:8181 from vhost3.cs.rit.edu. If this is not possible in a conventional browser, perhaps because it is a headless server with X forwarding disabled then use a terminal based browser. Try typing the following in the terminal on vhost3.cs.rit.edu
lynx localhost:8181
If you are able to see a representation of a tomcat splash page then you can attribute it to networking issues. This could be firewall related (perhaps even an issue with iptables on linux).

Apache Mesos failing to get slave usage. Error Slave usage

Apache mesos fails to find slave usage when you select slaves on the mesos gui. Also the web console is showing "failing when trying to load resource."
This is a common issue when running on EC2 or other cloud providers where machines have both an external and an internal IP. Mesos reports the internal IP in the UI, so if you're using the web UI from outside of EC2, the URLs won't work.
Current Mesos master and the latest 0.15 release candidate fix this issues by adding a --hostname command line option to set the hostname that gets reported in the UI.
If you're running <0.15, you can fix the issue by adding all the hosts in your Mesos cluster to /etc/hosts like so:
<private ip> <public fqdn> <machine hostname>
for example:
10.98.58.170 ec2-54-224-191-136.compute-1.amazonaws.com ec2-54-224-191-136