Issue
SpringXD's module delete command is deleting the module from SpringXD DIRT (module list command does not show the delete module) but is not deleting the uploaded .jar file in /xd/custom-modules/job directory. The reason is that .jar file is used by a java process even after the deployed module is deleted from SpringXD DIRT. If I restart the admin and container I can delete the file.
using module upload command with --force option results in following error:
java.lang.IllegalArgumentException: Could not install Uploaded module
'job:ang-im-job' at location file
[C:\install_dir\xd\custom-modules\job\batch-job.jar]
as that file already exists
I am using SpringXD 1.2 and on Windows 7. Is this something to do with OS?
Below are the scripts, I am going to parameterize them and integrate with automated deployment tool so that same scirpts can be used for deploying modules in SpringXD DIRT.
upload_module.bat
set
ASSEMBLY_PATH=C:\path_to_assembly\batch-job-01.00.00.00-SNAPSHOT.jar
set MODULE_NAME=batch-job
set MODULE_TYPE=job
cd %XD_INSTALL_DIR%\shell\bin\
xd-shell module upload --force --file %ASSEMBLY_PATH% --name
%MODULE_NAME% --type %MODULE_TYPE%
deploy_job.bat
set MODULE_NAME=batch-job
set DEPLOY_JOB_NAME=batch-job
cd %XD_INSTALL_DIR%\shell\bin\
xd-shell job create --name %DEPLOY_JOB_NAME% --definition
"%MODULE_NAME%" --deploy
destroy_job.bat
set DEPLOY_JOB_NAME=batch-job
cd %XD_INSTALL_DIR%\shell\bin\
xd-shell job destroy --name %DEPLOY_JOB_NAME%
delete_module.bat
set MODULE_NAME=batch-job
cd %XD_INSTALL_DIR%\shell\bin\
xd-shell module delete --name job:%MODULE_NAME%
Issue is with the OS. On Windows module delete command is not deleting the .jar file after it deletes from SpringXD DIRT environment. No such issues on Linux.
In my case, though the XD shell said the below error, i don't see the module in admin-ui
xd:>module delete --name job:reverseJob
Command failed org.springframework.xd.rest.client.impl.SpringXDException: Could
not delete module 'job:reverseJob'
Related
I am trying to set up a debugger for my application which is running inside my Kubernetes pod in the EKS cluster .
I have one through many articles but they all talk about setting up a debugger for local env .
I am using helm charts and EKS for the Kubernetes cluster.
Please help me with this problem.
I tried Dockerfile changes to install delve but CMD and ENTRYPOINT command both are failing with
exec: "go": executable file not found in $PATH
My docker file looks like
Stage 1: Compile the Golang application
FROM golang:1.18-alpine AS builder
WORKDIR /application
COPY . /application
RUN GOOS=linux GOARCH=amd64 go build -v -x -o app --ldflags '-extldflags "-static"'
Stage 2: Move only the compiled code to container
FROM alpine:latest
WORKDIR /application
COPY --from=builder /application/app /application
RUN apk add --no-cache delve
# let's start delve as the entrypoint
ENTRYPOINT ["/usr/bin/dlv", "debug", ".", "--listen=:40000", "--accept-multiclient", "--headless=true", "--api-version=2" , "exec" , "./app" ]
Not an expert in Go but in the second stage you are copying the files from first stage to the second one.
Those files could be the executable or source code
In the second stage you have installed the delve but when you are adding the Entry point or CMD it's showing error of this
exec: "go": executable file not found in $PATH
it's due to the second stage is alpine won't have Go installed by default and as you have not copied Go binary from the first to the second stage so showing a path error or missing error as dlv might be requiring it in background.
What you can do is install it with in first stage and move to second stage
RUN CGO_ENABLED=0 go install github.com/go-delve/delve/cmd/dlv#latest
stage 2
COPY --from=builder /go/bin/dlv /usr/bin/dlv
when I run command./config.sh --- while trying to setup GitHub runner on server I get this error
An error occurred: Permission to read the directory contents is required for '/var/www/usr/data/actions-runner' and each directory up the hierarchy. Access to the path '/var/www' is denied.
folder /var/www/ is owned by root, and usr running /.configure command has proper rights on /usr/data/action-runner
I tried running above command after adding "usr" to sudo then it tells me command must not run as sudo. So there is no winning here. I personally do not want to run command as sudo so I didn't try to figure out this error.
But, burning question I have is why does this configure script cares if it has read permission on /var/www/
This kind of does not addup
You can run sudo chmod 0755 /var/www, which fixed the problem for me
Hi I am new to programming and I hope someone can help with this.
A team mate of mine did some changes yesterday through github and now we get this error when we want to "gcloud app deploy on our gcloud": "ERROR: gcloud crashed (FileNotFoundError): [Errno 2] No such file or directory: '/home/name/project/venv/bin/python3.8'."
The app itself still works but it seems we can not deploy anymore as we get this error. Really appreciate you reading this, thanks.
The error (No such file or directory: '/home/name/project/venv/bin/python3.8') suggests that, a virtualenv (venv) was running (perhaps while gcloud was installed) and it is no longer effective (unable to find /home/name/project/venv/bin/python3.8 in the path).
To reactivate the virtualenv, you can:
source /home/name/project/venv/bin/activate
Which should put python3.8 back in your path:
which python3.8
/home/name/project/venv/bin/python3.8
And should return gcloud to a working state for the current shell session.
When that session ends, you'll need to rerun the source ... command.
It's good practice to explicitly deactivate the virtualenv when you're done with it.
Often, when running, the command shell is prefixed with (venv) to indicate that you're in a virtualenv:
# Create a virtualenv in `xxxx`
python3.8 -m venv xxxx
# Activate `xxxx`
me#host:~ $ source xxxx/bin/activate
# Note my prompt is prefixed with `(xxxx)`
(xxxx) me#host:~ $ which python3.8
/home/me/xxx/bin/python3.8
# Within the virtualenv, `python3.8` is ln'd
(xxxx) me#host:~ $ ls -l $(which python3.8)
/home/me/xxx/bin/python3.8 -> /usr/bin/python3.8
# Deactivate `xxxx`
(xxx) me#host:~ $ deactivate
me#host:~ $ which python3.8
/usr/bin/python3.8
(xxxx) me#host:~ $ deactivate
NOTE In the example above, rather than use the customer venv directory, I'm using xxxx to demonstrate the point.
I have installed windows subsystem for Linux to run Ubuntu 16.04 on my windows 10 home platform.
I have extracted all required directories to run KSQL on this platform.
Now, when I am trying to run any command after navigating to the bin folder. It's throwing command not found error. I tried to add PATH as well but it's not working.
Please suggest.
There's a typo in your command:
export PATH=$PATH:/opt/kafka/confleuent-5.4.0/bin
Instead of confluent-5.4.0 you misspelled it confleuent-5.4.0.
The easiest way to install Confluent CLI, is by making use of the scripted installation:
Install the Confluent CLI using this script. This command creates a
bin directory in your designated location (<path-to-directory>/bin).
The location must be in your PATH (e.g. /usr/local/bin). On Microsoft
Windows, an appropriate Linux environment may need to be installed in
order to have the curl and sh commands available, such as the Windows
Subsystem for Linux
curl -L https://cnfl.io/cli | sh -s -- -b /<path-to-directory>/bin
Finally, if you run confluent start you can get all services up and running, including KSQL (assuming that you have correct configuration files).
You could just use the path
cd bin
./kafka-topics.sh
Also, all those commands work in CMD / PowerShell as well
If you want to run KSQL, I'd suggest just using Docker
I have created a model now I am using this command to restart the module
but it is showing this error
using this command to restart module
odoo start --config=/etc/odoo/odoo.conf -i HelloModule
the error is
odoo: error: The config file '/etc/odoo/odoo.conf' selected with -c/--config doesn't exist or is not readable, use -s/--save if you want to generate it
the screenshot of the file which error shows that it is not available
Try adding readable permission to config file by chmod command
sudo chmod +r etc/odoo/odoo.conf
Check this link to know more about modifying file permissions.