error running a gui application on systemd services - shell

I am trying to run a gui commands in systemd services which i want it to execute on system startup.
these are my files.
oversteer.sh file:
#!/bin/bash
sleep 1s
export DISPLAY=:99.0
export SCREEN_WIDTH=1200
export SCREEN_HEIGHT=960
export SCREEN_DEPTH=24
export GEOMETRY="${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH}"
sudo oversteer --autocenter 45 &
sudo oversteer --range 720
oversteer.service file:
[Unit]
Description = oversteer
After=local-fs.target
[Service]
Environment="DISPLAY=:0"
Environment="XAUTHORITY=/home/ubuntu/.Xauthority"
ExecStart=/home/ubuntu/g29_steering_wheel/autostart_scripts/oversteer.sh
Restart=on-failure
Type=simple
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
I have put this file in /etc/systemd/system and have given executable as well as root permissions. However, it looks like this service fails because of no Display.
error is as follows:
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(oversteer:8052): Gdk-CRITICAL **: 08:00:50.744: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
(oversteer:8053): Gdk-CRITICAL **: 08:00:50.763: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_gtk3.py", line 45, in <module>
cursors.MOVE : Gdk.Cursor.new(Gdk.CursorType.FLEUR),
TypeError: constructor returned NULL
I am running on raspi 4 with ubuntu 20.04. The oversteer is a package for controlling the parameters of my joystick.

Related

Heroku + Redis Cloud: Temporary failure in name resolution

