Goal: run Python program with MinIO access.
I can login via. Browser, and can upload/ edit files and am disconnected from VPN.
Ubuntu WSL can't see any sockets, such as my VPN when connected.
Powershell:
PS C:\> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 1
Terminal:
(sdg) me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ poetry run python -m sdg healthcare
Program started
Getting categories from Minio. Bucket: my-bucket
An exception of type MaxRetryError occurred. Arguments:
("HTTPConnectionPool(host='CENSORED.com', port=9000): Max retries exceeded with url: /my-bucket?location= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa1083cca00>: Failed to establish a new connection: [Errno -2] Name or service not known'))",)
Make sure to pass in a valid path or an array of categories
(sdg) me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ wget CESNORED.com
--2022-02-17 13:15:39-- http://CENSORED.com:9001/
Resolving CENSORED.com (CENSORED.com)... failed: Name or service not known.
wget: unable to resolve host address ‘CENSORED.com’
(sdg) me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ ss -s
ss: get_sockstat: No such file or directory
ss: get_snmpstat: No such file or directory
Total: 0
TCP: 0 (estab 0, closed 0, orphaned 0, timewait 0)
Transport Total IP IPv6
RAW 0 0 0
UDP 0 0 0
TCP 0 0 0
INET 0 0 0
FRAG 0 0 0
It fails to connect.
"Make sure to pass in a valid path or an array of categories"
Updated wsl.conf:
$ cat etc/wsl.conf
[network]
generateResolvConf = false
Powershell:
PS C:\Users\me> ipconfig /all
Windows IP Configuration
DNS Servers . . . . . . . . . . . : X.X.X.X
Copy the DNS IPv4.
Bash:
sudo nano /etc/resolv.conf
Type in nameserver X.X.X.X and save.
Powershell:
PS C:\Users\me> wsl.exe --shutdown
Open up Bash again:
wget <url>
Sources:
WSL2 - VPN Fix
Write to resolv.conf
Related
I am using the EC2 server with Putty.
I want to download the latest sonar-scanner to the EC2 server.
I tried to access the download-URL using both Wget & Curl but they kept failing with the same messages.
This is the server system I use: Red Hat Enterprise Linux Server 7.8 (Maipo)
WGET
GNU Wget 1.14 built on linux-gnu.
[root#ip-10-X-X-X ~]# wget -v https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip
--2022-06-09 09:56:55-- https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip
Resolving binaries.sonarsource.com (binaries.sonarsource.com)... 99.84.191.23, 99.84.191.71, 99.84.191.75, ...
Connecting to binaries.sonarsource.com (binaries.sonarsource.com)|99.84.191.23|:443... connected.
Unable to establish SSL connection.
CURL
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.44 zlib/1.2.7 libidn/1.28 libssh2/1.8.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets
[root#ip-10-X-X-X ~]# curl -O -v https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to binaries.sonarsource.com port 443 (#0)
* Trying 99.84.208.28...
* Connected to binaries.sonarsource.com (99.84.208.28) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
0 0 0 0 0 0 0 0 --:--:-- 0:00:29 --:--:-- 0* NSS error -5938 (PR_END_OF_FILE_ERROR)
* Encountered end of file
0 0 0 0 0 0 0 0 --:--:-- 0:00:30 --:--:-- 0
* Closing connection 0
curl: (35) Encountered end of file
I'm new with using this EC2 server. Do you know what could I do to solve this?
Thank you, any help would be really appreciated!
UPDATE:
I added -k and --no-check-certificate to respectively curl & wget, but still returning the same error messages
I tried to check the wget connection, but it doesn't seem to work for URLs with download end-point:
[root#ip-10-70-10-87 settings]# wget -q --spider https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip
[root#ip-10-70-10-87 settings]# echo $?
4
[root#ip-10-70-10-87 settings]# wget -q --spider https://www.google.com/
[root#ip-10-70-10-87 settings]# echo $?
0
[root#ip-10-70-10-87 settings]# wget -q --spider https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz
[root#ip-10-70-10-87 settings]# echo $?
4
[root#ip-10-70-10-87 settings]# wget -q --spider https://assets.ctfassets.net/br4ichkdqihc/6jNPyoUDznu06Mk4dr9CEn/560e34fec221fad43a501442a551ad92/SimpliSafe_Outdoor_Battery_Camera_Open_Source_Disclosures_Launch.DOCX
[root#ip-10-70-10-87 settings]# echo $?
4
[root#ip-10-70-10-87 settings]# wget -q --spider https://twitter.com/home
[root#ip-10-70-10-87 settings]# echo $?
0
I checked the availability of proxy following this answer (i.e. env | grep -i proxy), and nothing came up as response, so I assume I've got no proxy configured
Have you tried to update the OS and try to use the wget command without the -v flag like this:
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zi
you can also add --no-check-certificate or you can modify the ~/.wgetrc file and add
check_certificate = off
You can do this two things if you trust the host, hope this helps
May I know if you are using any proxies for this ec2? If yes could you try to execute the wget command with --no-proxy option.
Found a similar issue in here, perhap its good to check for tls version compatibility as mentioned in the answers: Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
On macOS High Sierra, nping is available via brew install nmap and it works:
nping --tcp-connect --count=1 --dest-port=443 8.8.8.8
Starting Nping 0.7.70 ( https://nmap.org/nping ) at 2018-04-04 18:46 PDT
libnsock mksock_bind_addr(): Bind to 0.0.0.0:0 failed (IOD #1): Invalid argument (22)
SENT (0.0030s) Starting TCP Handshake > 8.8.8.8:443
RCVD (0.0166s) Handshake with 8.8.8.8:443 completed
Max rtt: 13.790ms | Min rtt: 13.790ms | Avg rtt: 13.790ms
TCP connection attempts: 1 | Successful connections: 1 | Failed: 0 (0.00%)
Nping done: 1 IP address pinged in 0.02 seconds
nping --version
Nping version 0.7.70
Note the line echoed to stderr by macOS:
libnsock mksock_bind_addr(): Bind to 0.0.0.0:0 failed (IOD #1): Invalid
argument (22)
Any clever npingers able to explain how to fix this?
You need to run the command with root privilege. Try this:
sudo nping --tcp-connect --count=1 --dest-port=443 8.8.8.8
I just successfully installed Sybase ASE 16.02 Dev Edition on my Gentoo box. According to this command, the server is running:
igor#IgorReinCloud /opt $ /opt/sap/ASE-16_0/install/showserver
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
0 S igor 20774 20773 0 80 0 - 9270 poll_s Dec14 ? 00:00:00 /opt/sap/ASE-16_0/bin/backupserver -e/opt/sap/data/ASE-16_0/install/IGORREINCLOUD_BS.log -N25 -C20 -I/opt/sap/data/interfaces -M/opt/sap/ASE-16_0/bin/sybmultbuf -SIGORREINCLOUD_BS
0 S igor 20655 20654 1 80 0 - 694197 futex_ Dec14 ? 00:47:25 /opt/sap/ASE-16_0/bin/dataserver -sIGORREINCLOUD -d/opt/sap/data/data/master.dat -e/opt/sap/data/ASE-16_0/install/IGORREINCLOUD.log -c/opt/sap/data/ASE-16_0/IGORREINCLOUD.cfg -M/opt/sap/data/ASE-16_0 -N/opt/sap/data/ASE-16_0/sysam/IGORREINCLOUD.properties -i/opt/sap/data
However, when I try to connect, I get this error:
igor#IgorReinCloud /opt $ /opt/sap/OCS-16_0/bin/isql64 -Usa -SIGORREINCLOUD
Password:
CT-LIBRARY error:
ct_connect(): directory service layer: internal directory control layer error: Requested server name not found.
What am I missing?
Verify that your ASE server "IGORREINCLOUD" is defined in the file $SYBASE/interfaces (with $SYBASE your SYBASE home folder defined in your Linux user)
Vince
Is there are way to use SMTP to message pass between two linux servers? Even if they are not SMTP servers, I was wondering if I could just use SMTP to communicate between servers.
I have two ubuntu servers: 111.111.111.111 and 222.222.222.222. On each server I have set up user accounts master and node, respectively.
On 111.111.111.111, the file /var/spool/mail/master exists.
On 222.222.222.222, the file /var/spool/mail/node exists.
On 111.111.111.111, /etc/hosts has the line 222.222.222.222 node.us
On 222.222.222.222, /etc/hosts has the line 111.111.111.111 master.us
Assume that sudo iptables --list shows that port 25 is being accepted from all addresses
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp6 0 0 :::25 :::* LISTEN
Could I get something like this to work from the master (111.111.111.111) server?
sendmail -s "subject" node#node.us < sometextfile.txt
or some equivalent usint sendEmail or mutt, etc?
James -
Ideally you should be able to do what you are suggesting. You need to make sure that DNS resolution is working for those hosts files though - i did a quick test of this and I kept getting undeliverable for no AAAA (ipv6) record being found.
Also, the command to send you message should use the mail command instead of the sendmail, like this:
mail -s "subject" node#node.us < sometextfile.txt
i have managed to cross compile ntpd 4.2.6p5 for my arm box. I have a custom toolchain provided by the manufacturer.
Box is running busybox + some variant of debian linux.
So I have no installation of ntp and did a manual copy, created a conf file for the ntpd and tried to run it.
ntpd always returns this when in debug mode:
~/ntp # ./ntpd -c ntp.conf -d
ntpd 4.2.6p5#1.2349 Mon Apr 7 19:58:25 UTC 2014 (1)
9 Apr 07:39:44 ntpd[3592]: signal_no_reset: signal 13 had flags 4000000
9 Apr 07:39:44 ntpd[3592]: proto: precision = 91.000 usec event at 0 0.0.0.0 c01d 0d
kern kernel time sync enabled
Finished Parsing!!
9 Apr 07:39:44 ntpd[3592]: ntp_io: estimated max descriptors: 1024, initial socket
boundary: 16
9 Apr 07:39:44 ntpd[3592]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
9 Apr 07:39:44 ntpd[3592]: unable to bind to wildcard address :: - another process
may be running - EXITING
before that I had to add into /etc/services also
ntp 123/udp
my ntp.conf looks like:
~/ntp # cat ntp.conf
server 193.2.4.6
server 193.2.4.2
driftfile ntp.drift
So I have checked netstat and nothing is running on port 123, no ntpdate etc...
~/ntp # netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 eth0
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
~ # netstat -a | grep 123
~ #
Therefore it must be something with the config, or this arm box does not have something configured...
Oh and running manually ntpdate works:
~/ntp # ./ntpdate 193.2.4.6
9 Apr 07:49:16 ntpdate[3614]: step time server 193.2.4.6 offset -0.755704 sec
~/ntp #
So yes i could use ntpdate in cron, but this is not my intent!
Any idea?
Thank you and best regards!
The following error indicates that ntp had trouble binding to the ipv6 wildcard:
9 Apr 07:39:44 ntpd[3592]: unable to bind to wildcard address :: - another process
may be running - EXITING
I think your problem is ipv6 but it is hard to tell because your diagnosticinformation was not very good. Your netstat -a |grep 123 command is useless because netstat would substitute ntp for port 123. Try it again with:
netstat -a -n | grep 123
Along those lines netstat -rn only works with ipv4, try it again with -6:
netstat -r -n -6
Your test ntpdate used an ipv4 host. Does your server support ipv6? What happens when you run:
$ sntp -d -6 time.nist.gov
I used sntp because I do not know if ntpdate has a -6option and sntp does.