Artemis running on WSL2 not accessible from Windows - windows-subsystem-for-linux

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?

Related

PROVEtech:TA doesnt start gRPC Server defined in TM.ini

I am using PROVEtech:TA 2021 SE SP3 64 bit.
I have defined the gRPC Address / Port to listen to in the TM.ini defined in the TA.ini (shown in settings) as such.
[gRPC1]
Listen=127.0.0.1:9876
Restarted P:TA.
A call from a gRPC Client gives me this error:
Status(StatusCode="Unavailable", Detail="Error connecting to subchannel.", DebugException="System.Net.Sockets.SocketException (10061)
I checked the ports the P:TA Computer is listening to and it does not show the TCP in the following command:
netstat -n -a -o
It used to work, then P:TA crashed and had to be reinstalled / repaired, now it doesn't work anymore. Does anyone have any pointers as to where to check / what to do?
Thanks :)
The issue here was multiple instances of Provetech:TA installed on the computer.
We had PROVEtech:TA 2021 SE SP3 64 bit and PROVEtech:TA 2022 SP3 64 bit installed on the device.
This apparently stopped the gRPC Server from initializing.
If you run into this issue, try uninstalling all instances of PROVEtech:TA from your device - then reinstalling the instance you require. This should solve this issue.

Oracle Autonomous Linux 7.9 Apache installed but default page not accessible

I have a new Oracle Autonomous Linux VM 7.9
I've installed httpd, made it available through firewall, started it, allowed port 80 and 443, and checked status to see that httpd & firewalld are running...
I go to my public IP in my browser, and it eventually reports: "took too long to respond"
No requests are reaching the server, as it says "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
Is there any diagnostics I can do in the VM to see what's stuck?
from the error it looks like the firewall is not allowed at the OS level. Would you please elaborate which OCI service you mean by Oracle Autonomous Linux VM? For normal compute nodes you need to allow the port at OS level using IPTABLES command.

Knife SSL check fails when workstation is undocked

My Chef workstation is a virtual machine. I initially setup this machine with Hosted Chef server while the machine was docked in my computer's dock and hardlined to the internet.
When I undock the workstation, the knife ssl command fails with the following error:
c2-device#c2failover-VirtualBox:~$ cd chef/
c2-device#c2failover-VirtualBox:~/chef$ knife ssl check
Connecting to host api.chef.io:443
ERROR: Network Error: getaddrinfo: Name or service not known
Check your knife configuration and network settings
c2-device#c2failover-VirtualBox:~/chef$
I have since assigned a resolvable IP address to the VM workstation as it was using DHCP prior. I'm not sure how to resolve this issue or what the issue may be when undocking my workstation. Does anyone have any possible causes or solutions to the issue I'm seeing?
my network interface is configured as follows:
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address XXX.XXX.X.XXX
netmask XXX.XXX.XXX.X
gateway XXX.XXX.XX.XXX
dns-nameservers X.X.X.X
I have not been able to find much in the chef documentation about this issue. Thanks for any help in advance, I'm fairly new to Chef.
This is not related to Chef or knife. You'll need to ensure the VM is able to reach the Internet in general. Overall we do not recommend using a VM as your workstation, you the actual desktop or laptop that you work on.

IP based virtual hosts are not working properly after upgrading Mozilla NSS

We are using NSS as SSL engine in Apache server. Recently we applied latest SUSE Linux Enterprise server patches on Apache server which is hosting two IP based virtual hosts. After upgrade the first virtual host is working fine but the second one is not working.
Error log shows "Hostname vhost1.xxyyzz.com provided via SNI and hostname vhost2.xxyyzz.com provided via HTTP are different" when accessing vhost2.xxyyzz.com.
If we switch back to use mod_ssl the issue was gone. Obviously the issue is related to the following patches. Any help would be appreciated.
mozilla-nss 3.16.4-0.8.1
mozilla-nss-tools 3.16.4-0.8.1
apache2-mod_nss 1.0.8-0.4.9.1
Check your /etc/hosts file to see if you might be assigning the domain name to a local internal IP address or interface.
This caused the same error message for me and many 400 errors.
After changing /etc/hosts don't forget to restart the name service cache daemon ( service nscd restart ).
SNI isn't technically fully supported in that version of mod_nss but it has since been added: https://www.suse.com/support/update/announcement/2015/suse-ru-20150591-1.html
Saw the same error and saw it go away after applying the referenced patch.

Succeeded installing but could not start apache 2.4 on my windows 7 system

