Failed to connect from jdeveloper to weblogic server jsr 160 failed - weblogic

I'm trying to connect from Jdeveloper to a remote Weblogic server. This is what I get when testing the connection.
Some say that one should disable jdeveloper's proxy settings. I did so, and it didn't change anything. Any help !

Try to run your JDeveloper as administrator (it's a common 'mistake' for Windows users).
If that doesn't work you should read this blog post: http://sathyam-soa.blogspot.be/2012/06/jdeveloper-11g-cannot-establish-app.html

Add the server's host name in the "hosts" file in the client's operating system.
Next time when you add an application server in jdeveloper, don't input the ip, type the hostname instead.

One additional possible issue is when the domain is running in a docker container and you had the Dockerfile expose the AdminServer port externally, which then means it is proxied via the host system. In that case, you want to point WebLogic Hostname not to the IP or hostname of the container, but of the physical machine instead.
So you run the netstat command, like:
host> netstat -nap | grep 7001
tcp 1165 0 172.17.42.1:35464 172.17.0.1:7001 CLOSE_WAIT 32752/java
tcp 1 0 172.17.42.1:33738 172.17.0.1:7001 CLOSE_WAIT 32752/java
tcp 1 0 172.17.42.1:33746 172.17.0.1:7001 CLOSE_WAIT 32752/java
tcp 1165 0 172.17.42.1:35123 172.17.0.1:7001 CLOSE_WAIT 32752/java
tcp 0 0 :::7001 :::* LISTEN -
You see the interim / proxy listed above, 172.17.42.1. You can check via the ifconfig command and see the docker proxy is that IP address:
host> ifconfig
docker0 Link encap:Ethernet HWaddr 56:84:7A:FE:97:99
inet addr:172.17.42.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:429422 errors:0 dropped:0 overruns:0 frame:0
TX packets:356600 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:228869726 (218.2 MiB) TX bytes:322146511 (307.2 MiB)
That tells you that there is a proxy in the mix, so instead of using the hostname / IP address of the container running the Admin Server, use the hostname of the machine running the docker container and the Admin Server port. Then the Test should succeed.

Related

Can not connect to tensorboard on my google compute engine

I am trying to connect to tensorboard on my google compute engine instance but it is not working.
I have an anacondo distribution and use:
tensorboard --logdir=/logs
to create my tensorboard at default port 6006.
I also allowed HTTP/HTTPS traffic at my instance and also edited my firewall rules to allow traffic at:
IP ranges: 0.0.0.0/0
tcp:6006
udp:6006
But, when I try to acess my tensorboard at
http://EXTERNAL_IP:6006
I get a timeout loading.
Can anybody help me?
Normally this type of configuration is related to port communication issues. Go ahead and get all the available ports with nmap, and you should see something as following:
$ nmap -Pn [YOUR IP ADDRESS]
PORT STATE SERVICE
22/tcp open ssh
80/tcp closed http
443/tcp closed https
3389/tcp closed ms-wbt-server
Once, you confirm if the port "6006" is open, check if it can connect to your server with a telnet:
$ telnet [YOUR IP ADDRESS] [YOUR PORT]
telnet: Unable to connect to remote host: Connection refused
If you get "connection refused" make sure not only that this port is "open" but that it's "listening" as well (remember this needs to be configured on your application in your web server). You can check that with a netstat as following:
$ netstat -an | egrep -w “6006”
And you should see something like this (example for port 22):
$ netstat -an | grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
If it says 127.0.0.1 on the Local Address column, it means that port is ONLY listening for connections from your PC itself, not from the Internet or network. If it says 0.0.0.0, it means that port is listening on all 'network interfaces' (i.e. your computer, your modem(s) and your network card(s)).
Thus, the IP you need is the one as the example (0.0.0.0), since this means all IPs can reach that specific port. Plus, you must see the “Listen” status.
In addition, make sure to set up properly the Firewall rules in GCP and your software running on the instance itself to allow traffic to/from this port “6006” in specific, either to any instance or to a specific one using network tags.

Vagrant not connecting to private ip address

I am totally new to SSH and Vagrant so this might be a really noob question..
I am trying to connect to a private IP address on vagrant by defining my server like below :
config.vm.define "server" do |server|
server.vm.network "private_network", ip: "192.168.1.10"
server.vm.network :forwarded_port, guest: 3000, host: 3000
server.vm.synced_folder "./sync_folder", "/vagrant"
end
after that, did all the vagrant up command and everything.
but when i typed in vagrant ssh-config on the command line..
Host server
HostName 127.0.0.1
User ubuntu
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/xxxx
IdentitiesOnly yes
LogLevel FATAL
It is returning a local ip address and not the private ip address that I want. I don't understand why..
This is how vagrant is working, actually it creates multiple network interfaces so you do not necessarily see the expected one from your host.
If you look the output of the vagrant up command you'll see the following
...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
...
so clearly to ssh-in into the VM it uses the loopback address on port 22.
if you go to the VM and look the network interfaces
enp0s3 Link encap:Ethernet HWaddr 02:58:f3:11:f2:f2
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::58:f3ff:fe11:f2f2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22381 errors:0 dropped:0 overruns:0 frame:0
TX packets:10950 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17387008 (17.3 MB) TX bytes:690514 (690.5 KB)
enp0s8 Link encap:Ethernet HWaddr 08:00:27:1f:f8:27
inet addr:192.168.33.10 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe1f:f827/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:522 (522.0 B) TX bytes:648 (648.0 B)
The first interface is the NAT and this is the one vagrant uses to communicate (ssh) between the host and the VM, so this one is bind with the loopback from the host on a given port (by default this is 22 but if you have multiple VM running, vagrant will define another port)
The second interface is the interface you have setup from your Vagrantfile and has the IP assigned.
You could argue that vagrant ssh-config does not display all network interfaces properties but really this is about the ssh properties only and in this way the output is correct. If you want to get the network properties, you need to look into the VM
PS: final note, if you assign a private IP to your VM, you do not need to forward port, since you'll reach the VM directly using its IP.

Reverse path forwarding using POX controller

I want to ping a host from my POX control program and check for response. I want to do this to test if the host really exists. How will I ping a host from the control program?
The quick solution is to make a ping using the python language and the os capabilities.Assuming you started the mininet emulator with
sudo mn --controller=remote
First give the switch an ip in order for the ping to find a route to go to the host. Open a new terminal to ssh to your mininet vm
ssh -X mininet#192.168.56.101
change 192.168.56.101 if your mininet vm has a different ip. In this new terminal type
ifconfig s1
you should get something like
Link encap:Ethernet HWaddr fa:64:44:9a:f9:4f
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
which indicates that your switch does not have an ip. To give an ip to the switch we have to
sudo ifconfig s1 10.0.1.1
and then ping a host connected to this switch (ie. 10.0.0.1) from your POX program.
import os
host_ip = "10.0.0.1" #the host ip you want to ping from controller
response = os.system("ping -c 1 " + host_ip)
#check the response...
if response == 0:
print host_ip, 'is up!'
else:
print host_ip, 'is down!'

Vagrant: can not ping guest machine from the host

I have Mac OS with installed vagrant. On guest machine I have Ubuntu 12. So, what I would like to do is ping guest machine from host.
Guest machine attached to NAT (according to VirtualBox settings)
I found only one interface on guest machine (except lo):
eth0 Link encap:Ethernet HWaddr 08:00:27:88:0c:a6
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe88:ca6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:581 errors:0 dropped:0 overruns:0 frame:0
TX packets:410 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61376 (61.3 KB) TX bytes:51599 (51.5 KB)
The thing is that there is not ip address in 10.0.2.* network on the host. Host machine has several vboxnet interfaces, but they all don't have any ip addresses:
vboxnet0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:00
vboxnet1: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:01
vboxnet2: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:02
vboxnet3: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:03
Have you got any idea why ip address is not assigned to host machine by VirtualBox? What can I do to be able to ping gust machine?
Here is my vagrant file (I removed some commented lines which I do not use):
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "hashicorp/precise64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
# config.vm.box_url = "http://domain.com/path/to/above.box"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 3306, host: 8086
config.vm.network "forwarded_port", guest: 27017, host: 27017
config.vm.synced_folder "/Users/KoulSlou/Documents/Cloudware12.10", "/vagrant", owner: "www-data", group: "www-data"
config.vm.synced_folder "/Users/KoulSlou/Documents/Cloudware/public","/cloudware", owner: "www-data", group: "www-data"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
#config.vm.network "private_network", ip: "192.168.1.2"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# If true, then any SSH connections made will enable agent forwarding.
# Default value: false
# config.ssh.forward_agent = true
...
end
By default (i.e. when not touching any network configurations), Vagrant configures VMs in VirtualBox to attach their first interface (eth0) to "NAT" (don't confuse it with "NAT Network" which is different option in VirtualBox).
When your VM interface is attached to NAT, the guest will get 10.0.2.15 IP. On the host side you will only see vboxnet# interface without IP. You can think about this interface as a private router for that guest.
VMs that are connected to NAT are not routable from the outside world. This is by design and that's one of the reasons why vboxnet# interface has no IP. VMs are able to access the "outside world" such as the internet and host machine but cannot be accessed from the outside world without port forwarding.
If default behaviour is not what you looking for, Vagrant provides high level abstraction of networking config:
Private network - This will create new subnet that shouldn't collide with host's subnet (or any other subnets the host might have route to). In VirtualBox this will be configured by attaching additional interface to "Host-Only".
Public network - Your VMs will get IP from the same subnet as your host. Basically this is like creating new machine on the same network as your host. In VirtualBox this will be configured by attaching additional interface to "Bridged Adapter".
More advanced networking configurations are possible by configuring networking via provider specific configuration.
Each config has it's own pros and cons and it's really depends on what you plan to achieve.
For additional info check VirtualBox's docs about networking.
I was exactly in the same case, here is a solution that worked for me.
If your vm was up, stop it with:
vagrant halt
Then go to your vagrant box, and open the VagrantFile.
Uncomment (or manually add) the following line inside of it
config.vm.network "public_network"
This will make sure that the next time you "vagrant up" your vm, it will make sure that your vm will get IP from the same subnet as your host (see #m1keil's answer for more details).
Then make your vm up again:
vagrant up
In my case it asked me which interface I should use for the network bridge, here is an excerpt of what I had:
==> default: Available bridged network interfaces:
1) en0: Ethernet
2) en1: Wi-Fi (AirPort)
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
default: Which interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
Notice that it tells you what your available interfaces are.
Type the number corresponding to the interface that you want, in my case I typed 1 (for en0: Ethernet).
And lastly, connect to your vagrant box.
In my case:
vagrant ssh
Then from the host, if you type ifconfig, you still won't be able to see the ip address of your vm, BUT, if you type ifconfig from your vm, it will give you an ip address that you can ping/access from your host.
Note: If you want to ping/access your host from your guest, be sure that your firewall is off (System>Preferences>Security). The firewall doesn't affect pings from the host to the vm though.
I'm not sure why you are seeing an IP address on the guest but you are not configuring any virtualbox networking at all given that vagrant file. You will want to uncomment the config.vm.network "private network" line and then configure the IP address.
The default setup for virtualbox is to put the host at 10.0.0.2 and expose the whole 10.0.0.0/8 range as a local address so I think anything in the 10.x.x.x range will work for the client vm.

KVM/QEMU network TAP problems with libvirt

I'm trying to use libvirt with virsh to manage my kvm/qemu vms. The problem I have is with getting it to work with public IPs. The server is running ubuntu 8.04.
libvirt keeps trying to run it as:
/usr/bin/kvm -M pc -m 256 -smp 3 -monitor pty -no-acpi \
-drive file=/opt/virtual-machines/calculon/root.qcow2,if=ide,boot=on \
-net nic,vlan=0,model=virtio -net tap,fd=10,vlan=0 -usb -vnc 127.0.0.1:0
Which boots, but does not have any network access (pings go nowhere). Running it without fd=10 makes it work right, with kvm creating the necessary TAP device for me and networking functioning inside the host. All the setup guides I've seen focus on setting up masquerading, while I just want a simple bridge and unfiltered access to the net (both the guests and host must use public IPs).
Running ifconfig on the host gives this, the bridge is manually setup in my /etc/network/interfaces file. :
br0 Link encap:Ethernet HWaddr 00:1e:c9:3c:59:b8
inet addr:12.34.56.78 Bcast:12.34.56.79 Mask:255.255.255.240
inet6 addr: fe80::21e:c9ff:fe3c:59b8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3359 errors:0 dropped:0 overruns:0 frame:0
TX packets:3025 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:180646 (176.4 KB) TX bytes:230908 (225.4 KB)
eth0 Link encap:Ethernet HWaddr 00:1e:c9:3c:59:b8
inet6 addr: fe80::21e:c9ff:fe3c:59b8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6088386 errors:0 dropped:0 overruns:0 frame:0
TX packets:3058 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:680236624 (648.7 MB) TX bytes:261696 (255.5 KB)
Interrupt:33
Any help would be greatly appreciated.
I followed the bridged networking guide at https://help.ubuntu.com/community/KVM and have the following in /etc/network/interfaces:
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.0.10
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
I have not changed any libvirt network settings and my kvm images are booted like:
/usr/bin/kvm -M pc -no-kqemu -m 256 -smp 1 -monitor pty -boot c -hda \
/libvirt/apt.img -net nic,macaddr=00:16:3e:77:32:1d,vlan=0 -net \
tap,fd=11,script=,vlan=0 -usb -vnc 127.0.0.1:0
I then specify the static network settings in the kvm image as normal. Has all worked ok since I followed the guide.
I do have the following settings in my xml files in /etc/libvirt/qemu/ though under devices:
<interface type='bridge'>
<mac address='00:16:3e:77:32:1d'/>
<source bridge='br0'/>
</interface>
i guess your tap device should be shown in ifconfig.
run "brctl show "
it will show bridge and tunnel device connection.
you may have to put iptable entry show that all the packets will be routed through bridge
iptables -I INPUT -i br0 -j ACCEPT