Getting problems while testing c_icap - cygwin

The drive link of the is https://drive.google.com/drive/folders/1gJLD-VEqo67wnEogyYvO-HrE8nwDRalC?usp=sharing
When I am testing c_icap in cywin it showing error when i run the server on the debug mode.
./configure
make LDFLAGS=-no-undefined
make install LDFLAGS=-no-undefined
c-icap -N -D -d 10
Its think its running the server
When i run the c_icap-client Its not showing any responses from the server
Help me to solve this please.

Related

ECONNREFUSED in docker with nodejs

I'm having a problem while writing my unit tests for my node application.
From my backend I contact Stripe APIs and Paypal APIs, my unit tests crashes every time I try to run my tests inside the docker because of a connection problem.
When I run the same tests from my local machine they pass without problems.
So I think this has to be with the ports exposure but I'm not sure because I'm not an expert.
This is the command I'm using to start my container:
docker run -p 8080:8080 -p 50000:50000 -v /Users/nicolovanzo/Documents/jenkins:/var/jenkins_home -v /Users/nicolovanzo/Documents/work/storm/backups/firestore:/var/jenkins_home/firestore -v /Users/nicolovanzo/Documents/work/storm/firebase_keys/dev.json:/var/jenkins_home/firebase_keys/dev.json jenkins/jenkins
In my code whenever I try to contact an API outside of my docker it crashes saying:
data: { code: 'ECONNRESET' }
I can't find any solution online so I think you can help me. I would be really happy if you can find a solution or lead me to it.

STRQSH vs start.sh difference

I'm on the IBM i v7r3
When I run a command/program interactively in Qshell it runs successfully. But when I try to run this in start.sh it fails with Command serve not found.
I start an interactive Qshell session.
STRQSH
$ cd node/vlegacireactjs
$ serve -s build -l 8010
The above starts a react server which I confirm is reachable when I point my browser at port 8010.
I am trying to run a program that will start the server in batch.
SBMJOB CMD(QSH CMD('/home/RROGERSON/node/vlegacireactjs/start.sh')) +
JOB(NODE_REACT) JOBQ(QS36EVOKE) CPYENVVAR(*YES)
And then start.sh contains
#1/usr/bin/sh
cd /home/RROGERSON/node/vlegacireactjs
serve -s build -l 8010
The job NODE_REACT fails (as seen in the QPRINT spool file) with Command serve not found .
Does anyone know what I have to add to start.sh to get this to run?
Thanks,
Rob
I should have paid more attention to the error. It was telling me the command serve was not found.
So I changed to
/QOpenSys/pkgs/lib/nodejs10/bin/serve -s build -l 8010
and the command is found. The module serve was installed globally.
Thanks for the suggestion Mark

Node JS web application deployment

I'm developing my first node js web application with Angular 6 front end.
The app works fine in the local environment, but it doesn't work in Azure web app service.
In my web app service, sample (hello world) node js app runs fine. But when I deploy my application which has Angular front end, it does not work(but pages are loading).
I think server is not running, but I don't know how to fix it. I have followed a lot of documentation, but none of them fixed my problem.
Please help. let me know if you need more info.
I'm getting this error when I request functionalities from server.
GET https://ntest4.azurewebsites.net/logincheck/actualusername/actualpassword 404 (Not Found)
ERROR e {headers: t, status: 404, statusText: "Not Found", url: "https://ntest4.azurewebsites.net/logincheck/actualusername/actualpassword", ok: false, …}
Dist folder structure:
You seems to use the HTML5 History mode, you may need to turn all other access to index.html on the service.
(and when I visit https://ntest4.azurewebsites.net, return no permission.)
Since you are using power-shell to log into your remote instance/service, the whole working environment will be different from your local's.
As I mentioned in the comments, you need to:
first, make sure the node -v is correct, as specific version required; if not, you have to manually install that following the node.js;
second, you need to re-install all required modules under your project folder npm install;
then, you should be able to start your project by ng serve.
Please have a check and let me know if anything goes wrong.
One more trick
You can check whether your server is up by
sudo lsof -i -P -n | grep LISTEN | grep 4200
or
sudo netstat -tulpn | grep LISTEN | grep 4200
in your remote.

Getting codeship deployments to digital ocean working

Oh god why is this so hard. I've now spent 3 days trying to get this seemingly simple crap to work.
I need it to:
- npm install on CI server (works)
- run tests (works)
- build angular frontend (works)
- ship code to server via rsync (works)
- ssh into server (works)
- - and npm install (doesn't work. dies because of npm warnings, I think)
- - restart pm2 process (doesn't work as there's no elegant way to say start or restart)
At the deploy step, I have this script in the codeship UI
rsync -avz --exclude 'node_modules' ~/clone/
root#xxx.xxx.xxx.xxx:/root/my-project/
ssh root#xxx.xxx.xxx.xxx cd /root/my-project && bash ./postDeploy.sh
Then the postDeploy.sh script is this:
#!/bin/sh
export PATH=$PATH:/usr/local/bin
npm install --silent &> /dev/null
/usr/local/bin/pm2 stop --silent keystone &> /dev/null
/usr/local/bin/pm2 start keystone.js 2> /dev/null
I'm trying to swallow errors with this trick. &> /dev/null
There are a few vulnerabilities in the project that are unfortunately deep inside a core module and not fixable by me so I need npm to just be quiet in this case.
Then there's the PM2 thing which is slightly annoying. I need to issue a stop command, but if the service is not running it will fail, so again I need to swallow errors. The start command is probably fine.
I think maybe what's happening now is that because I swallow all output codeship's script runner assumes it fails?
I have tried to use the half-baked debug tool, but it magically asks me for a password when I try to login in... Eh?
Also #codeship it would be amazing if 80% of the helpful articles that google has indexed didn't lead to dead pages on your site...
I have tried to use the half-baked debug tool, but it magically asks me for a password when I try to login in... Eh?
I'd say this was a correct instinct. There are too many possible scenarios for why you're coming across these unintended behaviors and nothing short of running the build live with a ssh debug session will likely get to the bottom of that.
Please see our documentation section for troubleshooting password prompts for ssh debug sessions.
If an ssh debug session doesn't solve your situation, then please reach out to us at support#codeship.com with your build url and we'll take a closer look.

Getting error in package.json while uploading to Openshift server

I am getting following error when i am trying to push my application to Openshift server. I have updated only package.json and trying to upload it on server then it showing this error.
So i have written couple of command to find out this error. So i found the following error but i am not getting what should i do now to fix this error.
My package.json is following below. If you think that there is some error in this package.json, please inform me. It is running fine on localhost but i do not know it is not able to find out package.json.
it's possible that the existing running application is not getting stopped correctly. Try using the rhc app stop command to completely stop your application, and then ssh to your gear (rhc ssh) and use the "ps -ef" command to make sure nothing else is running that would be taking up that port.

Resources