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

Opening a SSH tunnel to Solr service provides incorrect URL #1443

Open
rhubinak opened this issue May 4, 2024 · 0 comments · May be fixed by #1451
Open

Opening a SSH tunnel to Solr service provides incorrect URL #1443

rhubinak opened this issue May 4, 2024 · 0 comments · May be fixed by #1451
Labels

Comments

@rhubinak
Copy link

rhubinak commented May 4, 2024

Both tunnel:open and tunnel:single give URL that returns 404:

upsun tunnel:open -p zzyyd54xpaq5m
Are you sure you want to open SSH tunnel(s) to the environment main (type: production)? [Y/n] 

SSH tunnel opened to solr at: http://127.0.0.1:30000/solr/collection1

Logs are written to: /home/rh/.upsun-cli/tunnels.log

List tunnels with: upsun tunnels
View tunnel details with: upsun tunnel:info
Close tunnels with: upsun tunnel:close

Save encoded tunnel details to the PLATFORM_RELATIONSHIPS variable using:
  export PLATFORM_RELATIONSHIPS="$(upsun tunnel:info --encode)"
upsun tunnel:single -p zzyyd54xpaq5m        
Are you sure you want to open an SSH tunnel to the relationship solr on the environment main (type: production)? [Y/n] 

SSH tunnel opened to solr at: http://127.0.0.1:30000/solr/collection1
curl -IL http://127.0.0.1:30000/solr/collection1/
HTTP/1.1 404 Not Found
Content-Security-Policy: default-src 'none'; base-uri 'none'; connect-src 'self'; form-action 'self'; font-src 'self'; frame-ancestors 'none'; img-src 'self' data:; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self';
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Cache-Control: must-revalidate,no-cache,no-store
Last-Modified: Fri, 11 Nov 2022 07:31:28 GMT
Content-Type: text/html
Accept-Ranges: bytes
Content-Length: 96

Correct URL should be http://127.0.0.1:30000/solr/

curl -IL http://127.0.0.1:30000/solr/
HTTP/1.1 200 OK
Content-Security-Policy: default-src 'none'; base-uri 'none'; connect-src 'self'; form-action 'self'; font-src 'self'; frame-ancestors 'none'; img-src 'self' data:; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self';
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Content-Type: text/html;charset=utf-8
Content-Length: 17035

Maybe a special case for Solr service has to be made in https://github.com/platformsh/legacy-cli/blob/main/src/Command/Tunnel/TunnelCommandBase.php#L188 ?

@pjcdawkins pjcdawkins linked a pull request May 29, 2024 that will close this issue
@akalipetis akalipetis added the CLI label Jul 2, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants