Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] 502 Bad Server error #49

Open
tswart-res opened this issue Oct 29, 2024 · 1 comment
Open

[ISSUE] 502 Bad Server error #49

tswart-res opened this issue Oct 29, 2024 · 1 comment

Comments

@tswart-res
Copy link

tswart-res commented Oct 29, 2024

Describe the issue
I've configured the skill and docker container so that the intent request comes through but it gets stuck at a 502 error. There's also a an issue connecting to Navidrome at the start of the logs after an initial successful connection.

I'm using Caddy and both navidrome and asknavidrome are running on my pi on the same docker network. I was initially having issues with SSL/TLS encryption so I had to force 1.2 TLS for the handshake not to error.

I fear my caddy config is wrong as the documentation is a bit light on what settings to use and I'm not so familiar with it - so here's a sanitised version of my caddy config for asknavidrome:

 <hostname> {
        reverse_proxy asknavidrome:5000
        reverse_proxy /rest/* asknavidrome:443
    tls {
        protocols tls1.2
    }

Operating System
Raspberry Pi 5 running Debian [bookworm]. Docker image was rebuilt using FROM arm64v8/alpine:3.15.0 as build

To Reproduce
Running any command, simulated or otherwise

Logs

2024-10-29 13:18:55,932 - asknavidrome.subsonic_api - DEBUG - Connected to Navidrome

2024-10-29 13:18:55,932 - asknavidrome.subsonic_api - DEBUG - In function ping()

2024-10-29 13:18:55,963 - asknavidrome.subsonic_api - ERROR - Failed to connect to Navidrome

2024-10-29 13:27:06,214 - root - DEBUG - Response sent: {'api_response': None,
 'can_fulfill_intent': None,
 'card': None,
 'directives': None,
 'experimentation': None,
 'output_speech': {'object_type': 'SSML',
                   'play_behavior': None,
                   'ssml': '<speak>Ready!</speak>'},
 'reprompt': {'directives': None,
              'output_speech': {'object_type': 'SSML',
                                'play_behavior': None,
                                'ssml': '<speak>Ready!</speak>'}},
 'should_end_session': False}

2024-10-29 13:27:06,215 - werkzeug - INFO -  - [29/Oct/2024 13:27:06] "POST / HTTP/1.1" 200 -

2024-10-29 13:27:18,230 - root - DEBUG - Request received: {'dialog_state': None,
 'intent': {'confirmation_status': 'NONE',
            'name': 'NaviSonicPlayMusicRandom',
            'slots': None},
 'locale': 'en-GB',
 'object_type': 'IntentRequest',
 'request_id': '
 'timestamp': datetime.datetime(2024, 10, 29, 13, 27, 18, tzinfo=tzlocal())}

2024-10-29 13:27:18,231 - root - DEBUG - In NaviSonicPlayMusicRandom

2024-10-29 13:27:18,231 - asknavidrome.subsonic_api - DEBUG - In function build_random_song_list()

2024-10-29 13:27:18,252 - root - DEBUG - In GeneralExceptionHandler

2024-10-29 13:27:18,252 - root - ERROR - General Exception: HTTP Error 502: Bad Gateway

2024-10-29 13:27:18,252 - root - ERROR - Request Type Was: IntentRequest

2024-10-29 13:27:18,252 - root - ERROR - Intent Name Was: NaviSonicPlayMusicRandom
@rosskouk
Copy link
Owner

Hi @tswart-res

It looks like you have a couple of issues, firstly the AskNavidrome skill cannot connect to your Navidrome instance, for this you'll need to double check your configuration file and the physical connectivity between the AskNavidrome container.

In your caddy config it looks like the container names may be duplicated:

        reverse_proxy asknavidrome:5000
        reverse_proxy /rest/* asknavidrome:443

I'd have expected it to be something like

        reverse_proxy asknavidrome:5000
        reverse_proxy /rest/* navidrome:443

It looks like both the AskNavidrome and the Navidrome requests are being sent to the same container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants