Deployd dpd "app" - listening on port then goes right to "bye" - deployd

I had deployd running just fine on my MAC OS, then I let it sit for a couple weeks.
Went back to it, launching the Deployd server with "dpd app_name"
I get the following:
listening on port 2403
type help for a list of commands
dpd > bye
I've tried to install/reinstall multiple times, it's doing it also on all deployd website examples.
I've tried changing the port, no luck
I've looked for an error log file. Couldn't find any.
I tried to go on Chrome and Safari, same thing: "Connection Refused".
Any idea, anyone?
Thanks in advance!

That happened to me, just type sudo before dpd.
$ sudo dpd
If you run:
$ DEBUG=* dpd
inside the app folder you will probably see the problem is with mongod, and run with sudo solves it.

Related

How do I resolve this OSError: [Erno 48] Address already in use error while working with the byob botnet on GitHub?

(I have seen other solutions to "Errno 48" issues on StackOverflow, but none have been successful yet.)
I am trying to develop a botnet using byob on github here: https://github.com/malwaredllc/byob
I am encountering a address in use error every time I run the command sudo ./startup.sh. It returns OSError: [Errno 48] Address already in use.
However when I attempt to use the ps -fA | grep python and kill the associated 502 18126 16973 0 9:16PM ttys000 0:00.00 grep python by using kill -9 181216, I get this error: kill: kill 18126 failed: no such process.
Does anyone have any idea what to do?
I am using a "MacOS M1Pro Chip OS V12.0.1 Monterey". Also the program byob is trying to run on port 5000 of IPv4 127.0.0.1 (this is a generic IP not specifically mine). http://127.0.0.1/5000.
In case you try to duplicate the problem you need to install docker.io or the docker desktop app depending on os then navigate to cd <outer-dir>/byob-master/web-gui then execute sudo ./startup.sh. The code will not work without access to docker, and the program needs to be ran with admin perms using the prefix sudo. The actual downloads take a while and it will prompt you to restart once. Then when you run it again, I encounter this problem...
Please let me know if someone was able to fix this. Thanks!

fail2ban won't start using nextcloud.log with jail

I have nextcloud installed and working fine in a docker but want to have fail2ban monitor the log files for brute force attempts. I know nextcloud has it's own baked in but it just throttles the log in attempts and I would like to all out ban them (I also have this problem with other containers as well). The docker-compose is set to create the nextcloud.log file to /mnt/nextcloud/log/nextcloud.log. I followed this guide to create the jail
https://www.c-rieger.de/nextcloud-installation-guide-ubuntu/#c06
Fail2ban is running on the host machine however, fail2ban fails to start with:
[447]: ERROR Failed during configuration: Have not found any log file for nextcloud jail
[447]: ERROR Async configuration of server failed
Thinking it was simply a permission issue, I chowned everything to root and tried to start again but still the service won't start. What am I doing wrong?
Thanks for the help!
The docker-compose is set to create the nextcloud.log file to /mnt/nextcloud/log/nextcloud.log
Be sure this file really exists and your jail.local has correct entry logpath:
[nextcloud]
...
logpath = /mnt/nextcloud/log/nextcloud.log
You can also check resulting config using dump:
fail2ban-client -d | grep 'nextcloud.*logpath'
But I'm still not sure the error message you provide was throwed by fail2ban, because its error messages look different, see https://github.com/fail2ban/fail2ban/commit/27947407bc7910f0f50972113218ebc73c4a22c7
It should be something like:
-have not found a log file for nextcloud log
+Have not found any log file for nextcloud jail

Bundle install is not working

I'm developing Ruby on Rails on Windows.
Something went wrong with our local network and can't access https://www.rubygems.org, seems like it is blocked or something.
But I can access it through http://www.proxyfoxy.com.
Below is the result of bundle install:
$ bundle install
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Could not fetch specs from https://rubygems.org/
Is there any other way to install gems through bundle install?
Open the Gemfile and change first line from this
source 'https://www.rubygems.org'
to this
source 'http://www.rubygems.org'
remove the 's' from 'https'.
As #Wasif mentioned, first make sure the Ruby Gems site is up and your network access is ok.
If they works fine, try it like this:
First, delete your Gemfile.lock file
Then run gem update --system
Then in your Gemfile try changing the first line source
'https://rubygems.org'to http:// (without an s)
Unless there is a problem with your connectivity this should fix the issue with bundle install.
I had the same issue and it happened to work when I shutdown the rails server before running bundle install
Sometimes,
Your DNS cause this problem.
You can change your DNS to 1.1.1.1 or 8.8.8.8
Instructions for mac
Go to preferences panel
Click on network panel
Click to advanced button
Go to DNS tab
Add DNS server (with '+' button)
Enter 1.1.1.1 OR 8.8.8.8
Click to Ok
And click to apply
But you can follow these steps:
http://www.macinstruct.com/node/434
Instructions for windows
https://www.windowscentral.com/how-change-your-pcs-dns-settings-windows-10
I faced the same issue but on Ubuntu, what helped was running:
env | grep proxy
which showed some active proxies like these:
https_proxy=127.0.0.1:8888
http_proxy=127.0.0.1:8888
After I removed each of them with the unset command:
unset https_proxy
unset http_proxy
I could run bundle install normally.
While gem is stalling, I ran netstat
netstat -tnp | grep ruby
and I got below output
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 1 2401:4900:188e:90:56960 2a04:4e42:600::644:443 SYN_SENT 4096/ruby
and 2a04:4e42:600::644:443 is one of the addresses of api.rubygems.org
My conclusion is that gem uses IPv6 when it can.
So disabling IPV6 on my workstation fixed it.
Below are the steps to temporarily disabled IPV6 on Ubuntu. IPV6 will be enabled after system restart.
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
Note: Use sudo for permission denied issue.
It's a connectivity issue.
I solved it through hideMe VPN. It is used to bypass blocked websites or for servers down only for a particular user.
Now everything seems to work just fine.
I was getting the same error when running bundle in a rails app. I solve the problem by running:
$ bin/bundle
Problem was that bundle was v1.17.3, while bin/bundle was version 2.0.2.
This mistake was very difficult for me. I was a day without being able to solve it but finally I turned off my wifi router and waited 1 minute to turn it on again. Then the error was fixed, hope it helps.
It is just a network issue.
follwoing things can help you to solve this problem -:
forget the network and reconnect it.
Turn on aeroplane mode of your mobile and again turn off it if you connected with mobile hotspot
Someone might find this useful: I had this error message when building a docker image and it turned out I had some custom dns settings in /etc/docker/daemon.json
In your Gemfile from the first line the source should be http:// instead of https://
change
sourçe  https://www.rubygems.org into
source  http://www.rubygems.org
Then you can run bundle install successfully
It's a connectivity issue.I solved it through hideMe VPN. it is used to bypass blocked websites or for servers down only for a particular user

