From a2155ee086877930b1c2e1b3d8d076ef64bffd7d Mon Sep 17 00:00:00 2001 From: Noe Date: Thu, 2 Nov 2023 16:46:18 +0100 Subject: [PATCH] Try RabbitMQ without VPN IP --- csharp/App/Middleware/RabbitMQConsumer.cs | 3 ++- csharp/App/Middleware/deploy.sh | 1 + csharp/App/SaliMax/src/Program.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 csharp/App/Middleware/deploy.sh diff --git a/csharp/App/Middleware/RabbitMQConsumer.cs b/csharp/App/Middleware/RabbitMQConsumer.cs index 66ea10989..b3379ea33 100644 --- a/csharp/App/Middleware/RabbitMQConsumer.cs +++ b/csharp/App/Middleware/RabbitMQConsumer.cs @@ -15,7 +15,7 @@ public static class RabbitMqConsumer public static void StartRabbitMqConsumer(Dictionary installationConnections, Object sharedDataLock) { - string vpnServerIp = "10.2.0.11"; + string vpnServerIp = "194.182.190.208"; _factory = new ConnectionFactory { HostName = vpnServerIp }; _connection = _factory.CreateConnection(); _channel = _connection.CreateModel(); @@ -34,6 +34,7 @@ public static class RabbitMqConsumer // Process the received message if (receivedStatusMessage != null) { + Console.WriteLine("Received a message from installation:"+receivedStatusMessage); Console.WriteLine("Received a message from installation: " + receivedStatusMessage.InstallationId + " and status is: " + receivedStatusMessage.Status); Console.WriteLine("----------------------------------------------"); Console.WriteLine("Update installation connection table"); diff --git a/csharp/App/Middleware/deploy.sh b/csharp/App/Middleware/deploy.sh new file mode 100755 index 000000000..d8017c7c0 --- /dev/null +++ b/csharp/App/Middleware/deploy.sh @@ -0,0 +1 @@ +dotnet publish Middleware.csproj -c Release -r linux-x64 --self-contained true -p:PublishTrimmed=false && rsync -av bin/Release/net6.0/linux-x64/publish/ ubuntu@194.182.190.208:~/middleware diff --git a/csharp/App/SaliMax/src/Program.cs b/csharp/App/SaliMax/src/Program.cs index c8415bacb..07ad3c078 100644 --- a/csharp/App/SaliMax/src/Program.cs +++ b/csharp/App/SaliMax/src/Program.cs @@ -49,7 +49,7 @@ internal static class Program private static readonly Channel RelaysChannel ; private static readonly Channel BatteriesChannel ; - private const String VpnServerIp = "10.2.0.11"; + private const String VpnServerIp = "194.182.190.208"; private static IPAddress? _controllerIpAddress; private static UdpClient _udpListener;