Matterbridge does not start on Heroku - is there a way I can check how the build on the plattform looks like? - http

As showcase and demo version I want to run a matterbrige within the free plan of heroku. For this i found this nice repository from patcon. He forked it and improved it in my eyes by explaning how you run it as web dyno in a permanent way and so it also accepts hhtp requests like webhooks. For deploying the app I decided to take the git push method.
I have cloned the repo from patcon to my windows machine, configured it to my needs and pushed it to heroku. In the beginning this was not working because the build environment did not detect the buildpack. So I set the Environment Variable BUILDPACKS_URL to https://github.com/patcon/matterbridge-heroku#master
Afterwards the build was sucessfull, but there were multiple problems. Within the logs it was mentioned, that the permission for executing start.sh and envsubst is denied. Like in the docs from Heroku mentioned, I created the .profile file with chmod +x for start.sh and lib/envsubst.
So git is converting line ending from the windows format to the linux one. But not the permissions. In the end I don't know if the download is working.
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Writing objects: 100% (3/3), 318 bytes | 318.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Matterbridge app detected
remote: -----> Downloading Matterbridge: https://github.com/42wim/matterbridge/releases/download/v1.17.5/matterbridge-linux-amd64
remote: -----> Discovering process types
remote:
remote: -----> Compressing...
remote: -----> Launching...
remote: Released v35
remote: https://???.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
But even if I change within the bin/compile file the path and version of the download, it always downloads the version v1.17.5. Also if I change it with app.json. To be honest I have only a guess what this file does. I guess it is if used when I want to deploy an app via this heroku button method to set the environment variables.
The following message indicates for me, that the matterbridge executeable is not downloaded or not in the right place.
2020-06-19T17:37:13.074592+00:00 app[web.1]: [heroku-exec] Starting
2020-06-19T17:37:13.116550+00:00 app[web.1]: ./matterbridge: line 1: Not: command not found
2020-06-19T17:37:13.181167+00:00 heroku[web.1]: Process exited with status 127
2020-06-19T17:37:13.214787+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-19T19:10:11.450748+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-19T19:10:11.759082+00:00 heroku[web.1]: Starting process with command `./start.sh`
2020-06-19T19:10:14.649261+00:00 app[web.1]: [heroku-exec] Starting
2020-06-19T19:10:14.671276+00:00 app[web.1]: ./matterbridge: line 1: Not: command not found
2020-06-19T19:10:14.732134+00:00 heroku[web.1]: Process exited with status 127
2020-06-19T19:10:14.787002+00:00 heroku[web.1]: State changed from starting to crashed
I tried to look via heroku ps:exec if i can see the folder structure. But because the dyno exits after the failure that is not possible. And I also tried to run heroku local to see if the app is build localy. But it is not.
Like I explained earlier while the push and the pre-build it does not download the other versions when I configure it I guessed that there is an over good meant caching activated. So I tried to clean the cache with heroku repo:purge_cache.
Can anyone help me or give me a hinter. Thanks in advance

ohai! I found this while unrelatedly searching for "envsubst heroku" on google, but then saw my name and decided to click through :) kinda wild...!
Anyhow, I think your issue is that I hardcoded the download url based on an old format of naming the binary assets that 42wim was using:
https://github.com/42wim/matterbridge/releases/download/vX.Y.Z/matterbridge-linux-amd64
and it seems he's now using:
https://github.com/42wim/matterbridge/releases/download/vX.Y.Z/matterbridge-X.Y.Z-linux-amd64
So just hardcoding the direct download link or making a fix to the buildpack should work (backward compat would mean finding where the name change started, which should be sometime after Dec 2018 when I was working on this)

Related

Cloud Run Run/Debug has stopped working - Exited with code 127

The cloudrun debug in cloud shell was working. It is no longer working for me with the following output.
I have 1) rebooted the VM and 2) I have tried another project that was also working previously.
I suspect something has changed in my environment
Starting to debug the app using configuration 'Cloud Run: Run/Debug
Locally' from .vscode/launch.json... To view more detailed logs, go to
Output channel : "Cloud Run: Run/Debug Locally - Detailed" Dependency
check started Dependency check succeeded Unpausing minikube flag needs
an argument: --status-check See 'skaffold debug --help' for usage.
Exited with code 127. Cleaning up... Finished clean up.
This bug was introduced in the v1.17.1 release of Cloud Code for VS Code, due to a change in v1.37.0 of Skaffold related to the --status-check parameter. This bug was addressed in v1.17.2 of Cloud Code for VS Code, and upgrading to this version (or later) should fix this issue.

Error staging application: App staging failed in the buildpack compile phase in HWC Buildpack