I am attempting to install and run apache 2.4 on my windows 7 system
I went to the apache 2.4 bin directory and ran the following:
Note: I opened the cmd window as administrator.
C:\Apache24\bin>httpd.exe -k install
Its output was as follows:
Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open log
So it installed apache 2.4 as a service but it could not be started. It seems like the localhost port 80 is being used. Is this what "[::]:80" means?
I then stopped both the the apache 2.0 service which I had left running and the mysql service, hoping stopping one of them might free up localhost port 80.
I also run netstat -o to see if port 80 is being used. It was not.
But, I then found that a process was using the above socket it is a process that is listening on the above socket
TCP [::]:80 User-PC:0 LISTENING 4
I then ran tasklist and found out that System is using pid 4. 4 is under the pid column
System 4 Services 0 544 K
Finally, from the failed attempt to start the service
I got an error which was recorded in windows systems events.
Log Name: System
Source: Service Control Manager
Date: 2/21/2013 1:58:03 PM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: User-PC
Description:
The Apache2.4 service terminated with service-specific error Incorrect function.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7024</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-02-21T18:58:03.723988900Z" />
<EventRecordID>87756</EventRecordID>
<Correlation />
<Execution ProcessID="560" ThreadID="7596" />
<Channel>System</Channel>
<Computer>User-PC</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">Apache2.4</Data>
<Data Name="param2">%%1</Data>
</EventData>
</Event>
The error from the attempt to start says that beacause of lack of access, make-sock could not bind to sockets which to me looked like localhost port 80. For example,
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
Can anyone tell what I am doing wrong?
Sorry for the belabored question. To solve my problem I just told apache 2.4 to listen to a different port in httpd.conf. Since System was using pid 4 which was listening on port 80, I did not want to explore this any further.
I put the following into httpd.conf.
Listen 127.0.0.1:122
The most likely culprit is Microsoft Internet Information Server. You can stop the service from the command line on Windows 7/Vista:
net stop was /y
or XP:
net stop iisadmin /y
read this
http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
I have the same problem too, after upgrading win7 to win10.
then I check services.msc and found "World Wide Web Publishing Service" was running automatically by default.
So then I disabled it, and running the Apache service again.
Port 80 maybe used by Microsoft HTTPAPI
Try to stop the following service:
Web Deployment Agent Service
SQL Server Reporting Service
SQL Server VSS Writer
I solved this issue finally, it was because of some systems like skype and system processes take that port 80, you can make check using netstat -ao for port 80
Kindly find the following steps
After installing your Apache HTTP go to the bin folder using cmd
Install it as a service using httpd.exe -k install even when you see the error never mind
Now make sure the service is installed (even if not started) according to your os
Restart the system, then you will find the Apache service will be the first one to take the 80 port,
Congratulations the issue is solved.
In my case, it was due to an IP address that Apache is listening to. Previously I have set it to 192.168.10.6 and recently Apache service is not running. I noticed that due to My laptop wifi changed recently and new IP is different. After fixing the wifi IP to laptop previous IP, Apache service is running again without any error.
Also if you don't want to change wifi IP then remove/comment that hardcode IP in httpd.conf file to resolve conflict.
if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.
So, that is why i do a two (or more) post.
I was having the same problem when starting the service (logs can not be opened).
I thought it was because i was trying to have htdocs inside a VeraCrypt encripted container, absurd since i hace such contained mounted and i use a juntion to not affect paths.
The i read the cause could be low ram: after some tests i get to the next conclusion.
Windows is not sending pages to virtual ram to free enough ram if it is a service, for applications it is doing it, i have more than 200GiB of pagefile ready to be used as virtual ram in a 4GiB 64 Bit windows 10.
My solution:
Run a free utility that free ram (512MiB in my test)
Inmediatly after start the service, it starts with no errors
Real Cause:
I was using a virtual machine that uses 1/2 physical free ram (1.5GiB)
Hope this help others.
I was also facing the same issue, then i tried restarting my system after every change and it worked for me:
Uninstall Apache2.4 in cmd prompt (run administrator) with the command:
httpd -k uninstall.
Restart the system.
open cmd prompt (run administrator) with the command:
httpd -k install.
Then httpd -k install.
Hope you find useful.
you can solve it
sudo nano /etc/apache2/ports.conf
and changed Listen to 8080
This may be because of shortage in physical RAM.
Check minimum system requirements in the docs and try to close unnecessary programs if possible.