I have an Apache Camel route that listens for an FTP server to process files. The problem is that I need to change permission of the file across the FTP server, so I tried to add chmod option included in the documentation for Apache Camel SFTP Component, but it didn't change the permissions of the file so the processing fails in the last step not matter if it finished ok or not. All of this works locally but didn't work deployed on Openshift.
I am using the chmod option as follows:
sftp://AAAA#BBBB/PATH/TO/procesado?password=XXXX&maxMessagesPerPoll=15&delay=30000&fileName=${header.CamelFileName}&chmod=755
Can someone tell me why it doesn't work on Openshift, or if there is a way to make it work.
I have configure kurento on WS. Its spring boot application running on https://localhost:8443 (tomcat).
Logs:
s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8443 (https)
DEBUG 4730 --- [apterApp.main()] o.s.w.c.s.StandardServletEnvironment : Adding [server.ports] PropertySource with highest search precedence
INFO 4730 --- [apterApp.main()] com.io.AdapterApp : Started AdapterApp in 14.041 seconds (JVM running for 29.346)
Start boot application using below command:
sudo mvn compile exec:java Dkms.url=ws://io-storage:8888/kurento
Websocket running on 8888 port. (not secure WS).
While creating room the request is ws://io-storage:8888/call
But getting following error while request send to the kurento server
2018-10-31 13:12:23,252181 2009 [0x00007fe37ce5b700] error KurentoWebSocketTransport WebSocketTransport.cpp:455 openHandler() Invalid path "/call", closing connection
Kurento Media Server doesn't listen for RPC commands on the /call endpoint. Why are you requesting that URL?
Just use the Java API client by following any of the Java tutorials; this library does all of the RPC commands for you.
If you still need to work without libraries and program directly against the RPC API, then check the protocol docs.
My aim is to display links to csv files so an end user can download them.
So I created a csv file and saved it using a file output node but I can't find a way to allow the end user to click a link/button to download it. I tried the following flow, but it points to http://localhost:1880/ui/~/TEST.CSV:
[{"id":"3aff08aa.8731d8","type":"inject","z":"a24aefdf.d606e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":100,"wires":[["1541e37c.3072dd"]]},{"id":"1541e37c.3072dd","type":"function","z":"a24aefdf.d606e","name":"","func":"msg.payload = {};\nmsg.payload = {\"col1\": 1, \"col2\": 2};\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":100,"wires":[["2d045a05.efbef6"]]},{"id":"12ba838c.dcd18c","type":"file","z":"a24aefdf.d606e","name":"TEST.CSV","filename":"~/TEST.CSV","appendNewline":true,"createDir":true,"overwriteFile":"true","x":570,"y":100,"wires":[]},{"id":"2d045a05.efbef6","type":"csv","z":"a24aefdf.d606e","name":"","sep":",","hdrin":true,"hdrout":true,"multi":"one","ret":"\\n","temp":"col1, col2","x":410,"y":100,"wires":[["12ba838c.dcd18c"]]},{"id":"5a9db6ab.f35b28","type":"http in","z":"a24aefdf.d606e","name":"downloads","url":"/downloads","method":"get","upload":false,"swaggerDoc":"","x":120,"y":160,"wires":[["7291d925.cfc9b8","ccef1ce3.900b8"]]},{"id":"7291d925.cfc9b8","type":"debug","z":"a24aefdf.d606e","name":"","active":true,"console":"false","complete":"false","x":140,"y":240,"wires":[]},{"id":"1916b0d1.3c55ff","type":"http response","z":"a24aefdf.d606e","name":"response","statusCode":"200","headers":{"content-type":"text/plain"},"x":560,"y":160,"wires":[]},{"id":"ccef1ce3.900b8","type":"ui_template","z":"a24aefdf.d606e","group":"a1588fc.a8dc47","name":"","order":0,"width":0,"height":0,"format":"<div ng-bind-html=\"msg.payload\"></div>\nDownload TEST.CSV","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":420,"y":160,"wires":[["1916b0d1.3c55ff"]]},{"id":"a1588fc.a8dc47","type":"ui_group","z":"","name":"Data Export","tab":"ea941605.788c18","disp":true,"width":"12"},{"id":"ea941605.788c18","type":"ui_tab","z":"","name":"Dashboard","icon":"dashboard","order":1}]
I expect this is something to do with absolute paths, but I don't know where the node-red web server's root is in the file system...
Any help would be gratefully received.
Cheers,
Simon
There is a section in your settings.js file, which by default reads:
// When httpAdminRoot is used to move the UI to a different root path, the
// following property can be used to identify a directory of static content
// that should be served at http://localhost:1880/.
//httpStatic: '/home/nol/node-red-dashboard/',
If you have not already done so, uncomment the httpStatic line and set a directory path to some absolute location that your node-red server can write to. Then restart node-red, and modify your flow to output the CSV file to this directory. Any files/folders you create under this location can now be served by the node-red express server.
When your node-red server starts, it will print out the absolute path used for serving static files -- for instance, in my project it shows:
13 Jan 12:06:45 - [info] Settings file : C:\NODE\node_red_ui\settings.js
13 Jan 12:06:45 - [info] HTTP Static : C:\NODE\node_red_ui\public
13 Jan 12:06:45 - [info] User directory : C:\NODE\node_red_ui
13 Jan 12:06:45 - [info] Flows file : C:\NODE\node_red_ui\flows_ENTLAPTOP18.json
13 Jan 12:06:45 - [info] Dashboard using development folder
13 Jan 12:06:45 - [info] Server now running at http://localhost:1880/admin/
13 Jan 12:06:45 - [info] Starting flows
So if I create the file C:\NODE\node_red_ui\public\downloads\test.csv,
then it can downloaded through the url =>
http://localhost:1880/downloads/test.csv
I am trying to mount a folder workspace from server to the client over nfs. For this I bind the folder to an /export by adding the following in my /etc/fstab on server:
/home /export none bind
Then I add the following lines in my /etc/exports on my server:
/export *(ro,sync,no_subtree_check,insecure,fsid=0)
/export/workspace *(rw,sync,no_subtree_check,insecure,nohide)
I load the exportfs file, and restart the nfs-kernel-server:
exportfs -vr
service nfs-kernel-server restart
I now go to my client and check which folders can be exported:
showmount -e 192.168.145.131
Export list fo 192.168.145.131:
/export/workspace *
/export *
But when I try mounting the folder, I get the following error:
sudo mount -t nfs4 192.168.145.131:/workspace nfs/ -v
mount.nfs4: timeout set for Sat Apr 19 19:16:51 2014
mount.nfs4: trying text-based options 'addr=192.168.145.131,clientaddr=192.168.145.128'
mount.nfs4: mount(2): No such device
mount.nfs4: No such device
I have also tried mounting :/export/workspace and :/home/workspace but that gives me the same error. I have tried loading the nfs module using modprobe on both client and server, but the module is loaded on both client and server.
Any help would be much appreciated. Thanks.
Solved the problem after 3 days!!
I tried mounting the nfs4 server folder from a client with a newer Kernel version (3.8). I was able to do so. So I copied the configuration file /boot/configure-3.8-generic file to my /usr/src/.config, and enabled the option Filesystems -> Network File Systems -> NFS3 client load as module and NFS4 client load as module.
compiled my kernel again, created initrd image, updated grub, and now I am able to mount the server folder from my 2.6 kernel client also!
I am trying to deploy a war file on tomcat server via tomcat manager. but each time I am getting this error:
FAIL - Deploy Upload Failed, Exception: Processing of multipart/form-data request failed. No space left on device
There is plenty of space on the server. I have only tomcat server and MySQL server running on the server, nothing else.
Can anyone tell me what is wrong and what is the workaround?
It might be you have a permission problem here.
You can try
chmod 777 /opt/apache-tomcat-X.X.XX/work/Catalina/localhost/manager
and maybe additional
chmod 777 /opt/apache-tomcat-X.X.XX/webapps/sample
where sample is your app directory ofc.