I am trying to deploy my application built in ASP.Net 4.6.1. So I am using HWC Buildpack.
Below is my manifest.yml
---
applications:
- name: DRSN
random-route: true
memory: 128M
buildpack:
https://github.com/cloudfoundry/hwc-buildpack.git
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
The error that I am receiving is below.
Waiting for API to complete processing files...
Staging app and tracing logs...
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 creating container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 successfully created container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Downloading app package...
Downloading build artifacts cache...
Downloaded build artifacts cache (231B)
Downloaded app package (19.5M)
Failed to compile droplet: Failed to compile droplet: fork/exec /tmp/buildpackdownloads/6c6dca8d638ac0d145d6581f9eb9a96a/bin/compile: permission denied
Exit status 223
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 stopping instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 destroying container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Error staging application: App staging failed in the buildpack compile phase
Can anyone help me resolve this issue? Am I not correct in my manifest.yml? Or is it something else?
I believe that the problem is that you're telling the system to use the HWC buildpack, but at the same time you're not setting the Windows stack (at least based on what info I can see). That means it's going to default to the Linux stack, which I believe is why you're seeing the fork/exec /tmp/buildpackdownloads/... error.
Try adding stack: windows to your manifest.yml or -s windows to your cf push command (for future reference, when you need help always include the full cf push command you're running).
PS: you shouldn't use https://github.com/cloudfoundry/hwc-buildpack.git that is telling the system to grab the master branch in whatever state it's currently in. That's a.) not reproducible and b.) not guaranteed to be in a working state. You should either use the platform provided buildpack names (from cf buildpacks) or append #<branch_or_tag> to the end of the URL so it picks a specific branch. All CF Buildpacks have tags for each release. It's strongly recommended you use a tagged release.

making first commit into diffusion git :Phabricator

I am setting up a phabricator server and i am observing the below issue, both from my diffusion repository Status window and the daemons.log file
Error updating working copy: Command failed with error #128!
COMMAND
git log --format='%H%x01%P%x01%ct' --all --
STDOUT
(empty)
STDRR
fatal: bad default revision 'HEAD'
After reading on this issue, i figured out that this is a common issue with bare repositories without first commits. So i tried committing from my local system through repository http URI, but it is returning a 500 exception.
below is the error message i pulled out from phabricator database:
$ select * from phabricator_repository.repository_pullevent;
500 | {"response.message":"Error 1: sudo: a password is required\n"}
Can any one help me out to understand the issues from repository_pullevents and daemons.log file.
thanks in advance!
i resolved the problem with sudo, by changing the user running apache and adding the symlink created for git-http-backened in sudoers for the apache user.
and the problem with repository bad HEAD revision was resolved by making the first commit from a client machine.

Unable to select a buildpack

I'm pretty new to dokku. I've setup a new dokku droplet at DigitalOcean. I created a small static website with a www directory containing a single HTML file named index.html. In the root dir I added an empty .nginx file. When I tried to push, I got the following output:
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 356 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
-----> Cleaning up ...
remote: Cloning into '/tmp/tmp.FFdk4jjPhW'...
-----> Building dokkutest ...
remote: warning: You appear to have cloned an empty repository.
remote: done.
remote: HEAD is now at 0046a12... First implementation
-----> Unable to select a buildpack
To dokku#123.123.123.123:dokkutest
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku#123.123.123.123:dokkutest'
Any thoughts on what I might be doing wrong?
Apparently, the nginx buildpack is no longer installed with dokku by default. I've used these steps to set things up:
https://florianheinemann.com/github/dokku/2014/11/17/Hosting-static-pages-on-Dokku.html

Meteor 0.5.0 examples not running on Windows

Fresh install of Meteor 0.5.0 on Windows Vista. I don't get the basic examples working. No success after creating the empty'ish hello app either. The shell is running as admin. Meteor recognises that I changed a source file, but then nothing. It doesn't matter where in the filesystem i try this. Always getting
Exited with code: -1073741819:
eg
C:\Users\jawford\Meteor Apps\Examples>meteor create starter3
starter3: created.
To run your new app:
cd starter3
meteor
C:\Users\jawford\Meteor Apps\Examples>cd starter3
C:\Users\jawford\Meteor Apps\Examples\starter3>meteor
[[[[[ C:\Users\jawford\Meteor Apps\Examples\starter3 ]]]]]
Running on: http://localhost:3000/
Exited with code: -1073741819
Exited with code: -1073741819
Exited with code: -1073741819
Your application is crashing. Waiting for file change.
=> Modified -- restarting.
Exited with code: -1073741819
Exited with code: -1073741819
Exited with code: -1073741819
Your application is crashing. Waiting for file change.
^CTerminate batch job (Y/N)? y
C:\Users\jawford\Meteor Apps\Examples\starter3>
If you run into this problem using Windows 8, you will need to change compatibility mode for the node executable.
Go to the folder where you installed Meteor
Open properties for bin/node.exe
Set compatibility mode for Windows 7
You should now be able to start the application as you did earlier.
This has to do with Fibers not loading correctly. You can attempt to run app/meteor/meteor.js with bin/node, both are in the Meteor directory in Program Files. This could maybe give you more details why it is crashing. It might also be handy to run the tests in the lib/node_modules/fibers folder which might point out why Fibers is misbehaving.
The exit code -1073741819 corresponds to C0000005 which indicates an access violation.
Many users find that setting compatibility mode to "Windows 7" solves that problem, but it doesn't always and there is some evidence that it also occurs on Windows 7.
Investigating a later issue on win Meteor 0.5.9, I discovered a problem with fibers on windows that may explain this issue, and I have a tentative fix.
Please see: https://github.com/TomWij/meteor/issues/66#issuecomment-15994548 for further details.

Resources