Tutorial - Grafana rendering on Raspberry Pi

i have the exact same content in my plugin.json file.
I also had to open this via sudo su with root…
so i guess it could be a permission issue with the openhabian user maybe?

● grafana-server.service - Grafana instance
   Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-07-04 20:33:38 CEST; 11h ago
     Docs: http://docs.grafana.org
 Main PID: 472 (grafana-server)
   CGroup: /system.slice/grafana-server.service
           └─472 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid cfg:default.paths.logs=/var/log/grafana cfg:default.paths.data=/var/lib/grafana cfg:de

Jul 04 20:33:43 openHABianPi grafana-server[472]: t=2019-07-04T20:33:43+0200 lvl=info msg="Skipping migration condition not fulfilled" logger=migrator id="copy data account to org"
Jul 04 20:33:43 openHABianPi grafana-server[472]: t=2019-07-04T20:33:43+0200 lvl=info msg="Executing migration" logger=migrator id="copy data account_user to org_user"
Jul 04 20:33:43 openHABianPi grafana-server[472]: t=2019-07-04T20:33:43+0200 lvl=info msg="Skipping migration condition not fulfilled" logger=migrator id="copy data account_user to org_user"
Jul 04 20:33:43 openHABianPi grafana-server[472]: t=2019-07-04T20:33:43+0200 lvl=info msg="Starting plugin search" logger=plugins
Jul 04 20:33:44 openHABianPi grafana-server[472]: t=2019-07-04T20:33:44+0200 lvl=eror msg="Plugins: Failed to load plugin json file: /var/lib/grafana/plugins/grafana-image-renderer/plugin.json,  err: Unknown
Jul 04 20:33:44 openHABianPi grafana-server[472]: t=2019-07-04T20:33:44+0200 lvl=info msg="Registering plugin" logger=plugins name=Discrete
Jul 04 20:33:44 openHABianPi grafana-server[472]: t=2019-07-04T20:33:44+0200 lvl=info msg="Initializing Alerting" logger=alerting.engine
Jul 04 20:33:44 openHABianPi grafana-server[472]: t=2019-07-04T20:33:44+0200 lvl=info msg="Initializing CleanUpService" logger=cleanup
Jul 04 20:33:45 openHABianPi grafana-server[472]: t=2019-07-04T20:33:45+0200 lvl=info msg="Initializing Stream Manager"
Jul 04 20:33:45 openHABianPi grafana-server[472]: t=2019-07-04T20:33:45+0200 lvl=info msg="Initializing HTTP Server" logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=

I suspect you are correct that there is a permission issue going on here. My setup is using the OpenHabian install and I don’t recall making any permission updates. The directories are secured by root and for me it seems to work. If you have any other diagnostic information I can compare to my setup. Cheers d

Hi @David_deMarco,

i finally got the plugin loaded… after i manually updated my openhabian to the latest grafana stable (6.2.5)
I see in the Log that the plugin is loaded. yay! :slight_smile:

so i cant get it to work to display the graph…
i added this to my grafana.ini

[rendering]
server_url=http://renderer:8081/render

and used this in my HABPanel

http://renderer:8081/render/d-solo/XXXXXX/mini-graphs?refresh=5m&orgId=1&panelId=9&from=now/d&to=now

and i get the error “couldnt find the server-ip of renderer”

Die Server-IP-Adresse von renderer wurde nicht gefunden.

so what i’m missing here?

Thanks

http://renderer … either your hosts file or your router have to translate it to IP somehow, so you have to configure it :wink:

on local network, convention should be
http://hostname.local -> routers are mostly able to give IP to that name if your device hostname is configured properly

otherwise it’s kind of better to just use pure IP where possible

Hello,

im running Grafana v6.3.4 on my Raspberry Pi 4 and need help to render an image.
I installed phantomJS with your tutorial on my Raspberry but im still getting the error “Rendering failed” if i click on “Direct link rendered image”.

Here is the log:

t=2019-09-01T13:06:03+0200 lvl=info msg=“Registering plugin” logger=plugins name=“Backend Renderer”
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing RenderingService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing AlertEngine” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing DatasourceCacheService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing HooksService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing LoginService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing SearchService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing ServerLockService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing TracingService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing UsageStatsService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing UserAuthTokenService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing CleanUpService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing NotificationService” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing provisioningServiceImpl” logger=server
t=2019-09-01T13:06:03+0200 lvl=info msg=“Renderer plugin found, starting” logger=rendering cmd=plugin_start_linux_arm
t=2019-09-01T13:06:03+0200 lvl=info msg=“Initializing Stream Manager”
t=2019-09-01T13:06:03+0200 lvl=info msg=“HTTP Server Listen” logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2019-09-01T13:06:03+0200 lvl=eror msg=“Rendering failed.” logger=context userId=1 orgId=1 uname=admin error=“No renderer found”
t=2019-09-01T13:06:03+0200 lvl=eror msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/nISKbEZRk/raumklima status=500 remote_addr=192.168.178.63 time_ms=7 size=1722 referer=“http://192.168.178.85:3000/d/nISKbEZRk/raumklima?orgId=1&refresh=1m”
t=2019-09-01T13:06:05+0200 lvl=eror msg=“Stopped RenderingService” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped NotificationService” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped provisioningServiceImpl” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped UsageStatsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped Stream Manager”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped TracingService” logger=server reason=nil
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped AlertEngine” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped UserAuthTokenService” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped InternalMetricsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped RemoteCache” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped PluginManager” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped CleanUpService” logger=server reason=“context canceled”
t=2019-09-01T13:06:05+0200 lvl=info msg=“Stopped HTTPServer” logger=server reason=nil
t=2019-09-01T13:06:05+0200 lvl=eror msg=“Server shutdown” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:06+0200 lvl=info msg=“Starting Grafana” logger=server version=6.3.4 commit=a557646 branch=HEAD compiled=2019-08-19T16:28:51+0200
t=2019-09-01T13:06:06+0200 lvl=info msg=“Config loaded from” logger=settings file=/usr/share/grafana/conf/defaults.ini
t=2019-09-01T13:06:06+0200 lvl=info msg=“Config loaded from” logger=settings file=/etc/grafana/grafana.ini
t=2019-09-01T13:06:06+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.data=/var/lib/grafana”
t=2019-09-01T13:06:06+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.logs=/var/log/grafana”
t=2019-09-01T13:06:06+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.plugins=/var/lib/grafana/plugins”
t=2019-09-01T13:06:06+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.provisioning=/etc/grafana/provisioning”
t=2019-09-01T13:06:06+0200 lvl=info msg=“Path Home” logger=settings path=/usr/share/grafana
t=2019-09-01T13:06:06+0200 lvl=info msg=“Path Data” logger=settings path=/var/lib/grafana
t=2019-09-01T13:06:06+0200 lvl=info msg=“Path Logs” logger=settings path=/var/log/grafana
t=2019-09-01T13:06:06+0200 lvl=info msg=“Path Plugins” logger=settings path=/var/lib/grafana/plugins
t=2019-09-01T13:06:06+0200 lvl=info msg=“Path Provisioning” logger=settings path=/etc/grafana/provisioning
t=2019-09-01T13:06:06+0200 lvl=info msg=“App mode production” logger=settings
t=2019-09-01T13:06:06+0200 lvl=info msg=“Writing PID file” logger=server path=/var/run/grafana/grafana-server.pid pid=4776
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing SqlStore” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Connecting to DB” logger=sqlstore dbtype=sqlite3
t=2019-09-01T13:06:06+0200 lvl=info msg=“Starting DB migration” logger=migrator
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing HTTPServer” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing InternalMetricsService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing RemoteCache” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing QuotaService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing PluginManager” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Starting plugin search” logger=plugins
t=2019-09-01T13:06:06+0200 lvl=info msg=“Registering plugin” logger=plugins name=“Backend Renderer”
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing RenderingService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing AlertEngine” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing DatasourceCacheService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing HooksService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing LoginService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing SearchService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing ServerLockService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing TracingService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing UsageStatsService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing UserAuthTokenService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing CleanUpService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing NotificationService” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing provisioningServiceImpl” logger=server
t=2019-09-01T13:06:06+0200 lvl=info msg=“Renderer plugin found, starting” logger=rendering cmd=plugin_start_linux_arm
t=2019-09-01T13:06:06+0200 lvl=info msg=“Initializing Stream Manager”
t=2019-09-01T13:06:06+0200 lvl=info msg=“HTTP Server Listen” logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2019-09-01T13:06:08+0200 lvl=eror msg=“Stopped RenderingService” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped UserAuthTokenService” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped NotificationService” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped provisioningServiceImpl” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped PluginManager” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped Stream Manager”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped RemoteCache” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped CleanUpService” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped UsageStatsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped InternalMetricsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped TracingService” logger=server reason=nil
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped AlertEngine” logger=server reason=“context canceled”
t=2019-09-01T13:06:08+0200 lvl=info msg=“Stopped HTTPServer” logger=server reason=nil
t=2019-09-01T13:06:08+0200 lvl=eror msg=“Server shutdown” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:09+0200 lvl=info msg=“Starting Grafana” logger=server version=6.3.4 commit=a557646 branch=HEAD compiled=2019-08-19T16:28:51+0200
t=2019-09-01T13:06:09+0200 lvl=info msg=“Config loaded from” logger=settings file=/usr/share/grafana/conf/defaults.ini
t=2019-09-01T13:06:09+0200 lvl=info msg=“Config loaded from” logger=settings file=/etc/grafana/grafana.ini
t=2019-09-01T13:06:09+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.data=/var/lib/grafana”
t=2019-09-01T13:06:09+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.logs=/var/log/grafana”
t=2019-09-01T13:06:09+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.plugins=/var/lib/grafana/plugins”
t=2019-09-01T13:06:09+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.provisioning=/etc/grafana/provisioning”
t=2019-09-01T13:06:09+0200 lvl=info msg=“Path Home” logger=settings path=/usr/share/grafana
t=2019-09-01T13:06:09+0200 lvl=info msg=“Path Data” logger=settings path=/var/lib/grafana
t=2019-09-01T13:06:09+0200 lvl=info msg=“Path Logs” logger=settings path=/var/log/grafana
t=2019-09-01T13:06:09+0200 lvl=info msg=“Path Plugins” logger=settings path=/var/lib/grafana/plugins
t=2019-09-01T13:06:09+0200 lvl=info msg=“Path Provisioning” logger=settings path=/etc/grafana/provisioning
t=2019-09-01T13:06:09+0200 lvl=info msg=“App mode production” logger=settings
t=2019-09-01T13:06:09+0200 lvl=info msg=“Writing PID file” logger=server path=/var/run/grafana/grafana-server.pid pid=4824
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing SqlStore” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Connecting to DB” logger=sqlstore dbtype=sqlite3
t=2019-09-01T13:06:09+0200 lvl=info msg=“Starting DB migration” logger=migrator
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing HTTPServer” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing InternalMetricsService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing RemoteCache” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing QuotaService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing PluginManager” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Starting plugin search” logger=plugins
t=2019-09-01T13:06:09+0200 lvl=info msg=“Registering plugin” logger=plugins name=“Backend Renderer”
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing RenderingService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing AlertEngine” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing DatasourceCacheService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing HooksService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing LoginService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing SearchService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing ServerLockService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing TracingService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing UsageStatsService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing UserAuthTokenService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing CleanUpService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing NotificationService” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing provisioningServiceImpl” logger=server
t=2019-09-01T13:06:09+0200 lvl=info msg=“Renderer plugin found, starting” logger=rendering cmd=plugin_start_linux_arm
t=2019-09-01T13:06:09+0200 lvl=info msg=“Initializing Stream Manager”
t=2019-09-01T13:06:09+0200 lvl=info msg=“HTTP Server Listen” logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2019-09-01T13:06:11+0200 lvl=eror msg=“Stopped RenderingService” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped PluginManager” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped Stream Manager”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped UsageStatsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped UserAuthTokenService” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped NotificationService” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped CleanUpService” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped TracingService” logger=server reason=nil
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped provisioningServiceImpl” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped RemoteCache” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped InternalMetricsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped AlertEngine” logger=server reason=“context canceled”
t=2019-09-01T13:06:11+0200 lvl=info msg=“Stopped HTTPServer” logger=server reason=nil
t=2019-09-01T13:06:11+0200 lvl=eror msg=“Server shutdown” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:12+0200 lvl=info msg=“Starting Grafana” logger=server version=6.3.4 commit=a557646 branch=HEAD compiled=2019-08-19T16:28:51+0200
t=2019-09-01T13:06:12+0200 lvl=info msg=“Config loaded from” logger=settings file=/usr/share/grafana/conf/defaults.ini
t=2019-09-01T13:06:12+0200 lvl=info msg=“Config loaded from” logger=settings file=/etc/grafana/grafana.ini
t=2019-09-01T13:06:12+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.data=/var/lib/grafana”
t=2019-09-01T13:06:12+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.logs=/var/log/grafana”
t=2019-09-01T13:06:12+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.plugins=/var/lib/grafana/plugins”
t=2019-09-01T13:06:12+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.provisioning=/etc/grafana/provisioning”
t=2019-09-01T13:06:12+0200 lvl=info msg=“Path Home” logger=settings path=/usr/share/grafana
t=2019-09-01T13:06:12+0200 lvl=info msg=“Path Data” logger=settings path=/var/lib/grafana
t=2019-09-01T13:06:12+0200 lvl=info msg=“Path Logs” logger=settings path=/var/log/grafana
t=2019-09-01T13:06:12+0200 lvl=info msg=“Path Plugins” logger=settings path=/var/lib/grafana/plugins
t=2019-09-01T13:06:12+0200 lvl=info msg=“Path Provisioning” logger=settings path=/etc/grafana/provisioning
t=2019-09-01T13:06:12+0200 lvl=info msg=“App mode production” logger=settings
t=2019-09-01T13:06:12+0200 lvl=info msg=“Writing PID file” logger=server path=/var/run/grafana/grafana-server.pid pid=4947
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing SqlStore” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Connecting to DB” logger=sqlstore dbtype=sqlite3
t=2019-09-01T13:06:12+0200 lvl=info msg=“Starting DB migration” logger=migrator
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing HTTPServer” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing InternalMetricsService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing RemoteCache” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing QuotaService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing PluginManager” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Starting plugin search” logger=plugins
t=2019-09-01T13:06:12+0200 lvl=info msg=“Registering plugin” logger=plugins name=“Backend Renderer”
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing RenderingService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing AlertEngine” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing DatasourceCacheService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing HooksService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing LoginService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing SearchService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing ServerLockService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing TracingService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing UsageStatsService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing UserAuthTokenService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing CleanUpService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing NotificationService” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing provisioningServiceImpl” logger=server
t=2019-09-01T13:06:12+0200 lvl=info msg=“Renderer plugin found, starting” logger=rendering cmd=plugin_start_linux_arm
t=2019-09-01T13:06:12+0200 lvl=info msg=“Initializing Stream Manager”
t=2019-09-01T13:06:12+0200 lvl=info msg=“HTTP Server Listen” logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2019-09-01T13:06:14+0200 lvl=eror msg=“Stopped RenderingService” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped CleanUpService” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped UserAuthTokenService” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped UsageStatsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped provisioningServiceImpl” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped NotificationService” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped RemoteCache” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped TracingService” logger=server reason=nil
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped InternalMetricsService” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped Stream Manager”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped AlertEngine” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped PluginManager” logger=server reason=“context canceled”
t=2019-09-01T13:06:14+0200 lvl=info msg=“Stopped HTTPServer” logger=server reason=nil
t=2019-09-01T13:06:14+0200 lvl=eror msg=“Server shutdown” logger=server reason=“Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.”
t=2019-09-01T13:06:15+0200 lvl=info msg=“Starting Grafana” logger=server version=6.3.4 commit=a557646 branch=HEAD compiled=2019-08-19T16:28:51+0200
t=2019-09-01T13:06:15+0200 lvl=info msg=“Config loaded from” logger=settings file=/usr/share/grafana/conf/defaults.ini
t=2019-09-01T13:06:15+0200 lvl=info msg=“Config loaded from” logger=settings file=/etc/grafana/grafana.ini
t=2019-09-01T13:06:15+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.data=/var/lib/grafana”
t=2019-09-01T13:06:15+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.logs=/var/log/grafana”
t=2019-09-01T13:06:15+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.plugins=/var/lib/grafana/plugins”
t=2019-09-01T13:06:15+0200 lvl=info msg=“Config overridden from command line” logger=settings arg=“default.paths.provisioning=/etc/grafana/provisioning”
t=2019-09-01T13:06:15+0200 lvl=info msg=“Path Home” logger=settings path=/usr/share/grafana
t=2019-09-01T13:06:15+0200 lvl=info msg=“Path Data” logger=settings path=/var/lib/grafana
t=2019-09-01T13:06:15+0200 lvl=info msg=“Path Logs” logger=settings path=/var/log/grafana
t=2019-09-01T13:06:15+0200 lvl=info msg=“Path Plugins” logger=settings path=/var/lib/grafana/plugins
t=2019-09-01T13:06:15+0200 lvl=info msg=“Path Provisioning” logger=settings path=/etc/grafana/provisioning
t=2019-09-01T13:06:15+0200 lvl=info msg=“App mode production” logger=settings
t=2019-09-01T13:06:15+0200 lvl=info msg=“Writing PID file” logger=server path=/var/run/grafana/grafana-server.pid pid=4993
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing SqlStore” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Connecting to DB” logger=sqlstore dbtype=sqlite3
t=2019-09-01T13:06:15+0200 lvl=info msg=“Starting DB migration” logger=migrator
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing HTTPServer” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing InternalMetricsService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing RemoteCache” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing QuotaService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing PluginManager” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Starting plugin search” logger=plugins
t=2019-09-01T13:06:15+0200 lvl=info msg=“Registering plugin” logger=plugins name=“Backend Renderer”
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing RenderingService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing AlertEngine” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing DatasourceCacheService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing HooksService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing LoginService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing SearchService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing ServerLockService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing TracingService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing UsageStatsService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing UserAuthTokenService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing CleanUpService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing NotificationService” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing provisioningServiceImpl” logger=server
t=2019-09-01T13:06:15+0200 lvl=info msg=“Renderer plugin found, starting” logger=rendering cmd=plugin_start_linux_arm
t=2019-09-01T13:06:15+0200 lvl=info msg=“Initializing Stream Manager”
t=2019-09-01T13:06:15+0200 lvl=info msg=“HTTP Server Listen” logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=

Can somebody help me?

Hi.
Just to confirm. The tutorial was not about installing phantomJS as that no longer is supplied. Rather the alternative rendering engine is installed.

Also I note that the plugin has been updated recently so the instructions may not be accurate.

Hi David,

I tried to use the phantomjs bin file but as I read your comments I understand that will not work anymore.
So I tried the grafana-image-renderer as instructed, but the yarn install --pure-lockfile gives me the following errors on Raspbian GNU/Linux 10 (buster) :

Any suggestions or tips? (Is it even possible on arm ?)

David,

I followed your tutorial on how to build the Grafana-renderer… but no luck. I get the following errors:

      CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.o
      ../deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.cc: In member function ‘virtual       uint32_t grpc_core::chttp2::TransportFlowControl::MaybeSendUpdate(bool)’:
../deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.cc:188:50: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
       static_cast<const uint32_t>(target_window());
                                                  ^
cc1plus: all warnings being treated as errors
make: *** [grpc.target.mk:396: Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.o] Fehler 1
make: Verzeichnis „/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/build“ wird verlassen
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 4.19.66-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok 

Any ideas what’s going wrong?
I am using Grafana 6.4, and openhab milestone build 2.5.0~M3…

Thanks in advance!

From the research, I have done is that this is broken. Have been learning NodeJS so might have some time to look deeper into this.