React cannot find entry file in any of the roots

I am using React Native as a Pod in my iOS project.
When I try to load a view that I created with React Native I get the Error screen referring me to the Terminal window where npm is running.
In the Terminal the error I am seeing is:
Error: Cannot find entry file in any of the roots:
I tried a few things, moving the file to a different location, but no luck.
I did run "npm start" and I am looking for the file in "http://localhost:8081/".
The current location of the file is in the same location as where I ran "npm start" from.
I am completely stuck here.
Did I configure something wrong. How can I troubleshoot from here?
Check for the node server running in one of the bash terminal, this was probably kicked by previous ReactNative XCode project you launched earlier. Stop that process and run XCode project again, this should fix the problem.
Sorry for answering my own question (a bit lame), but I hope it helps somebody else.
Apperantly we need run the npm command by giving an alternative path.
npm run start -- --root <directory_with_your_react_component_js_sources>
On http://facebook.github.io/react-native/docs/embedded-app.html#content is a guide on how to integrate React Native in an existing app.
That happens when React wants to use a port that is already being used by other application. Since React listens to port 8081, you can get the process running at that port typing the following in Shell:
lsof -n -i4TCP:8081
You'll get an answer like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 28571 username 32u IPv6 0x742e2ab233abdb9f 0t0 TCP *:sunproxyadmin (LISTEN)
Just killed that by typing in shell
kill -9 <PID>. Use the same PID that has been provided in the last answer.
Then run npm start.
There's this issue:
https://github.com/facebook/react-native/issues/541
Which seems the same thing. The user there seemed to indicate that they had run the project from that directory before, which leads me to wonder if this is due to a hanging or left-over packager from a previous run? Try closing the terminal window and re-running the Xcode project.
In general this sounds like an issue with the packager not generating the files as expected. Are there any other messages in the terminal window?
I wanted to update this after getting a bit frustrated my setup still wasn't working after killing all node processes and running the command above.
There seems to be a ReactNative open issue at present: https://github.com/facebook/react-native/issues/14246
The solution for this is to kill the externally launched package manager and just run "npm start" in the project folder.
Check if you have index.ios or index in your AppDelegate.m:
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:#"index.ios" fallbackResource:nil];
I had index and I was previously using index.ios and index.android so that's why it was failing.
In my experience, it is because of Watchman and Jest.
The solution I've found is
add
name = name.replace('/', '\\');
to 'node_modules\jest-haste-map\build\crawlers\watchman.js'
You can check further info here
Watchman not working with React Native

Postgres Server error -> PGError: could not connect to server

I get the error below when trying to start my rails app on the localhost:
PGError (could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
From what I have read it sounds like this is most likely a problem in connecting to the Postgres server, and may indicate that it is not started?
It all started when I was attempting my first (yay noobs!) merge using git. There was a conflict (having to do with the Rubymine workspace.xml file), and I started to open up a conflict resolution program. It then seemed that there was really no need to track workspace.xml at all and so I quit from the resolution program, intending to run "git rm --cached" on the file. I think in quitting the program something went foul, and I ended up restarting, before untracking the file, and then completing the merge. Further evidence that something was gummed up is that my terminal shell didn't open up correctly until I restarted the machine.
Now, as far as I can tell, everything in the merge went fine (there were trivial differences in the two branches anyway), but for the life of me I can't seem to get rid of this PGError. If it is as simple as starting the server, then I'd love help on how to do that.
(other context: OSx, rails 3, posgresql83 installed via macports, pg gem).
EDIT - I have been trying to start up the server, but am not succeeding. e.g., I tried:
pg_ctl start -D /opt/local/var/db/postgresql83/defaultdb
This seems to be the right path for the data (it finds the postgresql.conf file) but the response I get is "cannot execute binary file."
Try sudo port load postgresql83-server - this should work with the latest 8.3 port from macports.
If this doesn't work, try sudo port selfupdate; sudo port upgrade outdated and then try again.
Note - this may take absolutely ages.
and may indicate that it is not started?
Yes, sounds like the server is not running on your local machine.
See the description of this error in the PostgreSQL manual:
http://www.postgresql.org/docs/8.3/static/server-start.html#CLIENT-CONNECTION-PROBLEMS
To start the server, try something along the following lines (adjust for pgsql version # and logfile):
sudo su postgres -c '/opt/local/lib/postgresql84/bin/pg_ctl -D /opt/local/var/db/postgresql8/defaultdb -l /opt/local/var/log/postgresql84/postgres.log start'
To stop the server,
sudo su postgres -c '/opt/local/lib/postgresql84/bin/pg_ctl -D /opt/local/var/db/postgresql84/defaultdb stop'

Resources