Permission denied for protoc on maven build in Teamcity - maven

I am trying to build a project using maven on teamcity and getting this error during maven build step.
[Step 2/4] [ERROR] protoc failed output:
[Step 2/4] [ERROR] protoc failed error: /bin/sh: 1: protoc: Permission denied
[Step 2/4] [13:03:14][Step 2/4] Failed to execute goal
com.google.protobuf.tools:maven-protoc-plugin:0.1.10:compile
(generate-sources) on project unit-protocol-lib: protoc did not exit
cleanly. Review output for more information.
Keep in mind I am using docker-compose for building the teamcity agent (agent running in container) and protoc is added to /usr/local/bin/protoc ($PATH has /usr/local/bin, /usr/local/bin/protoc has rwx permissions).
EDITED for ease
Forget everything above for a while.
I logged into the buildagent of teamcity server, access the shell using /bin/sh and execute the command protoc and it returns the error:
protoc failed error: /bin/sh: 1: protoc: Permission denied
Any help??

I had the same issue.
What I found was that the error message was misleading.
Here's what worked for me:
Try this:
protoc ./proto/hello/hello.proto --go_out=plugins=grpc:./outputDirectory -I ./proto/hello/hello.proto
Parts of the command obviously look redundant, but this was what I had to do to get it working. I recommend trying this, and see if it runs. If it does then you can see if you're able to tweak it, but I don't think so.
if "." is your output, then do this:
protoc ./proto/hello/hello.proto --go_out=plugins=grpc:. -I ./proto/hello/hello.proto
Notice that you don't need space.

Answer from the future (for someone like me who ran into this problem).
In folder with project in cmd:
chmod +x ./proto-gen.sh

Related

CircleCI FBReactNativeSpec-generated.mm file not found

I am building an app on CircleCI. I have tried xcodebuild and fastlane scan. After dependencies successfully install, the follow build error occurs.
Testing failed:
Build input file cannot be found: '/Users/distiller/project/node_modules/react-native/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm'
** TEST FAILED **
[17:53:06]: Exit status: 65
[!] Error building the application. See the log above.
However, if I run the test command locally or SSH into CircleCI, then the build succeeds. What is the problem?

Unable to run the flutter code getting error

Unable to run the flutter code getting error
Failed to capture snapshot of input files for task
'javaPreCompileDebug' property 'compileClasspaths' during up-to-date
check. > Error snapshotting jar [flutter.jar]
Finished with error: Gradle build failed: 1
Try
git clean -xfd
git pull
flutter doctor
in your Flutter install directory to fix your Flutter installation.

when executing the go get command to install fabric-ca, I'm getting an error

when executing
go get -u github.com/hyperledger/fabric-ca/cmd/
from the fabric-ca guide, I get the following error:
# cd /home/pi/go/src/github.com/hyperledger/fabric-ca; git pull --ff-only
error: cannot open .git/FETCH_HEAD: Permission denied
package github.com/hyperledger/fabric-ca/cmd: exit status 1`
I tried git cloning and it downloaded everything from the fabric-ca repository, then I tried installing fabric-server and client by myself like this:
sudo make fabric-ca-server
this also produced the following error:
Building fabric-ca-server in bin directory ...
/bin/sh: 1: go: not found
Makefile:91: recipe for target 'bin/fabric-ca-server' failed
make: *** [bin/fabric-ca-server] Error 127
Looks like your GOPATH is set to /home/pi/go and appears that you do not have access to somewhere along the path to /home/pi/go/src/github.com/hyperledger/fabric-ca.
I'd check make sure that the user you are running go get with has R/W access to /home/pi/go/src

How can I fix the following Google Cloud Platform deployment error? [Error 2]

I'm trying to deploy my web-app to Google Cloud Platform, and I got an error while deploying. I understand that last package (go-sqlite3) needs gcc compiler, and Google Cloud WM has it:
$which gcc
/usr/bin/gcc
but it won't work
Step 3 : RUN go-wrapper install -tags appenginevm
---> Running in b0f03024342d
+ exec go install -v -tags appenginevm
github.com/mattn/go-colorable
github.com/mattn/go-isatty
github.com/labstack/gommon/color
github.com/valyala/fasttemplate/vendor/github.com/valyala/bytebufferpool
github.com/valyala/fasttemplate
github.com/labstack/gommon/log
golang.org/x/crypto/acme
golang.org/x/crypto/acme/autocert
github.com/labstack/echo
golang.org/x/net/context
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in $PATH
The command '/bin/sh -c go-wrapper install -tags appenginevm' returned a non-zero code: 2
ERROR
ERROR: build step "gcr.io/cloud-builders/docker#sha256:926dc1a14e6f7eb5b3462b5c1d491aa6c73090291167ac2bf181c026b05f19da" failed: exit status 2
You have to make your path correct by following command on your shell.
PATH=/usr/bin:$PATH

Scrapinghub deployment error: non-exit status 1

i get this error mesage when I try to deploy my project and I really do not understand why:error log
shub is unable to build the Python egg of your project. This could be related to a misconfigured setup.py. Try running the 'build egg' command yourself so you can take a look at the error message: python setup.py clean -a bdist_egg -d temp_directory (run it in your project directory).
If you don't have any custom/important code in your setup.py, you can try deleting it, and shub will auto-generate a vanilla one on the next deploy.

Resources