I am using the Redis Cloud add-in on my Heroku application and I keep getting this error sporadically. I have tried flushing the redis DB and restarting dynos and that seems to fix it but I am curious why this is happening so often.
I am running worker dynos that use this redis DB and I am using python-rq to schedule jobs on the worker queues.
File "/usr/local/lib/python3.8/site-packages/redis/connection.py", line 563, in connect
raise ConnectionError(self._error_message(e))
2020-08-05T17:12:25.451733+00:00 app[worker_proc.5]: redis.exceptions.ConnectionError: Error -3 connecting to redis-13618.c73.us-east-1-2.ec2.cloud.redislabs.com:13618. Temporary failure in name resolution.
2020-08-05 17:12:25,461 INFO exited: worker_proc-0 (exit status 1; not expected)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/redis/connection.py", line 559, in connect
sock = self._connect()
File "/usr/local/lib/python3.8/site-packages/redis/connection.py", line 584, in _connect
for res in socket.getaddrinfo(self.host, self.port, self.socket_type,
File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

How to Fix NonFunctional X11 Mouse on WSL2

UPDATE Oct 12, 2020: I created another Linux user and that user has no problem with the mouse ... for the first login. After that, the new user also did not show a mouse cursor in the X11 server display. That means the problem is specific to the user, not a system configuration issue, and something happens during the first login. What could that be?
I've got 2 Dell XPS 15 laptops, both were just upgraded from WSL1 to WSL2 and both have been upgraded to Ubuntu 20.04. One runs the XFCE4 desktop on X11 using VcXsrv just fine, the other displays the XFCE4 desktop but the cursor does not move and the keyboard has no effect on the desktop.
This snippet from ~/.profile runs the desktop:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
export LIBGL_ALWAYS_INDIRECT=1
#sudo /etc/init.d/dbus start &> /dev/null
startxfce4 &> /dev/null &
Both systems use this config.XLaunch:
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch
ClientMode="NoClient"
Clipboard="True"
ClipboardPrimary="True"
DisableAC="True"
Display="0"
ExtraParams="-swcursor"
LocalClient="False"
LocalProgram="xcalc"
PrivateKey=""
RemotePassword=""
RemoteProgram="xterm"
RemoteHost=""
RemoteUser=""
Wgl="True"
WindowMode="Windowed"
XDMCPBroadcast="False"
XDMCPHost=""
XDMCPIndirect="False"
XDMCPTerminate="False"
/>
Output of startxfce4 on the working system is:
$ echo $DISPLAY
172.26.16.1:0.0
$ which startxfce4
/usr/bin/startxfce4
$ startxfce4
/usr/bin/startxfce4: X server already running on display 172.26.16.1:0.0
_IceTransmkdir: Owner of /tmp/.ICE-unix should be set to root
gpg-agent[4211]: WARNING: "--write-env-file" is an obsolete option - it has no effect
gpg-agent: a gpg-agent is already running - not starting a new one
(xfce4-session:4169): xfce4-session-WARNING **: 12:50:45.121: gpg-agent returned no PID in the variables
(xfce4-session:4169): xfce4-session-WARNING **: 12:50:45.124: xfsm_manager_load_session: Something wrong with /home/mslinn/.cache/sessions/xfce4-session-172.26.16.1:0, Does it exist? Permissions issue?
(xfwm4:4215): xfwm4-WARNING **: 12:50:45.412: Unsupported GL renderer (Software Rasterizer).
(xfsettingsd:4219): libupower-glib-WARNING **: 12:50:45.534: Couldn't connect to proxy: Could not connect: No such file or directory
(xfsettingsd:4219): libupower-glib-CRITICAL **: 12:50:45.534: up_client_get_lid_is_closed: assertion 'UP_IS_CLIENT (client)' failed
(xfsettingsd:4219): GLib-GObject-WARNING **: 12:50:45.534: invalid (NULL) pointer instance
(xfsettingsd:4219): GLib-GObject-CRITICAL **: 12:50:45.534: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(wrapper-2.0:4233): GLib-GIO-CRITICAL **: 12:50:45.982: g_file_new_for_path: assertion 'path != NULL' failed
(wrapper-2.0:4233): GLib-GIO-CRITICAL **: 12:50:45.982: g_file_monitor_file: assertion 'G_IS_FILE (file)' failed
(wrapper-2.0:4233): GLib-GObject-WARNING **: 12:50:45.982: invalid (NULL) pointer instance
(wrapper-2.0:4233): GLib-GObject-CRITICAL **: 12:50:45.982: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(wrapper-2.0:4233): Gtk-WARNING **: 12:50:45.982: Attempting to add a widget with type GtkToggleButton to a container of type XfcePanelPlugin, but the widget is already inside a container of type XfcePanelPlugin, please remove the widget from its existing container first.
(xfce4-session:4169): xfce4-session-WARNING **: 12:50:46.010: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)
(xfce4-session:4169): xfce4-session-WARNING **: 12:50:46.013: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)
(xfce4-session:4169): xfce4-session-WARNING **: 12:50:46.016: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)
** (wrapper-2.0:4232): WARNING **: 12:50:46.024: Binding 'XF86AudioMicMute' failed!
(wrapper-2.0:4232): pulseaudio-plugin-WARNING **: 12:50:46.024: Could not have grabbed volume control keys. Is another volume control application (xfce4-volumed) running?
(wrapper-2.0:4233): Gtk-WARNING **: 12:50:46.026: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
(wrapper-2.0:4234): Gtk-WARNING **: 12:50:46.037: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)
** (xiccd:4258): CRITICAL **: 12:50:46.142: Failed to connect to colord: Could not connect: No such file or directory
** (agent:4267): CRITICAL **: 12:50:46.145: Failed to get connection to system bus: Could not connect: No such file or directory
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
(wrapper-2.0:4232): Gtk-WARNING **: 12:50:46.200: Negative content width -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner PulseaudioButton)
(unity-fallback-mount-helper:4255): GVFS-RemoteVolumeMonitor-WARNING **: 12:50:46.282: remote volume monitor with dbus name org.gtk.vfs.UDisks2VolumeMonitor is not supported
(nm-applet:4279): nm-applet-WARNING **: 12:50:46.378: Error connecting to system D-Bus: Could not connect: No such file or directory
(nm-applet:4279): nm-applet-WARNING **: 12:50:46.379: Could not connect: No such file or directory
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.383: ((libnm/nm-client.c:3905)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.389: ((libnm/nm-client.c:3859)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.389: ((libnm/nm-client.c:3937)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.390: ((libnm/nm-client.c:3986)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.390: ((libnm/nm-client.c:4026)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.391: ((libnm/nm-client.c:4042)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.391: ((libnm/nm-client.c:4080)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.391: ((libnm/nm-client.c:4598)): assertion '<dropped>' failed
(nm-applet:4279): libnm-CRITICAL **: 12:50:46.392: ((libnm/nm-client.c:4598)): assertion '<dropped>' failed
(xfdesktop:4235): GVFS-RemoteVolumeMonitor-WARNING **: 12:50:46.561: remote volume monitor with dbus name org.gtk.vfs.UDisks2VolumeMonitor is not supported
** (xfdesktop:4235): WARNING **: 12:50:46.704: Failed to get system bus: Could not connect: No such file or directory
system-config-printer-applet: failed to connect to system D-Bus
[0610/125046.888419:ERROR:main_delegate.cc(930)] Could not load cef_100_percent.pak
[0610/125046.892135:ERROR:main_delegate.cc(939)] Could not load cef_200_percent.pak
[0610/125047.084535:INFO:HandlerRendererProcess.cpp(6)] HandlerRendererProcess created
[0610/125047.090591:ERROR:main_delegate.cc(930)] Could not load cef_100_percent.pak
[0610/125047.090753:ERROR:main_delegate.cc(939)] Could not load cef_200_percent.pak
[0610/125047.507121:INFO:HandlerGUILinux.cpp(141)] Create window
[0610/125047.689543:INFO:HandlerRequest.cpp(20)] OnBeforeBrowse 1 url=qrc://ui/
Jun 10, 2020 12:50:48 PM com.Zc.Za.Zb.Zb.ZAy <clinit>
WARNING: Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added
[0610/125048.702522:INFO:HandlerRendererProcess.cpp(6)] HandlerRendererProcess created
[0610/125048.706700:ERROR:main_delegate.cc(930)] Could not load cef_100_percent.pak
[0610/125048.707000:ERROR:main_delegate.cc(939)] Could not load cef_200_percent.pak
[0610/125048.732046:INFO:HandlerRendererProcess.cpp(6)] HandlerRendererProcess created
[0610/125048.740582:ERROR:main_delegate.cc(930)] Could not load cef_100_percent.pak
[0610/125048.740799:ERROR:main_delegate.cc(939)] Could not load cef_200_percent.pak
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "Thread-13" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.freedesktop.dbus.DBusSignal.Zb(DBusSignal.java:178)
at org.freedesktop.dbus.Zbt.run(Zbt.java:952)
at org.freedesktop.dbus.Zwx.run(Zwx.java:197)
Exception in thread "Thread-16" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.freedesktop.dbus.DBusSignal.Zb(DBusSignal.java:178)
at org.freedesktop.dbus.Zbt.run(Zbt.java:952)
at org.freedesktop.dbus.Zwx.run(Zwx.java:197)
[0610/125049.707698:INFO:HandlerRendererProcess.cpp(15)] Started CEF-render process
[0610/125049.707695:INFO:HandlerRendererProcess.cpp(15)] Started CEF-render process
Xlib: extension "MIT-SHM" missing on display "172.26.16.1:0.0".
[0610/125050.381922:INFO:CONSOLE(2)] "Importing icons and logos from Ring UI is deprecated. Please import them from corresponding packages: `#jetbrains/icons` and `#jetbrains/icons`.", source: qrc://ui/index.js (2)
[0610/125050.501390:INFO:CONSOLE(2)] "Updated model size: 133084", source: qrc://ui/index.js (2)
[0610/125050.516655:INFO:CONSOLE(2)] "Updated model size: 156335", source: qrc://ui/index.js (2)
[0610/125050.535100:INFO:CONSOLE(2)] "Updated model size: 156449", source: qrc://ui/index.js (2)
[0610/125050.547730:INFO:CONSOLE(2)] "Updated model size: 156335", source: qrc://ui/index.js (2)
[0610/125050.566132:INFO:CONSOLE(2)] "Initial model size: 156414", source: qrc://ui/index.js (2)
[0610/125050.570154:INFO:CONSOLE(2)] "`size`, `width` and `height` props are not recommended to use in Ring UI `Icon` component. The intrinsic sizes of SVG icon (`width` and `height` SVG attributes) are used instead.
We strongly recommend to use icons handcrafted for particular sizes. If your icon doesn't exist in the desired size, please ask your designer to draw one. "Responsive" checkmark should be unchecked when exporting icon.'", source: qrc://ui/index.js (2)
[0610/125052.719865:INFO:CONSOLE(2)] "Updated model size: 205265", source: qrc://ui/index.js (2)
[0610/125106.897010:INFO:CONSOLE(2)] "Updated model size: 205265", source: qrc://ui/index.js (2)
Output of on the non-working system is:
$ ifconfig eth0 | grep 'inet '
inet 172.25.63.251 netmask 255.255.240.0 broadcast 172.25.63.255
$ echo $DISPLAY
172.25.48.1:0.0
$ which startxfce4
/usr/bin/startxfce4
$ startxfce4
/usr/bin/startxfce4: X server already running on display 172.25.48.1:0.0
gpg-agent[1508]: WARNING: "--write-env-file" is an obsolete option - it has no effect
gpg-agent: a gpg-agent is already running - not starting a new one
(xfce4-session:1482): xfce4-session-WARNING **: 12:50:23.915: gpg-agent returned no PID in the variables
(xfce4-session:1482): xfce4-session-WARNING **: 12:50:23.922: xfsm_manager_load_session: Something wrong with /home/mslinn/.cache/sessions/xfce4-session-172.25.48.1:0, Does it exist? Permissions issue?
xfwm4-Message: 12:50:24.247: Another Window Manager (Xfwm4) is already running on screen 172.25.48.1:0.0
xfwm4-Message: 12:50:24.247: To replace the current window manager, try "--replace"
(xfwm4:1510): xfwm4-WARNING **: 12:50:24.247: Could not find a screen to manage, exiting
xfsettingsd-Message: 12:50:24.407: Skipping screen 0, it already has an xsettings manager...
(wrapper-2.0:1530): Gtk-WARNING **: 12:50:24.994: gtk_widget_size_allocate(): attempt to allocate widget with width -1 and height 28
(wrapper-2.0:1530): Gtk-WARNING **: 12:50:24.994: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node border, owner GtkFrame)
(xfce4-session:1482): xfce4-session-WARNING **: 12:50:25.027: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)
(xfce4-session:1482): xfce4-session-WARNING **: 12:50:25.035: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)
(xfce4-session:1482): xfce4-session-WARNING **: 12:50:25.045: failed to run script: Failed to execute child process “/usr/bin/pm-is-supported” (No such file or directory)
(wrapper-2.0:1531): Gtk-WARNING **: 12:50:25.079: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node button, owner XfceArrowButton)
xfsettingsd: Another clipboard manager is already running.
** (xfdesktop:1544): CRITICAL **: 12:50:40.869: xfdesktop: already running, quitting.
** (xiccd:1547): WARNING **: 12:50:40.976: EDID is empty
** (xiccd:1547): CRITICAL **: 12:50:40.989: failed to create colord device: failed to obtain org.freedesktop.color-manager.create-device auth
Tracker-Message: 12:50:40.991: Set scheduler policy to SCHED_IDLE
Tracker-Message: 12:50:40.991: Setting priority nice level to 19
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
(uint32 1,)
(nm-applet:1584): nm-applet-WARNING **: 12:50:41.153: NetworkManager is not running
Tracker-Message: 12:50:41.181: Set scheduler policy to SCHED_IDLE
Tracker-Message: 12:50:41.181: Setting priority nice level to 19
** (update-notifier:1634): WARNING **: 12:50:41.190: already running?
** (light-locker:1647): ERROR **: 12:50:41.245: Environment variable XDG_SESSION_PATH not set. Is LightDM running?
DISPLAY is properly set, I think. XEyes and XTerm work fine ... I only notice a problem with the XFCE4 desktop.

Cloudera Manager - Service Monitor is not running

It seems there is something wrong with connection issues.But I don't know what lead to this problem.Could anyone help me?What connection issue am I facing?
(9 skipped) Error sending messages to firehose: mgmt-SERVICEMONITOR-73cd125b24d5013535b3d65d46703b65
Traceback (most recent call last):
File "/opt/cm-5.13.0/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.13.0-py2.6.egg/cmf/monitor/firehose.py", line 116, in _send
self._port)
File "/opt/cm-5.13.0/lib64/cmf/agent/build/env/lib/python2.6/site-packages/avro-1.6.3-py2.6.egg/avro/ipc.py", line 469, in __init__
self.conn.connect()
File "/usr/lib64/python2.6/httplib.py", line 720, in connect
self.timeout)
File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
raise error, msg
error: [Errno 111] Connection refused
The error message indicates that CM agent is not able to reach out to Service Monitor due to Connection refused.
The most common reason is Service Monitor not running. Check if Service Monitor is actually running.
Another reason could be CM agent is not able to connect Service Monitor on port 9997. Check from CM agent host using
telnet <SMON_Host> 9997

How to connect to Bigtable Emulator from a GoLang application? How to use it?

I am trying to use BigTable Emulator. I have never used it before. I followed the documentation but not able to understand,
How to connect an application to Emulator.
How to set BIGTABLE_EMULATOR_HOST environment variable.
Please help by explaining it or pointing me to any examples or links.
Thank you.
The BIGTABLE_EMULATOR_HOST environment variable overrides the normal connection logic. Having it set causes a client to connect to the emulator without any special changes needed in the code (i.e. the project/instance values passed to NewAdminClient()/NewClient() are ignored).
The command provided in step 2 of the Using the emulator instructions sets the environment variable for you.
See the implementation of GoogleCloudPlatform/golang-samples/bigtable/helloworld/main.go for a simple, concrete example of interacting with a BigTable instance.
Walkthrough
To demonstrate using the Bigtable Emulator from go, I'm using a free tier, f1-micro Compute Engine instance. It's an instance where I hadn't used go before, so it's basically a clean slate.
First things first, I setup my go environment:
$ sudo apt install golang
<... SNIP apt output ...>
$ mkdir ~/go
$ export GOPATH=$HOME/go
Then I updated the google-cloud-sdk package and installed the google-cloud-sdk-bigtable-emulator package:
$ sudo apt install google-cloud-sdk
<... SNIP apt output ...>
$ sudo apt install google-cloud-sdk-bigtable-emulator
<... SNIP apt output ...>
At this point the emulator is ready to run, so I started it using the documented command:
$ gcloud beta emulators bigtable start
Executing: /usr/lib/google-cloud-sdk/platform/bigtable-emulator/cbtemulator --host=localhost --port=8086
[bigtable] Cloud Bigtable emulator running on 127.0.0.1:8086
After starting it, it runs in the foreground, so I left that terminal alone and started a new one.
In the new terminal, the first thing is setting the BIGTABLE_EMULATOR_HOST environment variable. This step is documented in the emulator instructions. The following command generates the shell command for setting the variable. To see the command it generates it, run it directly:
$ gcloud beta emulators bigtable env-init
export BIGTABLE_EMULATOR_HOST=localhost:8086
Running the command enclosed in $(...) as documented tells the shell to execute the output of the command, thereby setting the variable:
$ $(gcloud beta emulators bigtable env-init)
Now that the emulator is running and the environment is ready, I need a client application to to connect to it. I chose to use the helloworld application from the GoogleCloudPlatform/golang-samples repository.
$ git clone https://github.com/GoogleCloudPlatform/golang-samples.git
$ cd golang-samples/bigtable/helloworld
In the main.go file in the above directory, the cloud.google.com/go/bigtable and golang.org/x/net/context packages are imported, so I ran go get to fetch both of them.
$ go get cloud.google.com/go/bigtable
$ go get golang.org/x/net/context
Then I ran the example application, using dummy values for the -project and -instance flags, since it's going to be connecting to the locally running emulator.
$ go run main.go -project foo -instance bar
2018/06/18 00:39:27 Creating table Hello-Bigtable
2018/06/18 00:39:27 Writing greeting rows to table
2018/06/18 00:39:27 Getting a single greeting by row key:
2018/06/18 00:39:27 greeting0 = Hello World!
2018/06/18 00:39:27 Reading all greeting rows:
2018/06/18 00:39:27 greeting0 = Hello World!
2018/06/18 00:39:27 greeting1 = Hello Cloud Bigtable!
2018/06/18 00:39:27 greeting2 = Hello golang!
2018/06/18 00:39:27 Deleting the table
Nothing really happens in the emulator terminal to indicate it's being used. So, to demonstrate that it's actually interacting with the emulator, I stopped the emulator process (by pressing Ctrl-C in it's terminal) and tried executing the client application again:
$ go run main.go -project foo -instance bar
2018/06/18 00:40:03 Retryable error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:8086: getsockopt: connection refused", retrying in 47.77941ms
2018/06/18 00:40:03 Retryable error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:8086: getsockopt: connection refused", retrying in 2.153551ms
2018/06/18 00:40:03 Retryable error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:8086: getsockopt: connection refused", retrying in 114.145821ms
<... SNIP repeated errors ...>
^Csignal: interrupt
$
So, using an unmodified client application interacts with the emulator just by having the proper environment variable set.

Configuring the REST server with a persistent data store

I am having problems trying to deploy the rest server with persistence storage (mongo db) I ge this message when deploying the rest server:
docker logs -f rest
[2018-03-12 00:01:13] PM2 log: Launching in no daemon mode
[2018-03-12 00:01:14] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
[2018-03-12 00:01:14] PM2 log: App name:composer-rest-server id:0 online
WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
Discovering types from business network definition ...
Connection fails: Error: Error trying to ping. Error: Error trying to query business network. Error: REQUEST_TIMEOUT
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Error trying to query business network. Error: REQUEST_TIMEOUT
Error: Error trying to ping. Error: Error trying to query business network. Error: REQUEST_TIMEOUT
at _checkRuntimeVersions.then.catch (/home/composer/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:699:34)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
[2018-03-12 00:07:03] PM2 log: App [composer-rest-server] with id [0] and pid [14], exited with code [1] via signal [SIGINT]
I am using composer v.18
is there any work around to fix this error. when I run the composer-rest- server alone it work. but if I try to add the mongodb it does not work

Resources