Thanks for your interesting tutorial, but unfortunately I had the same problem as deichgraf Hauke. I am using Grafana 6.4 and openhab 2.4.0. Any ideas? Thanks!

Have done some research on this and think it is a problem with typescript compiling on the RPI 4. Now this update is provisional as I need to rebuild my RPI4 testing box.

So using the instructions above download the file from git and run upto

yarn install --pure-lockfile

now we have to do abit of editing of a source file

cd src
nano grpc-plugin.ts

add the ignore line above the export to tell Typescript to ignore it.

// @ts-ignore: the nested grpc objects are not recognized by ts
export const GRPC_HEALTH_PROTO = grpc.load(GRPC_HEALTH_PROTO_PATH).grpc.health.v1;

and again here

    // @ts-ignore: the nested grpc objects are not recognized by ts
    server.addService(RENDERER_PROTO.Renderer.service, {

save the file and now run yarn build

yarn run build

it should now complete without errors. Please let me know if plugin now loads.

Hi David,

Thank you so much for helping! unfortunately for me it still does not work. I am still stuck at

[20:57:36] root@openhab:/var/lib/grafana/plugins/grafana-image-renderer# yarn install --pure-lockfile
yarn install v1.19.1
[1/4] Resolving packages...
warning Resolution field "set-value@2.0.1" is incompatible with requested version "set-value@^0.4.3"
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/4] ⠄ grpc
[2/4] ⠄ puppeteer
[3/4] ⠄ husky
error /var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc: Command failed.
Exit code: 1
Command: ./node_modules/.bin/node-pre-gyp install --fallback-to-build --library=static_library
Arguments:
Directory: /var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.10.0
node-pre-gyp info using node@10.15.2 | linux | arm
node-pre-gyp info check checked for "/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node" (not found)
node-pre-gyp http GET https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.11.3/node-v64-linux-arm-glibc.tar.gz
node-pre-gyp http 403 https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.11.3/node-v64-linux-arm-glibc.tar.gz
node-pre-gyp WARN Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.11.3/node-v64-linux-arm-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.11.3 and node@10.15.2 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp http 403 status code downloading tarball https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.11.3/node-v64-linux-arm-glibc.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.15.2 | linux | arm
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.15.2 | linux | arm
gyp info find Python using Python version 2.7.16 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/10.15.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/10.15.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/10.15.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.15.2 | linux | arm
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/build'
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_factory.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_registry.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/compression.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/compression_internal.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/message_compress.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression_gzip.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression_identity.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/debug/stats.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/debug/stats_data.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/format_request.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/httpcli.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/parser.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/call_combiner.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/combiner.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/error.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epoll1_linux.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epollex_linux.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epollsig_linux.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_poll_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/exec_ctx.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/executor.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/fork_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/fork_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/gethostname_fallback.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/gethostname_host_name_max.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/gethostname_sysconf.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iocp_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/is_epollexclusive_available.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/load_file.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/lockfree_event.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/network_status_tracker.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/polling_entity.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/pollset_set_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/pollset_set_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/pollset_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/pollset_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/resolve_address_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/resolve_address_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/resolve_address_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/resource_quota.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/sockaddr_utils.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_factory_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_mutator.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_utils_common_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_utils_linux.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_utils_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_utils_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_utils_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/socket_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_client_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_client_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_client_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_server_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_server_utils_posix_common.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_server_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_server_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/tcp_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/time_averaged_stats.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/timer_generic.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/timer_heap.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/timer_manager.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/timer_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/udp_server.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/unix_sockets_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/unix_sockets_posix_noop.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/wakeup_fd_cv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/wakeup_fd_eventfd.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/wakeup_fd_nospecial.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/wakeup_fd_pipe.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/wakeup_fd_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/json/json.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/json/json_reader.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/json/json_string.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/json/json_writer.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/slice/b64.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/slice/percent_encoding.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/slice/slice.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/slice/slice_buffer.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/slice/slice_hash_table.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/slice/slice_intern.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/slice/slice_string_helpers.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/api_trace.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/byte_buffer.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/byte_buffer_reader.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/call.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/call_details.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/call_log_batch.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/channel.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/channel_init.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/channel_ping.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/channel_stack_type.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/completion_queue.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/completion_queue_factory.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/event_string.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/lame_client.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/metadata_array.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/server.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/validate_metadata.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/version.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/bdp_estimator.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/byte_stream.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/connectivity_state.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/error_utils.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/metadata.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/metadata_batch.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/pid_controller.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/service_config.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/static_metadata.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/status_conversion.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/timeout_encoding.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/transport.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/transport/transport_op_string.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/debug/trace.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/bin_decoder.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/bin_encoder.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_plugin.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.o
../deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.cc: In member function ‘virtual uint32_t grpc_core::chttp2::TransportFlowControl::MaybeSendUpdate(bool)’:
../deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.cc:188:50: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
       static_cast<const uint32_t>(target_window());
                                                  ^
cc1plus: all warnings being treated as errors
make: *** [grpc.target.mk:398: Release/obj.target/grpc/deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.o] Error 1
make: Leaving directory '/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.19.75-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/lib/grafana/plugins/grafana-image-renderer/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 4.19.75-v7l+
node-pre-gyp ERR! command "/usr/bin/node" "/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc
node-pre-gyp ERR! node -v v10.15.2
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/var/lib/grafana/plugins/grafana-image-renderer/node_modules/grpc/src/node/exten

yarn run build then does something but grafana does not start after that.

yarn run v1.19.1
$ yarn run tsc
$ /var/lib/grafana/plugins/grafana-image-renderer/node_modules/.bin/tsc
Done in 13.09s.

I just can’t get node-pre-gyp to work :frowning:

Hi Christian
There is definitively something odd with permission. However I think I have a working version now.
Git download
Change into directory

sudo npm i grpc
sudo npm i install
yarn run build

(The install of grpc would occur with the overall install, but satisfying to see install after so many failures.)

Now copy the start file to arm version

cp plugin_start_linux_amd64 plugin_start_linux_arm

Now stop following tutorial which I will give a huge edit to and restart the graphana service. Mine is now showing service has started.

Hi @David_deMarco,

Thank you so much! I finally was able to install the plugin with the following:

apt-get update
apt-get install git
sudo su (could not access the folder with my regular user)
cd /var/lib/grafana/plugins
git clone https://github.com/grafana/grafana-image-renderer
cd grafana-image-renderer
npm config set unsafe-perm=true (had to do this in order to make the gprc install work)
npm i grpc
npm i install
npm install (otherwise it would complain about "tsc not found")
cd src
nano grpc-plugin.ts
// @ts-ignore: the nested grpc objects are not recognized by ts
export const GRPC_HEALTH_PROTO = grpc.load(GRPC_HEALTH_PROTO_PATH).grpc.health.v1;

// @ts-ignore: the nested grpc objects are not recognized by ts
    server.addService(RENDERER_PROTO.Renderer.service, {
cd ..
yarn run build
cp plugin_start_linux_amd64 plugin_start_linux_arm

systemctl restart grafana-server.service
sudo apt install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
sudo apt install chromium

Now I have the problem that the image is not being generated…
It seems that there is an issue with puppeteer.

t=2019-11-05T09:56:55+0100 lvl=eror msg="Rendering failed." logger=context userId=0 orgId=1 uname= error="Rendering failed: Error: Failed to launch chrome!\n/var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: 1: /var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: Syntax error: Unterminated quoted string\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md\n"
t=2019-11-05T09:56:55+0100 lvl=eror msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/render/d-solo/7BO9uURRk/temperature status=500 remote_addr=192.168.0.111 time_ms=74 size=723 referer="http://127.0.0.1:3000/d/7BO9uURRk/temperature?orgId=1"

I found this, but it doe snot really solve the problem (same error message).

Does anyone have an idea how to solve this?

1 Like

Hi @Chrishab, @David_deMarco,
I’m facing the same “Rendering failed: Error: Failed to launch chrome!” issue.
The deployment of the rendering module was really smooth, no errors at all. During the install I also noticed Chrome getting installed. After restart of Grafana the module is loaded and listed.
This is happening on a Raspberry Pi 4, latest Openhabian test release.
I have the exact same deployment running on an Ubuntu VM. Followed the same deployment steps listed here and the result is a perfectly operating rendering module.
So it seems Buster / Raspberry related?

Thnx,
E

Hi all
Okay. I getting abit confused on this all with regards to the Chrome install.

My last test was on a blank install of OpenHabian then followed the instructions I thought I had edited.

Seen some other versions of the install so not sure how to update this yet. I removed all the additional info on adding chrome as my install worked without it

Appreciate a few users are following this so will try and recreate it this again. Please be aware I am offline travelling until 10 Dec from next week.

Don’t do the instructions of installing Chrome. I know they were in the first set and I thought I had removed them.

The Current instruction will include pupeteer and you don’t need to install chrome and all that. This worked for me on a fresh test install.

Understand that I now seem to be the lead on how this works and happy to follow up on that. Please be aware I’m not around for the next month so all follow up details welcome.

Hey @David_deMarco, thanks for the hard work on this, really appreciated.
Just wanted to let you know I gave up on rendering on the Pi4. I’ve done a couple of fresh installs on the Pi using Openhabian as a base OS (I’m quite the expert on this these days) and I must say everything (time over time) evrything worked perfectly except the last mile . . the rendering.
I already had an Ubuntu VM that I used for testing and found that running Grafana on that VM rendered like a charm.
So now I removed Grafana from my ‘production’ Pi4 (kept Influx on the Pi4) and use the Ubuntu based Grafana as a centralized instance for Graphing and Rendering using various databases running on different Pi’s.
:slight_smile:

For what it’s worth, this will NOT work on a Raspberry Pi 3B+ on Buster.

Some node.js packages can’t be installed (puppeteer, husky) and the compilation aborts in a matter of seconds.

1 Like

I have the same problem… Everything works on the Pi4, and it finally can handle all my things in one device, but the rendering doesn’t seem to work… I tried it multiple times, always stuck somewhere…

Hello,

sorry, but i did not understood this lines. It must looks so http://prntscr.com/pxy193 ?

after this i get error

[23:13:11] root@openhab:/var/lib/grafana/plugins/grafana-image-renderer# yarn run build
yarn run v1.19.1
$ yarn run tsc
error Command "tsc" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

How it can be fixed?

I am on OH 2.5M4 on Pi4