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

bash command -p not found #315

Closed
sandwormusmc opened this issue Jan 20, 2021 · 3 comments
Closed

bash command -p not found #315

sandwormusmc opened this issue Jan 20, 2021 · 3 comments

Comments

@sandwormusmc
Copy link

Describe the bug
After logging in, SSH gets a "bash: command not found '-p'".

To Reproduce
Steps to reproduce the behavior:
0. Spend a few hours trying to get Apache to reverse proxy wetty, finally get it to work

  1. Log in
  2. Get error

Expected behavior
Log in works successfully

Screenshots
image

Desktop (please complete the following information):

  • OS: Mac OSx
  • Browser: Chrome
  • Version: 87.0.4280.141

Smartphone (please complete the following information):
n/a

Additional context
Fedora 33 server. Checked user profile that gets error, does not happen in regular SSH session.

Checked in a bunch of areas, even tried digging through code and using strace to watch what the program is doing. Couldn't find anything, so I'm hoping someone has had this issue or knows where to else look.

Apache config (much larger but this part relates to wetty):
VirtualHost:443
...
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.) ws://localhost:3000/$1 [P,L]
<LocationMatch ^/wetty(.
)>
DirectorySlash On
Require all granted
ProxyPassMatch http://127.0.0.1:3000
ProxyPassReverse /wetty/
#LimitRequestBody 1048576000

...

systemd config:
[Unit]
Description="WeTTY Daemon"

[Service]
ExecStart=/usr/local/bin/wetty &
User=wetty
Group=wetty
Type=simple
#PIDFile=/run/anyterm/anytermd.pid
Restart=on-failure

[Install]
WantedBy=apache2.service

logs show:
Jan 19 21:52:07 localhost wetty[1622631]: {"meta":{"req":{"url":"/wetty/favicon.ico","headers":{"host":"127.0.0.1:3000","pragma":"no-cache","cache-control":"no-cache","sec-ch-ua":""Google Chrome";v="87", " Not;A Brand";v="99", "Chromium";v="87"","sec-ch-ua-mobile":"?0","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","accept":"image/avif,image/webp,image/apng,image/,/*;q=0.8","sec-fetch-site":"same-origin","sec-fetch-mode":"no-cors","sec-fetch-dest":"image","referer":"https://unrelated/wetty","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9","cookie":"io=GVwWQd-EAuDh4ojJAAAH","x-forwarded-for":"192.168.1.69","x-forwarded-host":"unrelated","x-forwarded-server":"www.mytld.com","connection":"Keep-Alive"},"method":"GET","httpVersion":"1.1","originalUrl":"/wetty/favicon.ico","query":{}},"res":{"statusCode":200},"responseTime":4},"level":"info","message":"HTTP GET /wetty/favicon.ico","label":"Wetty","timestamp":"2021-01-20T02:52:07.413Z"}
Jan 19 21:52:08 localhost wetty[1622631]: {"pid":1720926,"address":"matt@localhost","level":"info","message":"Process Started on behalf of user","label":"Wetty","timestamp":"2021-01-20T02:52:08.626Z"}
Jan 19 21:52:11 localhost wetty[1622631]: {"code":127,"pid":1720926,"level":"info","message":"Process exited","label":"Wetty","timestamp":"2021-01-20T02:52:11.226Z"}

@nakkaya
Copy link

nakkaya commented Jan 22, 2021

What you are experiencing is issue #308 . Downgrading should fix it.

@sandwormusmc
Copy link
Author

Thanks! I'll give it a shot

@sandwormusmc
Copy link
Author

Downgrading worked for me... went down the rabbit hole of trying to git clone and try out the fix mentioned in master... failed pretty hard with dependencies though. Will wait for 2.0.4 to be available in npm and go from there.

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