Unable to select a buildpack - dokku

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

Related

Can't find big file that's preventig git push

So I made a little error and at some point committed a big file called .RData that is 108 mb in size.
I, kind of panically, then did a git rm --cached .RData.
However, I still cannot push the commits to my remote.
After the git push, I always get this message:
remote: error: Trace: 7c9c0060d88b48827d9e9904b1934066d6c1246b93268a4344e430c0603181fe
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File .RData is 108.33 MB; this exceeds GitHub's file size limit of 100.00 MB
However, I don't know where to look for this .RData-file. Its certainly not in the directory and when I do a git rm --cached, I get:
fatal: pathspec '.RData' did not match any files
Maybe someone has an idea how I could get rid of this file.

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.

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

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)

PCF - dotnet_core_buildpack => Getting error exec: "git": executable file not found in %PATH%

I am getting an error => exec: "git": executable file not found in %PATH%
When I try to push the .Net Core 2 application to PCF.
The command I am using is :
cf push BTH -b https://github.com/cloudfoundry/dotnet-core-buildpack#v2.1.5
Updating app BTH...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
354.38 KiB / 354.38 KiB [=================================================================================] 100.00% 2s
Waiting for API to complete processing files...
Staging app and tracing logs... Cell
f518b117-f7b5-49c7-a13b-5e4a803f5bf5 successfully created container
for instance d820ec8d-86d6-4662-bc24-ca23fa2a2557 Downloading app
package... Downloaded app package (10.6M) exec: "git":
executable file not found in %PATH% Exit status 1 Cell
f518b117-f7b5-49c7-a13b-5e4a803f5bf5 stopping instance
d820ec8d-86d6-4662-bc24-ca23fa2a2557 Cell
f518b117-f7b5-49c7-a13b-5e4a803f5bf5 destroying container for instance
d820ec8d-86d6-4662-bc24-ca23fa2a2557 Cell
f518b117-f7b5-49c7-a13b-5e4a803f5bf5 successfully destroyed container
for instance d820ec8d-86d6-4662-bc24-ca23fa2a2557 Error staging
application: Staging error: staging failed FAILED
The staging gets failed.

flexunit on jenkins server --- ant unable to build without error

I have already installed vncserver, flex sdk 4.6 and xvnc plugin in my jenkins.
Not sure what else i need to do.
This is my last build error message from jenkins
Building in workspace <http://example.com:8080/job/flexproject%20develop/ws/>
Checkout:flexproject develop / <http://example.com:8080/job/flexproject%20develop/ws/> - hudson.remoting.LocalChannel#78da5318
Using strategy: Default
Last Built Revision: Revision 6eca1f87e583b1b7a99825ff075f2e4e4f3b87ea (origin/develop)
Fetching changes from 1 remote Git repository
Fetching upstream changes from git#github.com:simkimsia/STORYBOT.git
Commencing build of Revision 6eca1f87e583b1b7a99825ff075f2e4e4f3b87ea (origin/develop)
Checking out Revision 6eca1f87e583b1b7a99825ff075f2e4e4f3b87ea (origin/develop)
Starting xvnc
[flexproject develop] $ vncserver :16
New 'web1:16 (jenkins)' desktop is web1:16
Starting applications specified in /var/lib/jenkins/.vnc/xstartup
Log file is /var/lib/jenkins/.vnc/web1:16.log
[flexproject develop] $ ant
Buildfile: <http://example.com:8080/job/flexproject%20develop/ws/build.xml>
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
clean-all:
[delete] Deleting <http://example.com:8080/job/flexproject%20develop/ws/build/output/unit/generated-flexunit-config.xml>
[delete] Deleting <http://example.com:8080/job/flexproject%20develop/ws/build/output/unit>
[delete] Deleting <http://example.com:8080/job/flexproject%20develop/ws/build/output/report/flexunit>
[delete] Deleting <http://example.com:8080/job/flexproject%20develop/ws/build/output/report>
clean:
[echo] Storybot :: clean finished.
test-air:
[copy] Copying 1 file to <http://example.com:8080/job/flexproject%20develop/ws/build/output/unit>
[echo] run-flexunit :: setting FLEX_HOME to ${env.FLEX_HOME}
[mkdir] Created dir: <http://example.com:8080/job/flexproject%20develop/ws/build/output/report/flexunit>
BUILD FAILED
<http://example.com:8080/job/flexproject%20develop/ws/buildsupport/target/test-air.xml>:4: The following error occurred while executing this line:
<http://example.com:8080/job/flexproject%20develop/ws/buildsupport/base/base-macros.xml>:212: The following error occurred while executing this line:
<http://example.com:8080/job/flexproject%20develop/ws/buildsupport/base/base-macros.xml>:174: Please specify, or verify the location for, the FLEX_HOME property. It is required when testing with 'air' as the player or when using the 'testSource' element. It should point to the installation directory for a Flex SDK.
Total time: 2 seconds
Build step 'Invoke Ant' marked build as failure
Terminating xvnc.
$ vncserver -kill :16
Killing Xvnc4 process ID 28784
Recording test results
inside my workspace project, i ran ant build.xml
i get
jenkins#web1:~/workspace/flexproject$ ant build.xml
Buildfile: /var/lib/jenkins/workspace/flexproject/build.xml
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
BUILD FAILED
Target "build.xml" does not exist in the project "flexproject".
Total time: 2 seconds
int he same folder when i run ant
i get
Buildfile: /var/lib/jenkins/workspace/flexproject/build.xml
[taskdef] Could not load definitions from resource flexTasks.tasks. It could not be found.
clean-all:
[delete] Deleting /var/lib/jenkins/workspace/flexproject/build/output/unit/generated-flexunit-config.xml
[delete] Deleting /var/lib/jenkins/workspace/flexproject/build/output/unit
[delete] Deleting /var/lib/jenkins/workspace/flexproject/build/output/report/flexunit
[delete] Deleting /var/lib/jenkins/workspace/flexproject/build/output/report
clean:
[echo] Storybot :: clean finished.
test-air:
[copy] Copying 1 file to /var/lib/jenkins/workspace/flexproject/build/output/unit
[echo] run-flexunit :: setting FLEX_HOME to /opt/flex
[mkdir] Created dir: /var/lib/jenkins/workspace/flexproject/build/output/report/flexunit
BUILD FAILED
/var/lib/jenkins/workspace/flexproject/buildsupport/target/test-air.xml:4: The following error occurred while executing this line:
/var/lib/jenkins/workspace/flexproject/buildsupport/base/base-macros.xml:212: The following error occurred while executing this line:
/var/lib/jenkins/workspace/flexproject/buildsupport/base/base-macros.xml:174: Could not create test runner from template.
Please advise.
Thank you.
Could not load definitions from resource flexTasks.task
hints that you missed to set the path to your flex4.6 directory (lib/*.jar inside) correctly.

Resources