question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access to resource denied after upgrading from 6.0.2 to 6.2.5

See original GitHub issue

After upgrading an application that uses MassTransit with SQS transport (and a hosted service) from 6.0.2 to 6.2.5, I am getting the following exception in AWS.

Application startup exception: System.AggregateException: One or more errors occurred. (Access to the resource https://sqs.eu-west-1.amazonaws.com/<account id>/dev-quartz-sqs is denied.)

Amazon.SQS.AmazonSQSException: Access to the resource https://sqs.eu-west-1.amazonaws.com/<account id>/dev-quartz-sqs is denied.

Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.

The error happens when the application starts.

I am unable to reproduce the error locally as it works fine with localstack.

Can you also reproduce the problem with the latest version?

Tested with both 6.2.4 and 6.2.5

Environment

  1. Operating system: Linux
  2. Dotnet version: 3.1.0

Steps to Reproduce

This is the startup code


		public async Task StartAsync(CancellationToken cancellationToken)
		{
			cancellationToken.ThrowIfCancellationRequested();

			_logger.LogInformation("Starting the bus...");

			_busControl.ConnectReceiveEndpointObserver(_receiveEndpointCheck);

			try
			{
				await _busControl.StartAsync(cancellationToken).ConfigureAwait(false);

				_scheduler.JobFactory = new MassTransitJobFactory(_busControl);

				_logger.LogInformation("Starting scheduler");

				await _scheduler.Start(cancellationToken);
			}
			catch (Exception)
			{
				await _scheduler.Shutdown();
                throw;
			}

			_simplifiedBusCheck.ReportBusStarted();

			_logger.LogInformation("Bus started");

		}

There is also one recurring job that we are setting up with on application start

Expected Behavior

Access to SQS should work as it’s working normally with version 6.0.2

Actual Behavior

Getting an Amazon.SQS.AmazonSQSException exception

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Crozincommented, Apr 29, 2020

I’ve some similar problems in the past. It was caused by invalid IAM permission setup. Maybe MT started using something extra around 6.2.x, hence the issue? You have to add some extra logs of AWS SDK - they contain to exact reason.

// assuming you're using NLog

AWSConfigs.LoggingConfig.LogResponses = ResponseLoggingOption.Always;
AWSConfigs.LoggingConfig.LogTo = LoggingOptions.SystemDiagnostics;
AWSConfigs.AddTraceListener("Amazon", new NLogTraceListener());

Once this setup is in place you should get tone of AWS logs including the response of failed request.

1reaction
gsaadehcommented, May 2, 2020

Thanks @Crozin I am not sure what new permissions MT requires. At the moment I tried to give the ECS task a full permission on sqs (sqs.*) and it still fails. I will try the AWS logging to see what’s the root cause.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolved issues | FortiGate / FortiOS 6.4.1
In transparent proxy policy with authentication on corporate firewall, it shows Access Denied after authentication. 620453. Application WAD crash several times ...
Read more >
FortiOS 6.2.0 Release Notes
After upgrading FortiGate to 6.2.0, the interface allowaccess ... client tries to connect to HTTPS page, client gets message: Access Denied.
Read more >
FortiPortal Release Notes
With an enhanced method to improve password security, all users must update their password upon login after upgrading to FortiPortal to 6.0.6.
Read more >
ClearPass 6.2.5 Release Notes
16803. After upgrading to 6.2.0, a configuration file was deleted. This caused the Dissolvable Agent to not load the Clearpass Onguard portal page,...
Read more >
8 Known issues
Proxy startup with MySQL 8.0.0-8.0.17. zabbix_proxy on MySQL versions 8.0.0-8.0.17 fails with the following "access denied" error:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found